Race Mission Crashes immediately

Posted in Support
Please login to contribute to the conversation.
My race mission keeps crashing when loading the script file not the load file. I think I haven't made any mistakes? to be specific its the Milhouse time trial race with fully connected map mod. here's the script file:
SelectMission("sr1");
//The TIME TRIAL
//Script set up for multiple laps

//SetAnimatedCameraName( "race1camShape" );
//SetAnimCamMulticontName( "race1cam" );

SetMissionResetPlayerInCar("sr1_carstart");
SetDynaLoadData("l2r1.p3d;l2z1.p3d;l2r4.p3d;");

UsePedGroup(5); 

//Chuck: StreetRace Prop Load and Unload Setup
//StreetRacePropsLoad("l1_sr1p.p3d;");
//StreetRacePropsUnload("l1_sr1p.p3d:");

AddStage(0);
  DisableHitAndRun();
  SetHUDIcon( "marge_v" );
  AddStageVehicle("marge_v","sr1_marge_carstart","chase","Missions\level01\M3dest.con", "marge");
  PlacePlayerCar("current", "sr1_carstart");
  PutMFPlayerInCar( );  // This makes the play auto reset into their car for this stage.                
  StartCountdown("count");
	AddToCountdownSequence( "3", 1500 ); // duration time in milliseconds
	AddToCountdownSequence( "2", 900 ); // duration time in milliseconds
	AddToCountdownSequence( "1", 1000 ); // duration time in milliseconds
	AddToCountdownSequence( "GO", 400 ); // duration time in milliseconds
   SetStageTime(100); 
   SetStageMessageIndex(222);
//SetStageTime(150);
    RESET_TO_HERE();
    NoTrafficForStage();
     AddObjective( "destroy","neither");
     SetObjTargetVehicle("marge_v");
    AddNPC("patty", "sr1_patty");
    AddNPC("selma", "sr1_selma");

CloseObjective();

AddCondition("timeout");
CloseCondition();

AddCondition( "damage" );
	SetCondMinHealth( 0.0 );
	SetCondTargetVehicle( "current");
CloseCondition();

AddCondition("outofvehicle");
	SetCondTime( 0 );
CloseCondition();

CloseStage();

AddStage(1,"final");
	AddObjective("dialogue");
		AddNPC("patty", "sr1_patty");
		AddNPC("selma", "sr1_selma");
		//AmbientAnimationRandomize( 1, 0 );      // ( pc=0, npc=1) (nonrandom=0, random=1)
		//AmbientAnimationRandomize( 0, 0 );      <<<===---  ASK IAN ABOUT THIS COMMAND
		//AddAmbientNpcAnimation( "dialogue_open_arm_hand_gesture" );
		//AddAmbientNpcAnimation( "none" );
		//AddAmbientNpcAnimation( "dialogue_thinking" );
		//AddAmbientPcAnimation( "none" );
		//AddAmbientPcAnimation( "dialogue_yes" );
		//AddAmbientPcAnimation( "none" );
		//AddAmbientPcAnimation( "dialogue_hands_in_air" );
		//SetConversationCam( 3, "pc_far" );
		//SetConversationCamNpcName("npc_near");
		//SetConversationCamPcName("pc_near");            <<<===--- ASK IAN ABOUT THIS COMMAND.
		SetDialogueInfo("patty","homer","success",0);
		SetDialoguePositions("sr1_patty","sr1_homer","sr1_carstart");
	CloseObjective();
CloseStage();



CloseMission();

and the load file:
LoadP3DFile("art\missions\level01\sr1.p3d");
//LoadP3DFile("art\missions\level01\race1cam.p3d");
//LoadP3DFile( "art\frontend\dynaload\images\msnicons\object\race.p3d" );
LoadP3DFile( "art\frontend\dynaload\images\msnicons\vehicle\Marge_v.p3d" )
LoadP3DFile("art\missions\generic\fline.p3d");

LoadDisposableCar("art\cars\marge_v.p3d","marge_v","AI");
LoadDisposableCar("art\cars\honor_v.p3d","honor_v","AI");
Apologies for the late reply! Meant to take a look at this much sooner but got sidetracked.

I'll be completely honest in that based on a quick analysis of the script, I'm not entirely sure why the mission appears to be crashing. The AI car needed appears to be loaded properly and I'm not seeing any glaring errors with the Marge stage itself.

I assume it crashes as soon as you attempt to play the mission on the Mission Briefing screen? Does 'sr1_carstart' in the sr1.p3d exist, as well as the locator for spawning Marge's vehicle (sr1_marge_carstart)? Double check to make sure those Type 0 locators exist. A brief edit of a mission script I had on hand that replaces an existing Street Race resulted in the game crashing immediately if the locator for resetting the player in the car didn't exist.

