navit-project.org

forum for navit navigation tool
It is currently 22 Jun 2017, 12:04
View unanswered posts | View active topics


All times are UTC


Forum rules


Feel free to ask anything here related to the development process - coding, creating new features, fixing bugs and custom changes of Navit.

Note: For reporting bugs, use the bug tracker.



Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: SDL graphics broken on RPi after 6008
PostPosted: 03 Mar 2015, 22:54 
Offline
User avatar

Joined: 07 Jun 2013, 17:13
Posts: 146
Location: Tartu, Estonia
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).


 Profile  
 
 Post subject: Re: SDL graphics broken on RPi after 6008
PostPosted: 09 Mar 2015, 16:26 
Offline

Joined: 23 Jun 2013, 20:15
Posts: 65
Location: Essen, Germany
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?


 Profile  
 
 Post subject: Re: SDL graphics broken on RPi after 6008
PostPosted: 09 Mar 2015, 20:18 
Offline
User avatar

Joined: 07 Jun 2013, 17:13
Posts: 146
Location: Tartu, Estonia
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.


 Profile  
 
 Post subject: Re: SDL graphics broken on RPi after 6008
PostPosted: 10 Mar 2015, 16:58 
Offline
User avatar

Joined: 07 Jun 2013, 17:13
Posts: 146
Location: Tartu, Estonia
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


 Profile  
 
 Post subject: Re: SDL graphics broken on RPi after 6008
PostPosted: 16 Mar 2015, 00:34 
Offline

Joined: 23 Jun 2013, 20:15
Posts: 65
Location: Essen, Germany
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.


 Profile  
 
 Post subject: Re: SDL graphics broken on RPi after 6008
PostPosted: 16 Mar 2015, 20:12 
Offline
User avatar

Joined: 07 Jun 2013, 17:13
Posts: 146
Location: Tartu, Estonia
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.


 Profile  
 
 Post subject: Re: SDL graphics broken on RPi after 6008
PostPosted: 17 Mar 2015, 23:47 
Offline

Joined: 23 Jun 2013, 20:15
Posts: 65
Location: Essen, Germany
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...


 Profile  
 
 Post subject: Re: SDL graphics broken on RPi after 6008
PostPosted: 18 Mar 2015, 22:13 
Offline
User avatar

Joined: 07 Jun 2013, 17:13
Posts: 146
Location: Tartu, Estonia
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.


 Profile  
 
 Post subject: Re: SDL graphics broken on RPi after 6008
PostPosted: 26 Mar 2015, 16:15 
Offline

Joined: 23 Jun 2013, 20:15
Posts: 65
Location: Essen, Germany
Any news? Have you been able to replicate the problem in QEMU?


 Profile  
 
 Post subject: Re: SDL graphics broken on RPi after 6008
PostPosted: 26 Mar 2015, 21:13 
Offline
User avatar

Joined: 07 Jun 2013, 17:13
Posts: 146
Location: Tartu, Estonia
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.


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Silver Orange 2.0.6 for IPB Designed by Skins and Hosting
Converted for phpBB3, based on Royal Blue template by BigB © 2007 2008 AEON KINGS