dethrace-labs / dethrace

Reverse engineering the 1997 game "Carmageddon"
https://twitter.com/dethrace_labs
GNU General Public License v3.0
870 stars 46 forks source link

SIGABRT in BRender code while ingame #379

Closed juozaspo closed 5 months ago

juozaspo commented 5 months ago

This is different crash compared to the one described in #378, here it crash in BRender code, the first known function is BrGetEnv as shown in backtrace. Dethrace was compiled on Ubuntu 22.04 LTS with default cmake configuration. Data files are from steam release, full log below like in previous issue:

Dethrace version: v0.7.1-5-g673244b
[INFO] Harness_Init DETHRACE_ROOT_DIR is set to '/home/juozas/Games/CARMA'
Using root directory: /home/juozas/Games/CARMA
Game mode: Carmageddon
[WARN] S3StopMIDIOutlets stubbed
[WARN] S3StopCDAOutlets stubbed
[WARN] DRSceneRayPick2D Missing material and model pointers to ActorRayPick2D

******************
Caught SIGABRT
******************

Stack trace:
0: ?? ??:0
1: ?? ??:0
2: ?? ??:0
3: BrGetEnv at /home/juozas/dethrace/lib/BRender-v1.3.2/core/std/stdlib.c:111
4: TriangleRender_ZT_I8_D16_8 at /home/juozas/dethrace/lib/BRender-v1.3.2/drivers/pentprim/zb8p2unl.c:390
5: V1Face_OS_Render at /home/juozas/dethrace/lib/BRender-v1.3.2/drivers/softrend/v1model.c:501
6: V1Model_Render at /home/juozas/dethrace/lib/BRender-v1.3.2/drivers/softrend/v1model.c:966 (discriminator 3)
7: _M_br_geometry_v1_model_soft_renderOnScreen at /home/juozas/dethrace/lib/BRender-v1.3.2/drivers/softrend/v1model.c:1014
8: renderFaces at /home/juozas/dethrace/lib/BRender-v1.3.2/core/v1db/modrend.c:38
9: BrDbModelRender at /home/juozas/dethrace/lib/BRender-v1.3.2/core/v1db/render.c:172
10: actorRender at /home/juozas/dethrace/lib/BRender-v1.3.2/core/v1db/render.c:368
11: actorRender at /home/juozas/dethrace/lib/BRender-v1.3.2/core/v1db/render.c:408 (discriminator 3)
12: sceneRenderAdd at /home/juozas/dethrace/lib/BRender-v1.3.2/core/v1db/render.c:613
13: BrZbSceneRenderAdd at /home/juozas/dethrace/lib/BRender-v1.3.2/core/v1db/render.c:873 (discriminator 3)
14: DrawColumns at /home/juozas/dethrace/src/DETHRACE/common/brucetrk.c:387
15: RenderTrack at /home/juozas/dethrace/src/DETHRACE/common/brucetrk.c:495
16: ProcessTrack at /home/juozas/dethrace/src/DETHRACE/common/world.c:2984
17: RenderAFrame at /home/juozas/dethrace/src/DETHRACE/common/graphics.c:1679
18: MainGameLoop at /home/juozas/dethrace/src/DETHRACE/common/mainloop.c:595
19: DoRace at /home/juozas/dethrace/src/DETHRACE/common/mainloop.c:725
20: DoGame at /home/juozas/dethrace/src/DETHRACE/common/structur.c:575
21: DoProgram at /home/juozas/dethrace/src/DETHRACE/common/structur.c:683
22: GameMain at /home/juozas/dethrace/src/DETHRACE/common/main.c:124
23: original_main at /home/juozas/dethrace/src/DETHRACE/pc-win95/win95sys.c:958
24: main at /home/juozas/dethrace/src/DETHRACE/main.c:49
25: ?? ??:0
26: ?? ??:0

Commit: 673244bb8c19cdd3041bfd69e0891c504f58757a BRender commit: dethrace-labs/BRender-v1.3.2@9b6c6d99822f37ad226043b305669fa835822ae0 OS: Ubuntu 22.04 LTS, cmake 3.29.5 from kitware repository, gcc 11.4.0

madebr commented 5 months ago

TriangleRender_ZT_I8_D16_8 is unimplemented, and aborts immediately. See https://github.com/dethrace-labs/dethrace/issues/375

It looks like our stacktrace generator messes up somehow.

juozaspo commented 5 months ago

This is a duplicate to #375, closing.