Otherwise, the game should create a crash log in Documents\My Games\Lucas' Simpsons Hit & Run Mod Launcher. If you could grab the latest one and upload it here, we might be able to get Lucas to take a look at it to narrow down the issue.

Many thanks!
I think you mean Type 3 locators In the p3d file. And yes those triggers do exist in the p3d. and can you elaborate on it crashes when the locator for resetting the player in the car doesn't exist? I'll take a look at the crash log. EDIT: it appears it crashes when loading the information file on the mission briefing, loads the triggers just fine.

Thanks for replying.
SetDynaLoadData("l2r1.p3d;l2z1.p3d;l2r4.p3d;");
UsePedGroup(5); 

I think the problem is right here. You're loading Level 2 map data while using PedGroup 5.

PedGroup 5 is the group used in the trailer park area of Level 1. I've experienced crashes (while working on SHAR PLUS) from the game using a PedGroup that isn't the correct one for the level region(s) that are being loaded, so I think this is the most-likely culprit of the crash.

What you should do is change the PedGroup to the one corresponding to the map region where you start the mission:
l2r1.p3d (the construction site area) --> UsePedGroup(9);
l2z1.p3d (the town center) --> UsePedGroup(8);
l2r4.p3d (the Stadium area) --> UsePedGroup(14);

That should (hopefully) fix the crashing.

P.S. -- Yes, vehicle locators should be Type 3, not Type 0. (Type 0 is mainly for "goto" triggers.)
Nope, Unfortunately that was not what was causing the issue. and the issue is 100% in the info file according to the launcher console.
This is the DMP file :
Microsoft (R) Windows Debugger Version 10.0.20153.1000 X86
Copyright (c) Microsoft Corporation. All rights reserved.


