### Crash when changing missions.

Friendly conversations, and everything that doesn't fit into the other forums.

#### Crash when changing missions.

LoLJester
Posts: 110
Joined: Thu Aug 13, 2015 5:58 pm

Hello,

I have a crash in:

Code: Select all

 bool SFX3DObject::containsPoint( const F32 point[ 3 ] ) const { return mObject->containsPoint( ( reinterpret_cast< const Point3F >( &point[ 0 ] ) ) ); } 
in T3D\sfx\sfx3DWorld.cpp. mObject seems to be the culprit.

I have several missions, and this crash only happens with one of the missions.
What's strange is that the crash does not happen when I disconnect from the said mission and destroy the server, but when I enter another mission.
I thought that it might be the amount of objects in the level, but I have levels twice as big with no crash.
And it doesn't seem to be one thing, because if I remove more than half of the objects from the level, there is no crash.

mObject is part of Vector< Scope > mScopeStack; //A top-down ordering of all objects that are currently in scope.
All scene objects that get into the camera's scope are added to mScopeStack in _onScopeIn().
Looking at mObject when exiting other levels, mObject contains a list of scene objects currently in scope/view.
When I exit this specific level, mObject still contains a lot of the scene objects currently in view except the top value of the stack seems to be empty, hence the crash.

Any thoughts?

#### Re: Crash when changing missions.

Online Duion
Posts: 1463
Joined: Sun Feb 08, 2015 1:51 am

I'm always a fan of workarounds, I would try to redo the mission and see if the problem still exists. Maybe create a blank mission and add the content of your bugged mission into it, part by part and see what makes the error occur. "SFX3DObject" sounds like the issue is related to sounds, so it should be pretty easy to find the object causing the crash then.

#### Re: Crash when changing missions.

LoLJester
Posts: 110
Joined: Thu Aug 13, 2015 5:58 pm

Thanks for the suggestion, Duion.
I tried that, but it seems the problem is related to this: http://www.garagegames.com/community/fo ... ead/129864

#### Re: Crash when changing missions.

Online Duion
Posts: 1463
Joined: Sun Feb 08, 2015 1:51 am

I don't even know what an SFXSpace is are those regular sound emitters? Since I cannot find anything else in the editor.

#### Re: Crash when changing missions.

LoLJester
Posts: 110
Joined: Thu Aug 13, 2015 5:58 pm

From what I've gathered, SFXSpace is the sound space around the client's camera (i.e. the ears.)

#### Re: Crash when changing missions.

Online Duion
Posts: 1463
Joined: Sun Feb 08, 2015 1:51 am

Easiest way would probably be if you could send the model, so I or someone else can look at it, otherwise I can just guess. Do you have custom code or is it stock Torque3D ?

#### Re: Crash when changing missions.

LoLJester
Posts: 110
Joined: Thu Aug 13, 2015 5:58 pm

Like I mentioned above, the problem is fixed. Thanks to OTHG_Mars on Discord, the link I posted above points to a fix to this issue.
Thanks again.

#### Re: Crash when changing missions.

Happenstance
Posts: 101
Joined: Sat Apr 11, 2015 9:08 pm
I'd suggest submitting a PR with this fix as well. Looks like the fix slipped through the cracks during the GarageGames days.

#### Who is online

Users browsing this forum: No registered users and 3 guests