Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bus Error on startup #1676

Open
epac-tom opened this issue Mar 28, 2024 · 3 comments
Open

Bus Error on startup #1676

epac-tom opened this issue Mar 28, 2024 · 3 comments

Comments

@epac-tom
Copy link

Background

Version of Chocolate Doom: git, master branch, 7a1f38c

Operating System and version: linux, Yocto kirkstone build

Game: (Doom/Heretic/Hexen/Strife/other) : Doom

Any loaded WADs and mods (please include full command line): freedoom2.wad

Bug description

Observed behavior: running chocolate-doom results in Bus error

root@imx8mm-var-som-enerpac:~# chocolate-doom
                         Chocolate Doom 3.0.0
Z_Init: Init zone memory allocation daemon.
zone memory: 0xffffaca9f010, 2000000 allocated for zone
Using /home/root/.local/share/chocolate-doom/ for configuration and saves
V_Init: allocate screens.
M_LoadDefaults: Load system defaults.
saving config in /home/root/.local/share/chocolate-doom/default.cfg
W_Init: Init WADfiles.
 adding /usr/share/games/doom/freedoom2.wad
===========================================================================
                           Freedoom: Phase 2
===========================================================================
 Chocolate Doom is free software, covered by the GNU General Public
 License.  There is NO warranty; not even for MERCHANTABILITY or FITNESS
 FOR A PARTICULAR PURPOSE. You are welcome to change and distribute
 copies under certain conditions. See the source for more information.
===========================================================================
I_Init: Setting up machine state.
OPL_Init: Using driver 'SDL'.
NET_Init: Init network subsystem.
M_Init: Init miscellaneous info.
R_Init: Init DOOM refresh daemon - [...............................................]
P_Init: Init Playloop state.
S_Init: Setting up sound.
I_SDL_PrecacheSounds: Precaching all sound effects.....................
D_CheckNetGame: Checking network game status.
startskill 2  deathmatch: 0  startmap: 1  startepisode: 1
player 1 of 1 (1 nodes)
Emulating the behavior of the 'Doom 1.9' executable.
HU_Init: Setting up heads up display.
ST_Init: Init status bar.
Bus error

I am building chocolate-doom on top of fsl-image-gui.
I tried building upon a more bare bones image but kept getting the following error: Error creating window for video startup: failed to create an EGL window surface. Switched to the 'full blown' image thinking that might resolve the issue.

When I start the program I briefly get a black screen before it returns to desktop

Not sure of what next steps I can take to get it working.

Expected behavior: Game loads

@turol
Copy link
Member

turol commented Mar 29, 2024

Is this some ARM processor? Getting a bus error on x86/AMD64 is quite hard but significantly easier on ARM where an unaligned memory access is sufficient.

Can you get a backtrace with gdb?

@epac-tom
Copy link
Author

epac-tom commented Apr 3, 2024

That's correct, sorry should have included that. It's a iMX8MM, specifically the VAR-SOM-MX8M-MINI

Backtrace:

Starting program: /usr/bin/chocolate-doom
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
                         Chocolate Doom 3.0.0
Z_Init: Init zone memory allocation daemon.
zone memory: 0xfffff5b0f010, 2000000 allocated for zone
Using /home/root/.local/share/chocolate-doom/ for configuration and saves
V_Init: allocate screens.
M_LoadDefaults: Load system defaults.
saving config in /home/root/.local/share/chocolate-doom/default.cfg
W_Init: Init WADfiles.
 adding /usr/share/games/doom/freedoom2.wad
===========================================================================
                           Freedoom: Phase 2
===========================================================================
 Chocolate Doom is free software, covered by the GNU General Public
 License.  There is NO warranty; not even for MERCHANTABILITY or FITNESS
 FOR A PARTICULAR PURPOSE. You are welcome to change and distribute
 copies under certain conditions. See the source for more information.
===========================================================================
I_Init: Setting up machine state.
[New Thread 0xfffff5aea120 (LWP 674)]
[New Thread 0xfffff516f120 (LWP 675)]
[New Thread 0xfffff495f120 (LWP 676)]
OPL_Init: Using driver 'SDL'.
NET_Init: Init network subsystem.
M_Init: Init miscellaneous info.
R_Init: Init DOOM refresh daemon - [...............................................]
P_Init: Init Playloop state.
S_Init: Setting up sound.
I_SDL_PrecacheSounds: Precaching all sound effects.....................
D_CheckNetGame: Checking network game status.
startskill 2  deathmatch: 0  startmap: 1  startepisode: 1
player 1 of 1 (1 nodes)
Emulating the behavior of the 'Doom 1.9' executable.
HU_Init: Setting up heads up display.
ST_Init: Init status bar.
[New Thread 0xffffe66bf120 (LWP 677)]
[New Thread 0xffffe5eaf120 (LWP 678)]

Thread 1 "chocolate-doom" received signal SIGBUS, Bus error.
0x0000000000000001 in ?? ()

@turol
Copy link
Member

turol commented Apr 4, 2024

Well that's not very helpful. It has jumped to what is effectively a misaligned null pointer.

The next thing in the log should be the initialization of graphics. So it's possible your SDL or OpenGL is broken. You can try other OpenGL/SDL2 renderer programs to see if they work. You could also test if force_software_renderer config option makes it work.

If all of that fails you need to somehow compile a version with a working stack trace. Usually this can be done by disabling all optimization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants