MrAlert / sdlcl

SDL Compatibility Library
GNU Lesser General Public License v2.1
51 stars 5 forks source link

Jamestown requires SDL_GetWMInfo #7

Open strycore opened 7 years ago

strycore commented 7 years ago

Trying to run Jamestown and it crashes with:

./Jamestown-x86: symbol lookup error: ./Jamestown-x86: undefined symbol: SDL_GetWMInfo

Output of nm -D ./Jamestown-x86

         U SDL_CreateMutex
         U SDL_CreateThread
         U SDL_DestroyMutex
         U SDL_EnableUNICODE
         U SDL_FreeSurface
         U SDL_GetError
         U SDL_GetTicks
         U SDL_GetVideoInfo
         U SDL_GetVideoSurface
         U SDL_GetWMInfo
         U SDL_GL_SetAttribute
         U SDL_GL_SwapBuffers
         U SDL_Init
         U SDL_InitSubSystem
         U SDL_JoystickClose
         U SDL_JoystickOpen
         U SDL_JoystickOpened
         U SDL_KillThread
         U SDL_ListModes
         U SDL_LoadBMP_RW
         U SDL_mutexP
         U SDL_mutexV
         U SDL_NumJoysticks
         U SDL_PollEvent
         U SDL_PushEvent
         U SDL_Quit
         U SDL_RWFromMem
         U SDL_SetEventFilter
         U SDL_SetVideoMode
         U SDL_ShowCursor
         U SDL_VideoModeOK
         U SDL_WaitThread
         U SDL_WM_GrabInput
         U SDL_WM_SetCaption
         U SDL_WM_SetIcon
         U SDL_WM_ToggleFullScreen
086e0e00 T _ZN23ViewportSdlOpenGlWindow17SdlOglEventFilterEPK9SDL_Event
08644690 W _ZNSt6vectorIP13_SDL_JoystickSaIS1_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS1_S3_EERKS1_
strycore commented 7 years ago

Thanks for implementing that!

Now the game crashes on:

./Jamestown-x86: symbol lookup error: ./Jamestown-x86: undefined symbol: SDL_SetEventFilter

(Would you prefer to close this issue and open another one?)

MrAlert commented 7 years ago

I implemented SDL_SetEventFilter() with the event queue, so it should work now.

strycore commented 7 years ago

Great!

So it starts now but segfaults right after opening the window:

(gdb) run
Starting program: /media/data/games/jamestown/Jamestown-x86 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0xf2d37b40 (LWP 31545)]
[New Thread 0xf0119b40 (LWP 31548)]
[Thread 0xf0119b40 (LWP 31548) exited]
[New Thread 0xf0119b40 (LWP 31585)]
[New Thread 0xf00d4b40 (LWP 31586)]
[New Thread 0xcf3ffb40 (LWP 31587)]
[New Thread 0xcebfeb40 (LWP 31588)]
[New Thread 0xce1ffb40 (LWP 31589)]
[New Thread 0xcd6feb40 (LWP 31590)]
Setting breakpad minidump AppID = 94200
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561197970308221 [API loaded no]
[New Thread 0xcc8fab40 (LWP 31752)]
[S_API WARN] The loaded overlay DLL doesn't support SetNotificationPosition
[Thread 0xf00d4b40 (LWP 31586) exited]
[Thread 0xf0119b40 (LWP 31585) exited]
[Thread 0xf2d37b40 (LWP 31545) exited]

Thread 1 "Jamestown-x86" received signal SIGSEGV, Segmentation fault.
0xf2e18390 in ?? ()
(gdb) bt
#0  0xf2e18390 in ?? ()
#1  0xf7ea6f2a in update_grab () at video.c:623
#2  0xf7ea8f9f in SDL_WM_GrabInput (mode=SDL1_GRAB_OFF) at video.c:1022
#3  0x081ce6a0 in main ()
(gdb) 
strycore commented 7 years ago

With the latest update, the game crashes but the crash is caught by the game, showing an error dialog:

screenshot from 2017-05-06 19-28-23

Contents of .jamestown/Saved Games/Jamestown/ErrorLog.txt

--- Jamestown v1.0.2 (Linux [32-bit]) ---
Error: 05/06/17, 19:28:11.
---
Assertion failed: ret, "" (/home/quinn32/FinalFormGames/Jamestown/Jamestown/src/RenderContextX11OpenGl.cpp@20)

Trace:  ./Jamestown-x86(_Z8GameMainv+0x141e) [0x82b163e]
 ./Jamestown-x86(main+0x26c) [0x81ce59c]
 /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf6) [0xf7300276]
 ./Jamestown-x86() [0x81cf771]

Backtrace from gdb:

