navit-project.org
http://forum.navit-project.org/

SDL graphics broken on RPi after 6008
http://forum.navit-project.org/viewtopic.php?f=14&t=544
Page 1 of 2

Author:  xenos1984 [ 03 Mar 2015, 22:54 ]
Post subject:  SDL graphics broken on RPi after 6008

Looks like SDL graphics is broken again... It works without problems in 6008, but in 6009 and anything that comes after that it's broken. As soon as Navit starts, it shows only a black screen, sometimes with some OSD on top of it. If I click, it shows the map and then freezes, or crashes completely.

It looks to me that the removal of some graphics drawing modes in 6009 and 6010 is causing these problems. Apparently they are used in SDL graphics on the RPi. I tried to revert these two changes and to restore the same behaviour as in 6008, but reverting all the files changed in 6009 and 6010 to their 6008 contents makes Navit crash already before the window appears. Apparently the changes coming after that cause further trouble.

Probably it's necessary to revert to 6008 and then re-implement the unrelated changes (6011, 6012, 6017).

Author:  sleske [ 09 Mar 2015, 16:26 ]
Post subject:  Re: SDL graphics broken on RPi after 6008

xenos1984 wrote:
Looks like SDL graphics is broken again... It works without problems in 6008, but in 6009 and anything that comes after that it's broken.


Ouch, that was me. I hope I have not broken something (again) :oops:.

I thought I had checked that nothing uses the stuff I removed. Anyway, I'll try to have a look.

One thing you could do to help: Could you check if the problem occurs on (desktop) Linux, too? Or is it specific to the Pi?

Author:  xenos1984 [ 09 Mar 2015, 20:18 ]
Post subject:  Re: SDL graphics broken on RPi after 6008

I just tested it with SDL graphics on Ubuntu 14.04 and it works, so the problem seems to appear only on the RPi. I will try to debug it further, so I can figure out where exactly it crashes and provide some log files.

Author:  xenos1984 [ 10 Mar 2015, 16:58 ]
Post subject:  Re: SDL graphics broken on RPi after 6008

Well, this is not overly enlightening... This is what I get when running the latest SVN (6024) on RPi, with debug level of graphics_sdl set to 5:
Code:
error:graphics_sdl:image_new:image_new on '' failed: SDL_RWFromFile(): No file or no mode specified
error:navit:navit_init:failed to connect graphics 'sdl' to gui 'internal'
error:navit:navit_init: Please see http://wiki.navit-project.org/index.php/Failed_to_connect_graphics_to_gui
error:navit:navit_init: for explanations and solutions

Author:  sleske [ 16 Mar 2015, 00:34 ]
Post subject:  Re: SDL graphics broken on RPi after 6008

Hm, that's weird. I had a look at the code, and I don't see how you could get that error.

Anyway, to narrow this down, I added some error messages to the code. Could you re-test with the latest version (rev. 6025)? Also, please run navit with option "-d 3". This will produce loads of debug output (redirect it to a file). Can you upload that log somewhere? Maybe there will be a clue.

If that does not produce a clue, I'm afraid you will have to debug the problem yourself. I have no RPi hardware to test on. We could meet on IRC to do it together if that helps.

Or you could try to reproduce the problem in some emulator - then I'll be able to help directly.

Author:  xenos1984 [ 16 Mar 2015, 20:12 ]
Post subject:  Re: SDL graphics broken on RPi after 6008

I once managed to run Navit on Raspbian with QEMU, so I will try to reproduce it - if that works out, I can also provide the image files, so you could also have a look. At the moment I'm compiling the newest SVN version on my RPi, so I can run the tests you proposed. It may take some time, because I'm at a conference at the moment, but I will have a closer look as soon as I'm back home.

Edit: Navit log with newest version and -d 3:
http://paste.ubuntu.com/10611994/
The interesting part should be after line 95752.

Author:  sleske [ 17 Mar 2015, 23:47 ]
Post subject:  Re: SDL graphics broken on RPi after 6008

xenos1984 wrote:
Edit: Navit log with newest version and -d 3:
http://paste.ubuntu.com/10611994/
The interesting part should be after line 95752.

Yes, there's the error message I just added:

error:gui_internal:gui_internal_set_graphics:
failed to obtain window from graphics plugin, cannot set graphics


However, that does not really help - I still don't see how the code could fail in that place. It looks like get_data returned "null", but get_data in SDL graphics should never do that...

xenos1984 wrote:
I once managed to run Navit on Raspbian with QEMU, so I will try to reproduce it - if that works out, I can also provide the image files, so you could also have a look.


Actually, out of curiosity I did just that. I grabbed a special kernel, and used a regular Raspbian image with QEMU (following these instructions, and using their kernel image: http://xecdesign.com/qemu-emulating-ras ... -easy-way/ ), and everything worked. I installed all the dependencies, and built Navit without major problems (just had to work around the CMake bug causing FreeType not to be found).

However, after building Navit, the SDL graphics work perfectly. So the problem must be elsewhere...

Author:  xenos1984 [ 18 Mar 2015, 22:13 ]
Post subject:  Re: SDL graphics broken on RPi after 6008

sleske wrote:
However, that does not really help - I still don't see how the code could fail in that place. It looks like get_data returned "null", but get_data in SDL graphics should never do that...

Indeed, this sounds quite strange. I'll have a look at that part of the code as soon as I have some time.
sleske wrote:
Actually, out of curiosity I did just that. I grabbed a special kernel, and used a regular Raspbian image with QEMU (following these instructions, and using their kernel image: http://xecdesign.com/qemu-emulating-ras ... -easy-way/ ), and everything worked. I installed all the dependencies, and built Navit without major problems (just had to work around the CMake bug causing FreeType not to be found).

However, after building Navit, the SDL graphics work perfectly. So the problem must be elsewhere...

Yes, that's exactly the method I used as well. So it looks like I need to provide my RPi for further testing - just let me know how I can help. I'll also try to reproduce the crash on QEMU, though - maybe I used a slightly different configuration.

Author:  sleske [ 26 Mar 2015, 16:15 ]
Post subject:  Re: SDL graphics broken on RPi after 6008

Any news? Have you been able to replicate the problem in QEMU?

Author:  xenos1984 [ 26 Mar 2015, 21:13 ]
Post subject:  Re: SDL graphics broken on RPi after 6008

I checked it with the latest Raspbian image, but I get the same result - it works, no crash. I'm not sure whether the crash is related to running on an actual RPi or to my older image version. I'll prepare a newer image which I can run on my RPi, but it can take a while.

Page 1 of 2 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/