Descent3 icon indicating copy to clipboard operation
Descent3 copied to clipboard

Crashs on Raspberry pi 4/400 32 bit but runs ok in 64 bit

Open fac3l3ss79 opened this issue 1 year ago • 4 comments

Build Version

v1.5

Operating System Environment

  • [ ] Microsoft Windows (32-bit)
  • [ ] Microsoft Windows (64-bit)
  • [ ] Mac OS X
  • [X] Linux (specify distribution and version below)

CPU Environment

  • [ ] x86 (32-bit Intel/AMD)
  • [ ] x86_64 (64-bit Intel/AMD)
  • [X] ARM (32-bit)
  • [ ] ARM64 (64-bit; sometimes called AArch64)
  • [ ] Other (RISC V, PPC...)

Game Modes Affected

  • [ ] Single player
  • [ ] Anarchy
  • [ ] Hyper-Anarchy
  • [ ] Robo-Anarchy
  • [ ] Team Anarchy
  • [ ] Capture the Flag
  • [ ] Bounty
  • [ ] Entropy
  • [ ] Hoard
  • [ ] Monsterball
  • [ ] Cooperative

Game Environment

No response

Description

Building with compilers (clang 11, gcc 10 or 11), any version of sld2 on raspberry pi os 32 bit bullseye on a Raspeberry pi 4/400, the game crashs when starting a mission or demo with SIGNAL 7 caught, aborting. However the game compiles and runs without issue on the same system but with 64 bit OS.

Regression Status

No response

Steps to Reproduce

No response

fac3l3ss79 avatar May 08 '24 10:05 fac3l3ss79

Can you please compile in Debug and provide a gdb backtrace of the crash? That will help identify the cause. Note we now target mainly 64 bit architectures

Lgt2x avatar May 08 '24 11:05 Lgt2x

Forgot to mention that for the game to compile in raspberry pi os 32 bit I had to change mveasm.cpp. In line 2060 I changed "#define int3 asm volatile("int $3");" to "#define int3". I did this to fix a "bad instruction 'int $3'" error on the Raspberry Pi 4

fac3l3ss79 avatar May 08 '24 12:05 fac3l3ss79

Does this help?:

Thread 1 "Descent3" received signal SIGBUS, Bus error. ReadFace (ifile=0x23121b0, fp=0x90f4fd28, version=127) at /home/pi/Descent3-main/Descent3/LoadLevel.cpp:1980 1980 fp->face_uvls[i].v = cf_ReadFloat(ifile); #0 ReadFace (ifile=0x23121b0, fp=0x90f4fd28, version=127) at /home/pi/Descent3-main/Descent3/LoadLevel.cpp:1980 #1 0x001153b0 in ReadRoom (ifile=0x23121b0, rp=0x920e5c <Rooms>, version=127) at /home/pi/Descent3-main/Descent3/LoadLevel.cpp:2488 #2 0x0011b438 in LoadLevel (filename=0x12cc640 "Level1.d3l", cb_fn=0x0) at /home/pi/Descent3-main/Descent3/LoadLevel.cpp:3763 #3 0x0013301c in LoadMissionLevel (level=1) at /home/pi/Descent3-main/Descent3/Mission.cpp:1286 #4 0x000d1a78 in LoadAndStartCurrentLevel () at /home/pi/Descent3-main/Descent3/gamesequence.cpp:1689 #5 0x000d03e0 in GameSequencer () at /home/pi/Descent3-main/Descent3/gamesequence.cpp:1198 #6 0x0009edfc in PlayGame () at /home/pi/Descent3-main/Descent3/game.cpp:832 #7 0x0008e0c0 in MainLoop () at /home/pi/Descent3-main/Descent3/descent.cpp:612 #8 0x0008dee0 in Descent3 () at /home/pi/Descent3-main/Descent3/descent.cpp:562 #9 0x002902bc in oeD3LnxApp::run (this=0xbefff0a8) at /home/pi/Descent3-main/Descent3/lnxmain.cpp:245 #10 0x0028a844 in main (argc=1, argv=0xbefff274) at /home/pi/Descent3-main/Descent3/lnxmain.cpp:653 A debugging session is active.

Inferior 1 [process 21289] will be killed.

fac3l3ss79 avatar May 08 '24 13:05 fac3l3ss79

There is no doubt we have to clean up the x86 specific stuff, so the source code becomes more portable between systems. Though the Apple silicon specific fixes should be helpful for this issue since we are talking about the ARM processor here.

bryanperris avatar May 23 '24 21:05 bryanperris

I got the game working without problems on a Raspberry pi 4 64bit recently. 32 bit is not officially supported anymore, we can close this.

Lgt2x avatar Aug 14 '24 17:08 Lgt2x