Game Development Community

Engine Crashes on level load

by WEP11 · in Torque 3D Professional · 03/30/2013 (8:18 am) · 5 replies

Ok, so everything worked fine last night, but I tried running it this morning after some scripting and now every level of my game crashes around the same point when it loads (During a test run or world editing). I'm pretty sure I got rid of all of my added scripting. I tried a demo project and it loads fine, so its definitely something in my game. I am starting to get frustrated and figured you all might have an idea. Here is the console.log output. Thanks for any ideas:

//-------------------------- 3/30/2013 -- 11:08:46 -----
Processor Init:
Intel Pentium III, ~2.70 Ghz
FPU detected
MMX detected
SSE detected
SSE2 detected
MP detected [2 cores, 2 logical, 1 physical]

Math Init:
Installing Standard C extensions
Installing Assembly extensions
Installing FPU extensions
Installing MMX extensions
Installing SSE extensions

Initializing platform...
Input Init:
keyboard0 input device created.
mouse0 input device created.
joystick0 input device created.
joystick1 input device created.
DirectInput enabled.

Done
SFXFMODProvider - Could not locate 'fmodex.dll' or 'fmodexp.dll' - FMOD not available.
GFX Init:
Direct 3D (version 9.x) device found
Null device found

DebugDrawer Enabled!
--------- Loading DIRS ---------

--------- Parsing Arguments ---------
Binding server port to default IP
UDP initialized on port 0
Attempting to create GFX device: NVIDIA GeForce GTS 250 (D3D9)
Device created, setting adapter and enumerating modes
Cur. D3DDevice ref count=1
Pix version detected: 3.000000
Vert version detected: 3.000000
Maximum number of simultaneous samplers: 16
Number of simultaneous render targets: 4
Hardware occlusion query detected: Yes
Using Direct3D9Ex: No
WMIVideoInfo: DxDiag initialized
Initializing GFXCardProfiler (D3D9)
o Chipset : 'GeForce GTS 250'
o Card : 'GeForce GTS 250'
o Version : '6.14.0012.6099'
- Scanning card capabilities...
GFXCardProfiler (D3D9) - Setting capability 'autoMipMapLevel' to 1.
GFXCardProfiler (D3D9) - Setting capability 'maxTextureWidth' to 8192.
GFXCardProfiler (D3D9) - Setting capability 'maxTextureHeight' to 8192.
GFXCardProfiler (D3D9) - Setting capability 'maxTextureSize' to 8192.
GFXCardProfiler (D3D9) - Setting capability 'lerpDetailBlend' to 1.
GFXCardProfiler (D3D9) - Setting capability 'fourStageDetailBlend' to 1.
- Loading card profiles...
- Loaded card profile core/profile/D3D9.cs
- No card profile core/profile/D3D9.GeForceGTS250.cs exists
- No card profile core/profile/D3D9.GeForceGTS250.GeForceGTS250.cs exists
- No card profile core/profile/D3D9.GeForceGTS250.GeForceGTS250.61400126099.cs exists
% - PostFX Manager - Executing core/scripts/client/postFx/default.postfxpreset.cs
% - PostFX Manager - Applying from preset
% - PostFX Manager - PostFX enabled
% - Initialized Core

--------- Initializing Directory: scripts ---------
sfxStartup...
SFXSystem::createDevice - created OpenAL device 'Generic Software'
Provider: OpenAL
Device: Generic Software
Hardware: No
Buffers: 16

--------- Initializing Combass2: Server Scripts ---------

--------- Initializing Combass2: Client Scripts ---------

--------- Initializing Lighting Systems ---------
Using Basic Lighting


