Ticket #311 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

Program received signal SIGSEGV, Segmentation fault.

Reported by: BadassTester Owned by:
Priority: Should Have Milestone:
Component: Core engine Keywords: simple
Cc:

Description

Hello again.. I was playing the "Latinum" map. Crashed after trying to build a building (dock) on the very border of the map.

#0  0x08374786 in CRenderableObject::SetDirty (this=0x0, dirtyflags=2)
    at ../../../source/graphics/RenderableObject.h:82
#1  0x083732e7 in CTerrain::FlattenArea (this=0x9578708, x0=62.6870041, 
    x1=80.6870041, z0=564.263, z1=582.263)
    at ../../../source/graphics/Terrain.cpp:467
#2  0x082dc932 in CEntity::FlattenTerrain (this=0xc102d98)
    at ../../../source/simulation/EntityScriptInterface.cpp:932
#3  0x082e84ea in CNativeComplexFunction<CEntity, false, jsval_t, &(CEntity::FlattenTerrain(JSContext*, unsigned int, int*))>::JSFunction (cx=0x8723558, 
    obj=0xc0f8c50, argc=0, argv=0xc1d5860, rval=0xbfa566b0)
    at ../../../source/scripting/ScriptableComplex.inl:468
#4  0x085277cd in js_Invoke (cx=0x8723558, argc=0, flags=0) at jsinterp.c:1187
#5  0x0853838e in js_Interpret (cx=0x8723558, pc=0xa385fd0 ":", 
    result=0xbfa573d8) at jsinterp.c:3586
#6  0x08527843 in js_Invoke (cx=0x8723558, argc=1, flags=2) at jsinterp.c:1207
#7  0x08527b9e in js_InternalInvoke (cx=0x8723558, obj=0xb24e780, 
    fval=156876080, flags=0, argc=1, argv=0xbfa5750c, rval=0xbfa57510)
    at jsinterp.c:1284
#8  0x084f0c98 in JS_CallFunction (cx=0x8723558, obj=0xb24e780, fun=0x8a54860, 
    argc=1, argv=0xbfa5750c, rval=0xbfa57510) at jsapi.c:4146
#9  0x082c0707 in CScriptObject::DispatchEvent (this=0xa344f2c, 
    Context=0xb24e780, evt=0xbfa57a5c)
    at ../../../source/simulation/ScriptObject.cpp:126
---Type <return> to continue, or q <return> to quit---
#10 0x0832803c in IEventTarget::_DispatchEvent (this=0xa344cf0, 
    evt=0xbfa57a5c, target=0xaebbff8)
    at ../../../source/scripting/DOMEvent.cpp:49
#11 0x083281b9 in IEventTarget::_DispatchEvent (this=0xa5792e8, 
    evt=0xbfa57a5c, target=0xaebbff8)
    at ../../../source/scripting/DOMEvent.cpp:66
#12 0x083281b9 in IEventTarget::_DispatchEvent (this=0xa6ee1d8, 
    evt=0xbfa57a5c, target=0xaebbff8)
    at ../../../source/scripting/DOMEvent.cpp:66
#13 0x083281b9 in IEventTarget::_DispatchEvent (this=0xa6ed0f8, 
    evt=0xbfa57a5c, target=0xaebbff8)
    at ../../../source/scripting/DOMEvent.cpp:66
#14 0x083281b9 in IEventTarget::_DispatchEvent (this=0xa6ec3e0, 
    evt=0xbfa57a5c, target=0xaebbff8)
    at ../../../source/scripting/DOMEvent.cpp:66
#15 0x083281b9 in IEventTarget::_DispatchEvent (this=0xa6eb648, 
    evt=0xbfa57a5c, target=0xaebbff8)
    at ../../../source/scripting/DOMEvent.cpp:66
#16 0x083281b9 in IEventTarget::_DispatchEvent (this=0xa6ea918, 
    evt=0xbfa57a5c, target=0xaebbff8)
    at ../../../source/scripting/DOMEvent.cpp:66
#17 0x083281b9 in IEventTarget::_DispatchEvent (this=0xa6e9c78, 
    evt=0xbfa57a5c, target=0xaebbff8)
---Type <return> to continue, or q <return> to quit---
    at ../../../source/scripting/DOMEvent.cpp:66
#18 0x083281b9 in IEventTarget::_DispatchEvent (this=0xaebbff8, 
    evt=0xbfa57a5c, target=0xaebbff8)
    at ../../../source/scripting/DOMEvent.cpp:66
