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

Saving state causes segfault in xnp21kai #151

Open
DestyNova opened this issue Jul 23, 2022 · 3 comments
Open

Saving state causes segfault in xnp21kai #151

DestyNova opened this issue Jul 23, 2022 · 3 comments

Comments

@DestyNova
Copy link

I checked out the latest version (commit 2b09ea6) and installed sdlnp21kai and xnp21kai.

xnp21kai works, but exits with a segfault when I try to make a savestate (either from the "Stat" or "Debug" menus).

Here's the backtrace captured by gdb:

Thread 1 "xnp21kai" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in  ()
#1  0x00005555555f1854 in flagsave_com (tbl=<optimized out>, tbl=0x555555751de0 <np2tbl+1312>, sfh=0x5555571627d0) at /home/omf/emu/pc98/NP2kai/statsave.c:1416
#2  statsave_save_d () at /home/omf/emu/pc98/NP2kai/statsave.c:1594
#3  0x000055555569fdb5 in mainloop (p=<optimized out>) at /home/omf/emu/pc98/NP2kai/x/np2.c:351
#4  0x00007ffff7eb9c24 in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffff7f0e6f8 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007ffff7eb9293 in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007ffff79dc2d2 in gtk_main () at /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#8  0x00005555556b93d3 in gui_gtk_widget_mainloop () at /home/omf/emu/pc98/NP2kai/x/gtk2/gtk_main.c:337
#9  0x0000555555587330 in main (argc=<optimized out>, argv=<optimized out>) at /home/omf/emu/pc98/NP2kai/x/main.c:441

sdlnp21kai works, but can't upscale the screen so it's too hard to see what's happening on my laptop...

@DestyNova
Copy link
Author

DestyNova commented Jul 23, 2022

The line that seems to cause the segfault in statsave.c is this:

		flag = (COMFLAG)cm->msg(cm, COMMSG_GETFLAG, 0);

The device it's trying to save flags for is cm_rs232c, which is non-null.

@eadmaster
Copy link

same here an Android libretro.

@zk395
Copy link

zk395 commented Oct 7, 2024

I can confirm this is still an issue.

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

3 participants