--------------
Attempting to set resolution to "1024 768 false 32 60 4"
Accepted Mode:
--Resolution : 1024 768
--Full Screen : No
--Bits Per Pixel : 32
--Refresh Rate : 60
--FSAA Level : 4
--------------
Warning, overwriting material for: _2_-_Default
Warning, overwriting material for: WoodPost01
Binding server port to default IP
UDP initialized on port 0
% - Initializing Tools
% - Initializing Tools Base
% - Initializing Base Editor
% - Initializing World Editor
% - Initializing Sketch Tool
- Initializing Datablock Editor
% - Initializing Debugger
% - Initializing Decal Editor
% - Initializing Forest Editor
% - Initializing Gui Editor
% - Initializing Material Editor
% - Initializing Mesh Road Editor
% - Initializing Mission Area Editor
% - Initializing Particle Editor
% - Initializing Physics Tools
No physics plugin exists.
% - Initializing River Editor
- Initializing Road and Path Editor
% - Initializing Shape Editor
Engine initialized...
tools/worldEditor/scripts/menuHandlers.ed.cs (63): Unable to find object: 'ETerrainPersistMan' attempting to call function 'clearAll'
Exporting server prefs...
Warning: shape art/shapes/Cheetah/Cheetah_Body.dae collision detail 0 (Collision-1) bounds exceed that of shape.
*** LOADING MISSION: levels/Level1.mis
*** Stage 1 load
*** Stage 2 load
[Material::mapMaterial] - Cannot map unnamed Material
TSLastDetail::_validateDim - 'art/shapes/rocks/MossRock/MossRock01.DAE' detail dimensions too big! Reduced from 1024 to 512.
[Material::mapMaterial] - Cannot map unnamed Material
TSLastDetail::_validateDim - 'art/shapes/rocks/BigStone01/BigStone01.DAE' detail dimensions too big! Reduced from 1024 to 512.
Game -> activatePackages
*** Mission loaded
Connect request from:
Connection established 4261
CADD: 4262 local
*** Sending mission load to client: levels/Level1.mis
Window focus status changed: focus: 1
Mapping string: ServerMessage to index: 0
Mapping string: MsgConnectionError to index: 1
Mapping string: MsgLoadInfo to index: 2
Mapping string: MsgLoadDescripition to index: 3
Mapping string: MsgLoadInfoDone to index: 4
Mapping string: MsgClientJoin to index: 5
Mapping string: Welcome to the Torque demo app %1. to index: 6
Mapping string:  Visitor to index: 7
Mapping string: MissionStartPhase1 to index: 8
*** New Mission: levels/Level1.mis
*** Phase 1: Download Datablocks & Targets
% - PostFX Manager - Executing core/scripts/client/postFx/default.postfxpreset.cs
% - PostFX Manager - Applying from preset
% - PostFX Manager - PostFX enabled
Mapping string: MissionStartPhase1Ack to index: 0
[MaterialList::mapMaterials] Creating missing material for texture: art/shapes/weapons/ramrifle/ramrifle_diff
Warning: shape art/shapes/Cheetah/Cheetah_Body.dae collision detail 1 (Collision-1) bounds exceed that of shape.
Mapping string: MissionStartPhase2 to index: 9
*** Phase 2: Download Ghost Objects
Mapping string: MissionStartPhase2Ack to index: 1

About the author

Recent Threads


#1
03/30/2013 (9:36 am)
Try running it in debug mode from Visual Studio, that should give you an error message.
#2
03/30/2013 (9:52 am)
Awesome, that got me a step further than what was on the console log. The last three lines (the new appearance) are:

Mapping string: MissionStartPhase2Ack to index: 1
[MaterialList::mapMaterials] Creating missing material for texture: art/shapes/rocks/rock2
First-chance exception at 0x10080c59 in Combass2.exe: 0xC0000005: Access violation reading location 0x00000000.
Unhandled exception at 0x10080c59 in Combass2.exe: 0xC0000005: Access violation reading location 0x00000000.
The program '[1744] Combass2.exe: Native' has exited with code 0 (0x0).

I wonder if the whole thing has to do with that rock2 shape, I'll try everything of course. I'd hate to have to pack up the source to see what comes back. I could just use this as an excuse to migrate to the MIT 2.0
#3
03/30/2013 (10:07 am)
Okay, so I named a trigger endMission right before I finished up last night. Could that be causing it? If it is, I deleted the instance from the .mis file, and there isn't a reference in the triggers .cs file. Anywhere else it could be hiding after its added in the world editor?
#4
03/30/2013 (10:51 am)
I got it. I compiled the source in visual studio and was led back to this function:
void GroundCover::_initMaterial()

at this pointer:
mMatInst->setUserObject( this );

Which of course led to my grass ground cover in the level. I'm not sure why it was crashing, the grass has been in the level a while. But none the less its fixed now. Thanks for the help!