Or more accurately, in SDLGui_CenterDlg, but Dialog_HaltDlg is
effectively responsible for the dereference:
Thread 1 "hatari" received signal SIGSEGV, Segmentation fault.
0x0000555555fcf152 in SDLGui_CenterDlg (dlg=dlg@entry=0x5555564d2e80
<haltdlg>) at ../src/gui-sdl/sdlgui.c:224
224 dlg[0].x = (pSdlGuiScrn->w/sdlgui_fontwidth-dlg[0].w)/2;
(gdb) bt
#0 0x0000555555fcf152 in SDLGui_CenterDlg (dlg=dlg@entry=0x5555564d2e80
<haltdlg>) at ../src/gui-sdl/sdlgui.c:224
#1 0x0000555555fccdae in Dialog_HaltDlg () at ../src/gui-sdl/dlgHalt.c:75
#2 0x00005555558ebc9d in cpu_halt (id=2) at ../src/cpu/newcpu.c:6273
#3 Exception_ce000 (nr=2) at ../src/cpu/newcpu.c:3258
#4 ExceptionX (nr=nr@entry=2, address=address@entry=4294967295) at
../src/cpu/newcpu.c:4088
#5 0x00005555558ecf69 in Exception (nr=nr@entry=2) at
../src/cpu/newcpu.c:4125
#6 0x00005555558ed8c9 in bus_error () at ../src/cpu/newcpu.c:4135
#7 0x00005555558ef000 in m68k_run_1_ce () at ../src/cpu/newcpu.c:5808
#8 0x00005555558ee143 in m68k_go (may_quit=may_quit@entry=1) at
../src/cpu/newcpu.c:7640
#9 0x000055555589d814 in M68000_Start () at ../src/m68000.c:298
#10 0x000055555589eb19 in main (argc=1, argv=<optimized out>) at
../src/main.c:946
(gdb) p pSdlGuiScrn
$1 = (SDL_Surface *) 0x0
I ran into this when trying to use the TOS 2.07 Sparrow ROM with a
MegaSTE configuration on the current Mercurial tree.
Attached patch ensures we do SDLGui_SetScreen before SDLGui_CenterDlg in
Dialog_HaltDlg, which makes the dialog appear as intended.[1]
That said, any news on getting TOS 2.07 running? Just curious...
- Steven
[1] https://i.imgur.com/mF2M8Jl.png