#19 0x08328339 in IEventTarget::DispatchEvent (this=0xaebbff8, evt=0xbfa57a5c)
    at ../../../source/scripting/DOMEvent.cpp:86
#20 0x0834868f in CEntity::ProcessContactActionNoPathing (this=0xaebbf90, 
    current=0xc1749c8, timestep_millis=300)
    at ../../../source/simulation/EntityStateProcessing.cpp:516
#21 0x082cc2bc in CEntity::UpdateOrders (this=0xaebbf90, timestep=300)
    at ../../../source/simulation/Entity.cpp:577
#22 0x082cc968 in CEntity::Update (this=0xaebbf90, timestep=300)
    at ../../../source/simulation/Entity.cpp:457
#23 0x082b65cc in CEntityManager::UpdateAll (this=0x95ab9e0, timestep=300)
    at ../../../source/simulation/EntityManager.cpp:450
#24 0x0831631a in CSimulation::Simulate (this=0x9581140)
    at ../../../source/simulation/Simulation.cpp:179
#25 0x0831670b in CSimulation::Update (this=0x9581140, 
    frameTime=0.023770732805132866)
    at ../../../source/simulation/Simulation.cpp:106
#26 0x0829f6a5 in CGame::Update (this=0x95aab10, 
    deltaTime=0.023770732805132866, doInterpolate=true)
    at ../../../source/ps/Game.cpp:230
---Type <return> to continue, or q <return> to quit---
#27 0x0820f421 in Frame () at ../../../source/main.cpp:271
#28 0x0820f882 in RunGameOrAtlas (argc=1, argv=0xbfa58014)
    at ../../../source/main.cpp:397
#29 0x0820f906 in main (argc=1, argv=0xbfa58014)
    at ../../../source/main.cpp:410



Change History

comment:1 Changed 4 years ago by BadassTester

More output

gui/test/functions_sim_entity.js(254): Index out of bounds.
ERROR: JavaScript Error (gui/test/functions_sim_entity.js, line 254): Index out of bounds.
gui/test/functions_sim_entity.js(254): Invalid parameter(s) or count
ERROR: JavaScript Error (gui/test/functions_sim_entity.js, line 254): Invalid parameter(s) or count
[New Thread 0xb7f7fb90 (LWP 14802)]
[Thread 0xb7f7fb90 (LWP 14802) exited]
[New Thread 0xb7f7fb90 (LWP 14819)]
[Thread 0xb7f7fb90 (LWP 14819) exited]
[New Thread 0xb7f7fb90 (LWP 14825)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb6ab26e0 (LWP 14751)]
0x08374786 in CRenderableObject::SetDirty (this=0x0, dirtyflags=2)
    at ../../../source/graphics/RenderableObject.h:82
82			if (m_RenderData) m_RenderData->m_UpdateFlags|=dirtyflags;
(gdb) bt
#0  0x08374786 in CRenderableObject::SetDirty (this=0x0, dirtyflags=2)
    at ../../../source/graphics/RenderableObject.h:82
#1  0x083732e7 in CTerrain::FlattenArea (this=0x9582a98, x0=71.1300049, 
    x1=89.1300049, z0=561.334045, z1=579.334045)
    at ../../../source/graphics/Terrain.cpp:467
#2  0x082dc932 in CEntity::FlattenTerrain (this=0xbb9fa90)
    at ../../../source/simulation/EntityScriptInterface.cpp:932
#3  0x082e84ea in CNativeComplexFunction<CEntity, false, jsval_t, &(CEntity::FlattenTerrain(JSContext*, unsigned int, int*))>::JSFunction (cx=0x8723558, 
    obj=0xbbc0200, argc=0, argv=0xbcb85d8, rval=0xbfc74220)
    at ../../../source/scripting/ScriptableComplex.inl:468
#4  0x085277cd in js_Invoke (cx=0x8723558, argc=0, flags=0) at jsinterp.c:1187
#5  0x0853838e in js_Interpret (cx=0x8723558, pc=0xa365118 ":", 
    result=0xbfc74f48) at jsinterp.c:3586
#6  0x08527843 in js_Invoke (cx=0x8723558, argc=1, flags=2) at jsinterp.c:1207
#7  0x08527b9e in js_InternalInvoke (cx=0x8723558, obj=0xafa8570, 
    fval=171218896, flags=0, argc=1, argv=0xbfc7507c, rval=0xbfc75080)
    at jsinterp.c:1284
