mgerhardy / caveexpress

CaveExpress is a classic 2D platformer with physics-based gameplay and dozens of levels. CavePacker is a Sokoban game.
http://www.caveproductions.org/
Other
144 stars 20 forks source link

Game doesn't start @16bpp #26

Closed MagaTailor closed 8 years ago

MagaTailor commented 9 years ago

If 24bpp is required a more informative error message would come in handy :)

On the arm/gles platform I'm getting this:

INFO: (LOG_CLIENT): current desktop mode: 1280x1024@59Hz (SDL_PIXELFORMAT_RGB565)
ERROR: (LOG_CLIENT): unknown error (/media/odroid/caveexpress/src/modules/gfx/SDLFrontend.cpp:701 => virtual void SDLFrontend::setGLAttributes())
ERROR: (LOG_CLIENT): unknown error (/media/odroid/caveexpress/src/modules/gfx/SDLFrontend.cpp:703 => virtual void SDLFrontend::setGLAttributes())
ERROR: (LOG_CLIENT): unknown error (/media/odroid/caveexpress/src/modules/gfx/SDLFrontend.cpp:705 => virtual void SDLFrontend::setGLAttributes())
ERROR: (LOG_CLIENT): unknown error (/media/odroid/caveexpress/src/modules/gfx/SDLFrontend.cpp:715 => virtual void SDLFrontend::setGLAttributes())
ERROR: (LOG_CLIENT): unknown error (/media/odroid/caveexpress/src/modules/gfx/SDLFrontend.cpp:717 => virtual void SDLFrontend::setGLAttributes())
ERROR: (LOG_CLIENT): unknown error (/media/odroid/caveexpress/src/modules/gfx/SDLFrontend.cpp:719 => virtual void SDLFrontend::setGLAttributes())
INFO: (LOG_CLIENT): doublebuffer: disabled
INFO: (LOG_CLIENT): available driver: x11
INFO: (LOG_CLIENT): available driver: mir
INFO: (LOG_CLIENT): available driver: dummy
INFO: (LOG_CLIENT): driver: x11
INFO: (LOG_CLIENT): found 1 display(s)
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  4 (X_DestroyWindow)
  Resource id in failed request:  0x3000002
  Serial number of failed request:  154
  Current serial number in output stream:  154
mgerhardy commented 9 years ago

Weird - I'm exactly using the same depth and color mode on my android phones. Will check it out.

MagaTailor commented 9 years ago

Turns out it's not platform specific, on x86 OpenGL 1.4 I managed to actually get this:

INFO: (LOG_CLIENT): Use frontend sdl
INFO: (LOG_BACKEND): next init state: 2
INFO: (LOG_BACKEND): init sdl
INFO: (LOG_BACKEND): next init state: 3
INFO: (LOG_BACKEND): init frontend
INFO: (LOG_CLIENT): initializing: -1:-1 - fullscreen: true
INFO: (LOG_CLIENT): no joysticks found
INFO: (LOG_CLIENT): found 0 touch device(s)
INFO: (LOG_CLIENT): 0 haptic devices
INFO: (LOG_CLIENT): no rumble support
INFO: (LOG_CLIENT): current desktop mode: 1280x1024@50Hz (SDL_PIXELFORMAT_RGB565)
ERROR: (LOG_CLIENT): unknown error (/home/petevine/caveexpress/src/modules/gfx/SDLFrontend.cpp:701 => virtual void SDLFrontend::setGLAttributes())
ERROR: (LOG_CLIENT): unknown error (/home/petevine/caveexpress/src/modules/gfx/SDLFrontend.cpp:703 => virtual void SDLFrontend::setGLAttributes())
ERROR: (LOG_CLIENT): unknown error (/home/petevine/caveexpress/src/modules/gfx/SDLFrontend.cpp:705 => virtual void SDLFrontend::setGLAttributes())
ERROR: (LOG_CLIENT): unknown error (/home/petevine/caveexpress/src/modules/gfx/SDLFrontend.cpp:715 => virtual void SDLFrontend::setGLAttributes())
ERROR: (LOG_CLIENT): unknown error (/home/petevine/caveexpress/src/modules/gfx/SDLFrontend.cpp:717 => virtual void SDLFrontend::setGLAttributes())
ERROR: (LOG_CLIENT): unknown error (/home/petevine/caveexpress/src/modules/gfx/SDLFrontend.cpp:719 => virtual void SDLFrontend::setGLAttributes())
INFO: (LOG_CLIENT): doublebuffer: disabled
INFO: (LOG_CLIENT): available driver: x11
INFO: (LOG_CLIENT): available driver: dummy
INFO: (LOG_CLIENT): driver: x11
INFO: (LOG_CLIENT): found 1 display(s)
ERROR: (LOG_CLIENT): Couldn't find matching GLX visual (/home/petevine/caveexpress/src/modules/gfx/SDLFrontend.cpp:583 => virtual int SDLFrontend::init(int, int, bool, EventHandler&))
ERROR: (LOG_CLIENT): Failed to initialize the frontend
INFO: (LOG_BACKEND): next init state: 10
INFO: (LOG_BACKEND): next init state: 10
INFO: (LOG_BACKEND): Run the game at 60.000000 frames per second
INFO: (LOG_GENERAL): switching to loopback
[New Thread 0xb7c83b40 (LWP 23535)]