(gdb) run
Starting program: /media/data/games/jamestown/Jamestown-x86 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0xf2d42b40 (LWP 6685)]
[New Thread 0xf0123b40 (LWP 6706)]
[Thread 0xf0123b40 (LWP 6706) exited]
[New Thread 0xf0123b40 (LWP 6726)]
[New Thread 0xf00e0b40 (LWP 6727)]
[New Thread 0xcf3ffb40 (LWP 6728)]
[New Thread 0xcebfeb40 (LWP 6729)]
[New Thread 0xce1ffb40 (LWP 6730)]
[New Thread 0xcd6feb40 (LWP 6731)]
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
[Thread 0xf00e0b40 (LWP 6727) exited]
[Thread 0xf0123b40 (LWP 6726) exited]
[Thread 0xf2d42b40 (LWP 6685) exited]
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
Assertion failed: ret, "" (/home/quinn32/FinalFormGames/Jamestown/Jamestown/src/RenderContextX11OpenGl.cpp@20)

Trace:  /media/data/games/jamestown/Jamestown-x86(_Z8GameMainv+0x141e) [0x82b163e]
 /media/data/games/jamestown/Jamestown-x86(main+0x26c) [0x81ce59c]
 /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf6) [0xf7b81276]
 /media/data/games/jamestown/Jamestown-x86() [0x81cf771]

Thread 6 "Jamestown-x86" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xcf3ffb40 (LWP 6728)]
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x0864aeb4 in AudioDataSource_OggStream::Tick() ()
#2  0x086550e3 in AudioHandleMusicOpenAl::Produce() ()
#3  0x08668649 in AudioProducerThread::Exec() ()
#4  0xf78546b7 in ?? () from /usr/lib/i386-linux-gnu/libSDL2-2.0.so.0
#5  0xf78af428 in ?? () from /usr/lib/i386-linux-gnu/libSDL2-2.0.so.0
#6  0xf7e8a2f5 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#7  0xf7c526de in clone () from /lib/i386-linux-gnu/libc.so.6
(gdb) 
strycore commented 7 years ago

Deleted the game's config folder and got a different backtrace:

(gdb) run
Starting program: /media/data/games/jamestown/Jamestown-x86 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0xf2d42b40 (LWP 31059)]
[New Thread 0xf0123b40 (LWP 31098)]
[Thread 0xf0123b40 (LWP 31098) exited]
[New Thread 0xf0123b40 (LWP 31100)]
[New Thread 0xf00e0b40 (LWP 31101)]
[New Thread 0xcf3ffb40 (LWP 31102)]
[New Thread 0xcebfeb40 (LWP 31103)]
[New Thread 0xce1ffb40 (LWP 31104)]
[New Thread 0xcd6feb40 (LWP 31105)]
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
[Thread 0xf00e0b40 (LWP 31101) exited]
[Thread 0xf0123b40 (LWP 31100) exited]
[Thread 0xf2d42b40 (LWP 31059) exited]
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
Assertion failed: ret, "" (/home/quinn32/FinalFormGames/Jamestown/Jamestown/src/RenderContextX11OpenGl.cpp@20)

Trace:  /media/data/games/jamestown/Jamestown-x86(_Z8GameMainv+0x141e) [0x82b163e]
 /media/data/games/jamestown/Jamestown-x86(main+0x26c) [0x81ce59c]
 /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf6) [0xf7b81276]
 /media/data/games/jamestown/Jamestown-x86() [0x81cf771]

Thread 9 "Jamestown-x86" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xcd6feb40 (LWP 31105)]
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x083c3288 in LibrarySectionTexture::PreloadThreadUpdate() ()
#2  0x083c371b in TexturePreloadThread::Exec() ()
#3  0xf78546b7 in ?? () from /usr/lib/i386-linux-gnu/libSDL2-2.0.so.0
#4  0xf78af428 in ?? () from /usr/lib/i386-linux-gnu/libSDL2-2.0.so.0
#5  0xf7e8a2f5 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#6  0xf7c526de in clone () from /lib/i386-linux-gnu/libc.so.6
(gdb) 
strycore commented 7 years ago

With info->info.x11.gfxdisplay = info2.info.x11.display; in video.c the game shows a black screen (the music can be heard in the background).

There is no crash except when quitting the game:

(gdb) bt
#0  0x00000000 in ?? ()
#1  0x083c3288 in LibrarySectionTexture::PreloadThreadUpdate() ()
#2  0x083c371b in TexturePreloadThread::Exec() ()
#3  0xf78546b7 in ?? () from /usr/lib/i386-linux-gnu/libSDL2-2.0.so.0
#4  0xf78af428 in ?? () from /usr/lib/i386-linux-gnu/libSDL2-2.0.so.0
#5  0xf7e8a2f5 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#6  0xf7c526de in clone () from /lib/i386-linux-gnu/libc.so.6