Open dennwc opened 1 year ago
Another crash on a different map:
Exception 0xc0000005 0x0 0xacacaeac 0x1a1c408
PC=0x1a1c408
signal arrived during external code execution
runtime.cgocall(0x1996170, 0x101e5b34)
/go/src/runtime/cgocall.go:157 +0x58 fp=0x101e5b20 sp=0x101e5b08 pc=0xe248e8
github.com/noxworld-dev/opennox/v1/legacy._Cfunc_nox_xxx_unitClearOwner_4EC300(0x40b02c00)
_cgo_gotypes.go:10470 +0x2f fp=0x101e5b34 sp=0x101e5b20 pc=0x1356c5f
github.com/noxworld-dev/opennox/v1/legacy.Nox_xxx_unitClearOwner_4EC300.func1(0x40b02c00)
/github/workspace/src/legacy/object.go:374 +0x47 fp=0x101e5b48 sp=0x101e5b34 pc=0x1375577
github.com/noxworld-dev/opennox/v1/legacy.Nox_xxx_unitClearOwner_4EC300(0x40b02c00)
/github/workspace/src/legacy/object.go:374 +0x21 fp=0x101e5b50 sp=0x101e5b48 pc=0x1375521
github.com/noxworld-dev/opennox/v1.(*Object).SetOwner(0x40b02c00, {0x0, 0x0})
/github/workspace/src/object.go:739 +0x73 fp=0x101e5b64 sp=0x101e5b50 pc=0x1902eb3
github.com/noxworld-dev/opennox/v1.(*Server).objectDeleteFinish(0xfed6000, 0x40b02c00)
/github/workspace/src/object.go:127 +0x41 fp=0x101e5b74 sp=0x101e5b64 pc=0x19007b1
github.com/noxworld-dev/opennox/v1.(*Server).deletedObjectsUpdate(0xfed6000)
/github/workspace/src/object.go:168 +0x17d fp=0x101e5b8c sp=0x101e5b74 pc=0x1900abd
github.com/noxworld-dev/opennox/v1.(*Server).nox_xxx_gameTick_4D2580_server_B(0xfed6000, 0x88261)
/github/workspace/src/server.go:357 +0x2cb fp=0x101e5bcc sp=0x101e5b8c pc=0x193913b
github.com/noxworld-dev/opennox/v1.(*Server).nox_xxx_gameTick_4D2580_server(0xfed6000)
/github/workspace/src/game.go:734 +0x1b2 fp=0x101e5bfc sp=0x101e5bcc pc=0x18c0622
github.com/noxworld-dev/opennox/v1.(*Server).nox_xxx_gameTick_4D2580_server-fm()
<autogenerated>:1 +0x27 fp=0x101e5c08 sp=0x101e5bfc pc=0x1981b27
github.com/noxworld-dev/opennox/v1/server.(*Server).Update(...)
/github/workspace/src/server/server.go:151
github.com/noxworld-dev/opennox/v1.(*Server).Update(0xfed6000)
/github/workspace/src/server.go:119 +0x5f fp=0x101e5c2c sp=0x101e5c08 pc=0x1937edf
github.com/noxworld-dev/opennox/v1.mainloop_43E290(0x1)
/github/workspace/src/gameloop.go:158 +0x3eb fp=0x101e5cac sp=0x101e5c2c pc=0x18c7a4b
github.com/noxworld-dev/opennox/v1.mainloop_43E290(0x0)
/github/workspace/src/gameloop.go:186 +0x562 fp=0x101e5d2c sp=0x101e5cac pc=0x18c7bc2
github.com/noxworld-dev/opennox/v1.cmainLoop()
/github/workspace/src/gameloop.go:353 +0x148 fp=0x101e5d58 sp=0x101e5d2c pc=0x18c8718
github.com/noxworld-dev/opennox/v1.RunArgs({0xf80a140, 0x1, 0x1})
/github/workspace/src/main.go:452 +0x290a fp=0x101e5f88 sp=0x101e5d58 pc=0x18ed17a
main.main()
cmd/opennox/main.go:12 +0x3b fp=0x101e5fc4 sp=0x101e5f88 pc=0x198212b
runtime.main()
/go/src/runtime/proc.go:250 +0x22e fp=0x101e5ff0 sp=0x101e5fc4 pc=0xe6206e
runtime.goexit()
/go/src/runtime/asm_386.s:1326 +0x1 fp=0x101e5ff4 sp=0x101e5ff0 pc=0xe93d61
So in both cases the fault touches address 0xacacaEac
which is very close to 0xacacaCac
, used by the engine to indicate a deallocated object. So something is touching a dead object.
I was able to reproduce the first crash exactly once, but then it started failing only on the map scripts (legitimately). Then I fixed all engine crashes related to scripts, made it post console errors instead. And now I cannot trigger the (first) crash.
For now I think something happened between the moment the script sent a panic and the actual exit of the engine. Probably during that time it did touch a dead object and crashed.
Still, I'll need to investigate the second crash. Maybe it's something different.
removing these two objects stoped my crash on one map
ill test more later
I have resolved other crashes in other maps by simply relocating some waypoints as well
opennox_bot_crash.txt