#8  0x084f0c98 in JS_CallFunction (cx=0x8723558, obj=0xafa8570, fun=0x8a54860, 
    argc=1, argv=0xbfc7507c, rval=0xbfc75080) at jsapi.c:4146
#9  0x082c0707 in CScriptObject::DispatchEvent (this=0xa321ce4, 
    Context=0xafa8570, evt=0xbfc7547c)
    at ../../../source/simulation/ScriptObject.cpp:126
---Type <return> to continue, or q <return> to quit---
#10 0x0832803c in IEventTarget::_DispatchEvent (this=0xa321aa8, 
    evt=0xbfc7547c, target=0xaa4a508)
    at ../../../source/scripting/DOMEvent.cpp:49
#11 0x083281b9 in IEventTarget::_DispatchEvent (this=0xa55c540, 
    evt=0xbfc7547c, target=0xaa4a508)
    at ../../../source/scripting/DOMEvent.cpp:66
#12 0x083281b9 in IEventTarget::_DispatchEvent (this=0xaa3b3b8, 
    evt=0xbfc7547c, target=0xaa4a508)
    at ../../../source/scripting/DOMEvent.cpp:66
#13 0x083281b9 in IEventTarget::_DispatchEvent (this=0xaa3a638, 
    evt=0xbfc7547c, target=0xaa4a508)
    at ../../../source/scripting/DOMEvent.cpp:66
#14 0x083281b9 in IEventTarget::_DispatchEvent (this=0xaa397d0, 
    evt=0xbfc7547c, target=0xaa4a508)
    at ../../../source/scripting/DOMEvent.cpp:66
#15 0x083281b9 in IEventTarget::_DispatchEvent (this=0xaa4a508, 
    evt=0xbfc7547c, target=0xaa4a508)
    at ../../../source/scripting/DOMEvent.cpp:66
#16 0x08328339 in IEventTarget::DispatchEvent (this=0xaa4a508, evt=0xbfc7547c)
    at ../../../source/scripting/DOMEvent.cpp:86
#17 0x0834868f in CEntity::ProcessContactActionNoPathing (this=0xaa4a4a0, 
    current=0xbc31168, timestep_millis=300)
    at ../../../source/simulation/EntityStateProcessing.cpp:516
---Type <return> to continue, or q <return> to quit---
#18 0x082cc2bc in CEntity::UpdateOrders (this=0xaa4a4a0, timestep=300)
    at ../../../source/simulation/Entity.cpp:577
#19 0x082cc968 in CEntity::Update (this=0xaa4a4a0, timestep=300)
    at ../../../source/simulation/Entity.cpp:457
#20 0x082b65cc in CEntityManager::UpdateAll (this=0x958c860, timestep=300)
    at ../../../source/simulation/EntityManager.cpp:450
#21 0x0831631a in CSimulation::Simulate (this=0x9564fc0)
    at ../../../source/simulation/Simulation.cpp:179
#22 0x0831670b in CSimulation::Update (this=0x9564fc0, 
    frameTime=0.027122937142848969)
    at ../../../source/simulation/Simulation.cpp:106
#23 0x0829f6a5 in CGame::Update (this=0x95864a8, 
    deltaTime=0.027122937142848969, doInterpolate=true)
    at ../../../source/ps/Game.cpp:230
#24 0x0820f421 in Frame () at ../../../source/main.cpp:271
#25 0x0820f882 in RunGameOrAtlas (argc=1, argv=0xbfc75a34)
    at ../../../source/main.cpp:397
#26 0x0820f906 in main (argc=1, argv=0xbfc75a34)
    at ../../../source/main.cpp:410


comment:2 Changed 4 years ago by jan

  • Keywords simple added

Thanks for the testing+reporting! (heh, you're living up to the name, I wouldn't have thought to do that :) ) Again marking this as a self-contained task suitable for OS devs..

comment:3 Changed 4 years ago by jan

  • Status changed from new to closed
  • Resolution set to fixed

(In [7183]) robustified GetPatch? / GetTile?:

  • clarify the meaning of mapSize (patchesPerSide)
  • use a single ClampCoordToMap? function for clamping
  • add annotations to all call sites when it is sure they will succeed
  • otherwise, ensure return value is checked or at least add debug_assert

fixes #311 (successfully built house and dock at top of latium map) thanks to Heron for tracking down the cause!

comment:4 Changed 3 years ago by anonymous

  • Milestone Open Source Release deleted

Milestone Open Source Release deleted

Note: See TracTickets for help on using tickets.