Program received signal SIGSEGV, Segmentation fault.
0x0831a1ce in ServiceProvider::updateNetwork (this=0xbfffea90, network=false) at /home/petevine/caveexpress/src/modules/service/ServiceProvider.cpp:44
44              _currentNetwork->init();
#0  0x0831a1ce in ServiceProvider::updateNetwork (this=0xbfffea90, network=false) at /home/petevine/caveexpress/src/modules/service/ServiceProvider.cpp:44
#1  0x082a230f in SDLBackend::mainLoop (this=0xbfffea14, argc=1, argv=0xbfffebb4) at /home/petevine/caveexpress/src/modules/server/SDLBackend.cpp:372
#2  0x082356bc in main (argc=1, argv=0xbfffebb4) at /home/petevine/caveexpress/src/Main.cpp:28

Everything's fine @24bpp.

mgerhardy commented 9 years ago

hopefully it's fixed. The crash looks different though.

i am now trying to set the desktop mode - if that doesn't work, i will pick 24 bits as default.

MagaTailor commented 9 years ago

Unfortunately on x86, I can't get it to run at either depth now :(

INFO: (LOG_CLIENT): no rumble support
INFO: (LOG_CLIENT): current desktop mode: 1280x1024@50Hz (SDL_PIXELFORMAT_RGB888)
INFO: (LOG_CONFIG): red => changed value to: 16711680
INFO: (LOG_CONFIG): green => changed value to: 65280
INFO: (LOG_CONFIG): blue => changed value to: 255
ERROR: (LOG_CLIENT): unknown error (/home/petevine/caveexpress/src/modules/gfx/SDLFrontend.cpp:724 => virtual void SDLFrontend::setGLAttributes())
ERROR: (LOG_CLIENT): unknown error (/home/petevine/caveexpress/src/modules/gfx/SDLFrontend.cpp:726 => virtual void SDLFrontend::setGLAttributes())
ERROR: (LOG_CLIENT): unknown error (/home/petevine/caveexpress/src/modules/gfx/SDLFrontend.cpp:728 => virtual void SDLFrontend::setGLAttributes())
ERROR: (LOG_CLIENT): unknown error (/home/petevine/caveexpress/src/modules/gfx/SDLFrontend.cpp:730 => virtual void SDLFrontend::setGLAttributes())
ERROR: (LOG_CLIENT): unknown error (/home/petevine/caveexpress/src/modules/gfx/SDLFrontend.cpp:732 => virtual void SDLFrontend::setGLAttributes())
ERROR: (LOG_CLIENT): unknown error (/home/petevine/caveexpress/src/modules/gfx/SDLFrontend.cpp:734 => virtual void SDLFrontend::setGLAttributes())
INFO: (LOG_CLIENT): doublebuffer: disabled
INFO: (LOG_CLIENT): available driver: x11
INFO: (LOG_CLIENT): available driver: dummy
INFO: (LOG_CLIENT): driver: x11
INFO: (LOG_CLIENT): found 1 display(s)
ERROR: (LOG_CLIENT): Couldn't find matching GLX visual (/home/petevine/caveexpress/src/modules/gfx/SDLFrontend.cpp:606 => virtual int SDLFrontend::init(int, int, bool, EventHandler&))
    ERROR: (LOG_CLIENT): Failed to initialize the frontend
MagaTailor commented 9 years ago

As you can guess the only difference on arm is this:

ERROR: (LOG_CLIENT): Could not create GLES window surface (/home/odroid/caveexpress/src/modules/gfx/SDLFrontend.cpp:606 => virtual int SDLFrontend::init(int, int, bool, EventHandler&))
mgerhardy commented 9 years ago

i've changed this back now - that was a major fuckup from my side. Those were not the rgb bit depth values but the color masks.... urg...

anyway. Please make sure to wipe the invalid values from your config.lua (~/.local/share/$GAMENAME$/config.lua)

afterwards you can try to start the game with ./caveexpress -set red 6 -set green 5 -set blue 6 (or whatever color depths you want)

And again - thanks a lot for the feedback and the testing, much appreciated.

MagaTailor commented 9 years ago

Glad to be of help! I'm still trying ( due to issue #21) to see what this game is about ;)

As to the latest changes, even after wiping the config files, the game doesn't start without explicitly supplying r:5 g:6 b:5 (with those values) @16bpp on the first run whereas other depths are correctly detected.

It's completely fine with me but probably a little much for ordinary users who would just follow build instructions.

MagaTailor commented 9 years ago

Just noticed, on Arm, the keys are not working anymore, only the mouse.

Btw, even though not caveexpress specific, I've been puzzled by this issue - could you please look at the screenshot and tell me what's going on? This only happens @24bpp in other SDL2/GLES apps as well. Could it be a Mali binary driver issue?

image1

MagaTailor commented 9 years ago

The keys are working again in the latest master so if you've no idea what this visual glitch could be about I'll be removing these entries - allright?

mgerhardy commented 9 years ago

Please leave it open - I'm sure I'll find a solution. Or at least track the stuff here for then being able to create a detailed sdl2 bug ticket.

MagaTailor commented 9 years ago

It's also happening with glshim (OpenGL 1.x to GLESv1 wrapper) in SDL 1.2 apps @24 bpp so it's definitely the crappy Mali driver.