ocornut / meka

MEKA - Sega 8-bit emulator with debugging/hacking tools
http://www.smspower.org/meka
301 stars 49 forks source link

Segmentation fault #69

Open musuruan opened 3 years ago

musuruan commented 3 years ago

I didn't use meka for quite some time. This was likely the first time I tried it under Fedora 33/x86_64.

Most of the times I start meka-20210726 I get a segmentation fault.

Backtrace:

Thread 1 "meka" received signal SIGSEGV, Segmentation fault.
0x00007ffff7a13ab5 in __memcpy_ssse3 () from /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff7a13ab5 in __memcpy_ssse3 () from /lib64/libc.so.6
#1  0x00007fffe460d16e in st_TexSubImage () from /usr/lib64/dri/nouveau_dri.so
#2  0x00007fffe479fbd7 in texture_sub_image ()
   from /usr/lib64/dri/nouveau_dri.so
#3  0x00007fffe47a2e9c in texsubimage_err () from /usr/lib64/dri/nouveau_dri.so
#4  0x00007fffe47a8ac9 in _mesa_TexSubImage2D ()
   from /usr/lib64/dri/nouveau_dri.so
#5  0x00007ffff7f07742 in _al_ogl_unlock_region_new ()
   from /lib64/liballegro.so.5.2
#6  0x00007ffff7e87f73 in al_unlock_bitmap () from /lib64/liballegro.so.5.2
#7  0x0000000000440054 in TileViewer_Update (app=<optimized out>)
    at app_tileview.cpp:226
#8  gui_update_applets () at g_update.cpp:49
#9  0x0000000000415a4d in Video_RefreshScreen () at video.cpp:436
#10 0x000000000041c6fd in Main_Loop_No_Emulation () at mainloop.cpp:108
#11 Main_Loop () at mainloop.cpp:68
#12 0x0000000000408465 in main (argc=<optimized out>, argv=<optimized out>)
    at meka.cpp:434

I also downgraded to meka-20191213 and I have the same behaviour.

bodhi-baum commented 3 years ago

Same here on Linux Mint.

MEKA 0.80-alpha (c) 1998-2019 Omar Cornut (Bock) and contributors

Loading MEKA.MSG (messages).. Initializing Allegro... version 5.2.7 (release 1) Loading /home/bodhi/Test/Konsolen/Sega/meka-meka-20210726/meka/meka.cfg (configuration)... Loading MEKA.NAM (games names)... Loading MEKA.PAT (patches)... Loading MEKA.FDB (filenames database)...File not found! Loading MEKA.THM (interface themes)... Loading MEKA.BLT (video modes / blitters)... Loading MEKA.INP (inputs sources definition)... Loading MEKA.DAT (resources)... Initializing sound system...

musuruan commented 2 years ago

Same issue with meka.20220327 on Fedora 35/x86_64.

bodhi-baum commented 2 years ago

Any new hints on this?

Strugglemeat commented 1 year ago

I had the same issue, it compiles correctly under Manjaro, loads, and then

Initializing joystick...none found.
[READY]
--
Initializing graphical user interface...
Initializing debugger...
zsh: segmentation fault (core dumped)  ./meka
BlastlessAnthony commented 1 year ago

I'm also having this same issue on Kubuntu Linux too. I can see the UI for a few seconds before it crashes. Maybe its a memory leak issue or a bug with GLIBC?

Log:

MEKA 0.80-alpha (c) 1998-2019 Omar Cornut (Bock) and contributors
--
Loading MEKA.MSG (messages).. 
Initializing Allegro... version 5.2.8 (release 1)
Loading /home/anthonyj/meka/meka/meka.cfg (configuration)...
Loading MEKA.NAM (games names)...
Loading MEKA.PAT (patches)...
Loading MEKA.FDB (filenames database)...File not found!
Loading MEKA.THM (interface themes)...
Loading MEKA.BLT (video modes / blitters)...
Loading MEKA.INP (inputs sources definition)...
Loading MEKA.DAT (resources)...
Initializing sound system...
 - Initializing sound card @ 44100 Hz
 - SN76496 digital emulator: Ok
 - YM2413 digital emulator: Ok
Initializing joystick...1 found.
[READY]
--
Initializing graphical user interface...
Initializing debugger...
[1]    382149 segmentation fault (core dumped)  ./meka

System Info (Taken from neofetch)

           `.:/ossyyyysso/:.               anthonyj@anthonys-workstation 
        .:oyyyyyyyyyyyyyyyyyyo:`           ----------------------------- 
      -oyyyyyyyodMMyyyyyyyysyyyyo-         OS: Kubuntu 23.04 x86_64 
    -syyyyyyyyyydMMyoyyyydmMMyyyyys-       Host: B450 AORUS PRO WIFI 
   oyyysdMysyyyydMMMMMMMMMMMMMyyyyyyyo     Kernel: 6.2.0-27-generic 
 `oyyyydMMMMysyysoooooodMMMMyyyyyyyyyo`    Uptime: 1 day, 13 hours, 45 mins 
 oyyyyyydMMMMyyyyyyyyyyyysdMMysssssyyyo    Packages: 3502 (dpkg), 26 (flatpak), 11 (snap) 
-yyyyyyyydMysyyyyyyyyyyyyyysdMMMMMysyyy-   Shell: zsh 5.9 
oyyyysoodMyyyyyyyyyyyyyyyyyyydMMMMysyyyo   Resolution: 1920x1080, 1920x1080 
yyysdMMMMMyyyyyyyyyyyyyyyyyyysosyyyyyyyy   DE: Plasma 5.27.7 
yyysdMMMMMyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy   WM: KWin 
oyyyyysosdyyyyyyyyyyyyyyyyyyydMMMMysyyyo   Theme: [Plasma], Breeze-Dark [GTK2/3] 
-yyyyyyyydMysyyyyyyyyyyyyyysdMMMMMysyyy-   Icons: [Plasma], breeze-dark [GTK2/3] 
 oyyyyyydMMMysyyyyyyyyyyysdMMyoyyyoyyyo    Terminal: yakuake 
 `oyyyydMMMysyyyoooooodMMMMyoyyyyyyyyo     CPU: AMD Ryzen 7 1700X (16) @ 3.000GHz 
   oyyysyyoyyyysdMMMMMMMMMMMyyyyyyyyo      GPU: AMD ATI Radeon RX 470/480/570/570X/580/580X/590 
    -syyyyyyyyydMMMysyyydMMMysyyyys-       Memory: 12008MiB / 32025MiB 
      -oyyyyyyydMMyyyyyyysosyyyyo-
        ./oyyyyyyyyyyyyyyyyyyo/.                                   
           `.:/oosyyyysso/:.`                                      
bodhi-baum commented 11 months ago

Just to inform you: With Meka 2023-08-26 all works fine here.

Strugglemeat commented 11 months ago

I just cloned and made and have the same segfault issue as before, nothing has changed 6.1.44-1-MANJARO

seadra commented 7 months ago

Same crash on Arch Linux, with both and and the git version.

The line g_display = al_create_display(w, h); in video.cpp causes the crash

bodhi-baum commented 7 months ago

I can confirm this at Linux Mint 21.3