Loading Dump File [C:\Users\myname\Documents\My Games\Lucas' Simpsons Hit & Run Mod Launcher\Crashes\2021-01-31 11-35-02.481.dmp]
User Mini Dump File: Only registers, stack and portions of memory are available


************* Path validation summary **************
Response                         Time (ms)     Location
Deferred                                       srv*
Symbol search path is: srv*
Executable search path is: 
Windows 8 Version 9200 MP (8 procs) Free x86 compatible
Product: WinNt, suite: SingleUserTS Personal
Machine Name:
Debug session time: Sun Jan 31 11:35:02.000 2021 (UTC + 11:00)
System Uptime: not available
Process Uptime: 0 days 0:01:42.000
................................................................
.....................
Loading unloaded module list
..
This dump file has an exception of interest stored in it.
The stored exception information can be accessed via .ecxr.
(465c.31b8): Access violation - code c0000005 (first/second chance not available)
For analysis of this file, run !analyze -v
eax=00000000 ebx=0019f501 ecx=0ecbfb80 edx=00000000 esi=00000000 edi=000007d0
eip=77c92f3c esp=0019f3f4 ebp=0019f464 iopl=0         nv up ei pl nz na po nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00200202
ntdll!NtWaitForSingleObject+0xc:
77c92f3c c20c00          ret     0Ch
0:000> !analyze -v
*******************************************************************************
*                                                                             *
*                        Exception Analysis                                   *
*                                                                             *
*******************************************************************************


KEY_VALUES_STRING: 1

    Key  : AV.Dereference
    Value: NullClassPtr

    Key  : AV.Fault
    Value: Read

    Key  : Analysis.CPU.mSec
    Value: 1764

    Key  : Analysis.DebugAnalysisProvider.CPP
    Value: Create: 8007007e on DESKTOP-LIT0DGC

    Key  : Analysis.DebugData
    Value: CreateObject

    Key  : Analysis.DebugModel
    Value: CreateObject

    Key  : Analysis.Elapsed.mSec
    Value: 5863

    Key  : Analysis.Memory.CommitPeak.Mb
    Value: 191

    Key  : Analysis.System
    Value: CreateObject

    Key  : Timeline.Process.Start.DeltaSec
    Value: 102

    Key  : WER.Process.Version
    Value: 1.0.0.0


ADDITIONAL_XML: 1

OS_BUILD_LAYERS: 1

NTGLOBALFLAG:  0

PROCESS_BAM_CURRENT_THROTTLED: 0

PROCESS_BAM_PREVIOUS_THROTTLED: 0

CONTEXT:  (.ecxr)
eax=00000000 ebx=00000041 ecx=0ecbfb80 edx=00000000 esi=00000000 edi=0ecbfb80
eip=004571f0 esp=0019fbf4 ebp=033cac10 iopl=0         nv up ei pl nz na po nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00210202
Simpsons!pddiRect::operator=+0x15000:
004571f0 8a88b8020000    mov     cl,byte ptr [eax+2B8h]     ds:002b:000002b8=??
Resetting default scope

EXCEPTION_RECORD:  (.exr -1)
ExceptionAddress: 004571f0 (Simpsons!pddiRect::operator=+0x00015000)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 00000000
   Parameter[1]: 000002b8
Attempt to read from address 000002b8

PROCESS_NAME:  Simpsons.exe

READ_ADDRESS:  000002b8 

ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.

EXCEPTION_CODE_STR:  c0000005

EXCEPTION_PARAMETER1:  00000000

EXCEPTION_PARAMETER2:  000002b8

STACK_TEXT:  
WARNING: Stack unwind information not available. Following frames may be wrong.
0019fbf0 00456aea     0ecbfb80 12d157c8 00000041 Simpsons!pddiRect::operator=+0x15000
0044d227 cc868a00     84000000 e82174c0 ffffae45 Simpsons!pddiRect::operator=+0x148fa
0044d22b 84000000     e82174c0 ffffae45 0118888b 0xcc868a00
0044d22f e82174c0     ffffae45 0118888b c9850000 0x84000000
0044d233 ffffae45     0118888b c9850000 36e81274 0xe82174c0
0044d237 0118888b     c9850000 36e81274 8bffffae 0xffffae45
0044d23b c9850000     36e81274 8bffffae 000118b8 0x118888b
0044d23f 36e81274     8bffffae 000118b8 e801b200 0xc9850000
0044d243 8bffffae     000118b8 e801b200 0009be29 0x36e81274
0044d247 000118b8     e801b200 0009be29 c25b5e5f 0x8bffffae
0044d24b e801b200     0009be29 c25b5e5f 90900004 0x118b8
0044d24f 0009be29     c25b5e5f 90900004 0cec8390 0xe801b200
0044d253 c25b5e5f     90900004 0cec8390 8b575653 0x9be29
0044d257 90900004     0cec8390 8b575653 d333e8f0 0xc25b5e5f
0044d25b 0cec8390     8b575653 d333e8f0 c88b000a 0x90900004
0044d25f 8b575653     d333e8f0 c88b000a 4ae8c033 0xcec8390
0044d263 d333e8f0     c88b000a 4ae8c033 8b000afd 0x8b575653
0044d267 c88b000a     4ae8c033 8b000afd ae03e8d8 0xd333e8f0
0044d26b 4ae8c033     8b000afd ae03e8d8 5ee8ffff 0xc88b000a
0044d26f 8b000afd     ae03e8d8 5ee8ffff 8bffffc6 0x4ae8c033
0044d273 ae03e8d8     5ee8ffff 8bffffc6 0000a08e 0x8b000afd
0044d277 5ee8ffff     8bffffc6 0000a08e 8bc98500 0xae03e8d8
0044d27b 8bffffc6     0000a08e 8bc98500 e81074f8 igdumdim32!GTPIN_IGC_Instrument+0x189817f
0044d27f 00000000     8bc98500 e81074f8 ffffaded 0x8bffffc6


SYMBOL_NAME:  Simpsons!pddiRect::operator=+15000

MODULE_NAME: Simpsons

IMAGE_NAME:  Simpsons.exe

STACK_COMMAND:  ~0s ; .ecxr ; kb

FAILURE_BUCKET_ID:  NULL_CLASS_PTR_READ_c0000005_Simpsons.exe!pddiRect::operator=

OSPLATFORM_TYPE:  x86

OSNAME:  Windows 8

IMAGE_VERSION:  1.0.0.0

FAILURE_ID_HASH:  {e0e9e000-f884-bc06-1c25-135547f23898}

Followup:     MachineOwner
---------





Ok good news but bad news at the same time. I found out that the marge AddStageVehicle("marge_v","sr1_marge_carstart","chase","Missions\level01\M3dest.con", "marge"); is the cause for the crash and the SetObjTargetVehicle("marge_v"); Because of access violation? I'm not sure what that means but ill try to fix it. Help would be appreciated.

It could not find "marge_v" IM VERY confused can someone explain why its doing this?
Okay Fixed it. the problem was the " ; " Missing on the LoadP3DFile( "art\frontend\dynaload\images\msnicons\vehicle\Marge_v.p3d" ). I feel so dumb right now.
No worries! I’ve done a plethora of absolutely moronic things when designing missions, and it’s all really easy to overlook. Sorry for not properly being able to reply in time. Got into a discussion about the .dmp files and forgot to look back into this one.

What’s even worse is that I had noticed the ‘marge_v’ HUD icon’s entry in the load script being present but was more fixated on the Mod being capitalized. Not sure how I missed the actual issue.

Glad to hear things are sorted now!