#14572 closed defect (fixed)

HPL1: crash after breaking the ice in level "Lake Utuqaq"

Reported by: grisenti Owned by: grisenti
Priority: normal Component: Engine: HPL1
Version: Keywords:
Cc: Game:

Description

In the "Lake Utuqaq" level, if the player breaks the ice, the program crashes in file "hpl1/engine/libraries/newton/core/dgAABBPolygonSoup.cpp" at line 1347 from an invalid array access.

Attachments (1)

saves.zip (48.3 KB ) - added by grisenti 15 months ago.

Download all attachments as: .zip

Change History (5)

by grisenti, 15 months ago

Attachment: saves.zip added

comment:1 by digitall, 13 months ago

Have replicated this crash on the latest Git master i.e. 1091e82ed30e97347e30f5b8e9ca8f6011c98396 on Linux x86_64 using the savegame provided.

To trigger the bug, just walk to the right of the wooden shed onto the frozen lake until a section where the ice gives way under you. The segfault then occurs at
Thread 1 "scummvm" received signal SIGSEGV, Segmentation fault.
0x0000555557b4274d in dgAABBPolygonSoup::GetNodeAABB (this=0x5555629e0be0,

root=0x0, p0=..., p1=...)
at engines/hpl1/engine/libraries/newton/core/dgAABBPolygonSoup.cpp:1343

1343 vertex[node->m_minIndex].m_z, dgFloat32(0.0f));

comment:2 by digitall, 13 months ago

Added some assertions on a test build. node is NULL ... Will look at adding some code to catch this and print a warning instead of assertion crash or segfault

comment:3 by digitall, 13 months ago

Backtrace from crash is:

#5  0x0000555557b42778 in dgAABBPolygonSoup::GetNodeAABB (this=0x555562a4ed60, root=0x0, p0=..., p1=...) at engines/hpl1/engine/libraries/newton/core/dgAABBPolygonSoup.cpp:1342
#6  0x00005555579f3d32 in dgCollisionCompound::CalculateContactsToCollisionTree (this=0x5555610ac380, pair=0x5555611eaff0, proxy=..., useSimd=0) at engines/hpl1/engine/libraries/newton/physics/dgCollisionCompound.cpp:1732
#7  0x00005555579f222e in dgCollisionCompound::CalculateContacts (this=0x5555610ac380, pair=0x5555611eaff0, proxy=..., useSimd=0) at engines/hpl1/engine/libraries/newton/physics/dgCollisionCompound.cpp:1451
#8  0x0000555557a757a8 in dgWorld::CompoundContacts (this=0x55556101e540, pair=0x5555611eaff0, proxy=...) at engines/hpl1/engine/libraries/newton/physics/dgNarrowPhaseCollision.cpp:1477
#9  0x0000555557a76f1a in dgWorld::CalculateContacts (this=0x55556101e540, pair=0x5555611eaff0, timestep=0.0166666657, threadIndex=0) at engines/hpl1/engine/libraries/newton/physics/dgNarrowPhaseCollision.cpp:1850
#10 0x00005555579e1512 in dgBroadPhaseCalculateContactsWorkerThread::ThreadExecute (this=0x55556101ec28) at engines/hpl1/engine/libraries/newton/physics/dgBroadPhaseCollision.cpp:849
#11 0x00005555579e4b3f in dgBroadPhaseCollision::UpdateContacts (this=0x55556101e570, timestep=0.0166666657, collisioUpdate=false) at engines/hpl1/engine/libraries/newton/physics/dgBroadPhaseCollision.cpp:1597
#12 0x0000555557a7ed45 in dgWorld::Update (this=0x55556101e540, timestep=0.0166666657) at engines/hpl1/engine/libraries/newton/physics/dgWorld.cpp:612
#13 0x00005555579cee3d in Newton::UpdatePhysics (this=0x55556101e540, timestep=0.0166666657) at engines/hpl1/engine/libraries/newton/NewtonClass.cpp:92
#14 0x00005555579c1861 in NewtonUpdate (newtonWorld=0x55556101e540, timestep=0.0166666657) at engines/hpl1/engine/libraries/newton/Newton.cpp:659
#15 0x00005555578ac9f7 in hpl::cPhysicsWorldNewton::Simulate (this=0x5555603d11c0, afTimeStep=0.0166666657) at engines/hpl1/engine/impl/PhysicsWorldNewton.cpp:119
#16 0x00005555578e63e7 in hpl::iPhysicsWorld::Update (this=0x5555603d11c0, afTimeStep=0.0166666657) at engines/hpl1/engine/physics/PhysicsWorld.cpp:109
#17 0x000055555793fb63 in hpl::cWorld3D::Update (this=0x55555ff9a750, afTimeStep=0.0166666657) at engines/hpl1/engine/scene/World3D.cpp:159
#18 0x000055555792b84c in hpl::cScene::Update (this=0x55555f26de40, afTimeStep=0.0166666657) at engines/hpl1/engine/scene/Scene.cpp:328
#19 0x00005555578308e3 in hpl::cUpdater::Update (this=0x55555fa9b050, afTimeStep=0.0166666657) at engines/hpl1/engine/game/Updater.cpp:180
#20 0x000055555781f1dd in hpl::cGame::Run (this=0x55555f9c8c80) at engines/hpl1/engine/game/Game.cpp:340
#21 0x0000555557770c34 in cInit::Run (this=0x55555f12bfa0) at engines/hpl1/penumbra-overture/Init.cpp:433
#22 0x000055555776d061 in Hpl1::Hpl1Engine::run (this=0x55555f213780) at engines/hpl1/hpl1.cpp:76
#23 0x000055555619b99e in runGame (plugin=0x55555e4572e0, enginePlugin=0x55555e3d6b40, system=..., debugLevels=...) at base/main.cpp:324
#24 0x000055555619dbe1 in scummvm_main (argc=1, argv=0x7fffffffd758) at base/main.cpp:767
#25 0x00005555561989aa in main (argc=1, argv=0x7fffffffd758) at backends/platform/sdl/posix/posix-main.cpp:44
Last edited 13 months ago by digitall (previous) (diff)

comment:4 by grisenti, 13 months ago

Owner: set to grisenti
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.