aerostitch / testnavit

0 stars 0 forks source link

Navit crashes after klicking Town search when using Marco Polo Reiseplaner Maps #288

Open aerostitch opened 8 years ago

aerostitch commented 8 years ago

Issue migrated from trac ticket # 1337

component: core | priority: major

2015-12-14 08:08:15: amarius4711.livejournal.com created the issue


Navit crashes after klicking Town search but only when GPS-USB receiver is connected and only with Reiseplaner Maps. With OSM Maps no crash. I use Marco Polo Reiseplaner 2007/2008 maps and have compiled a latest Version of Navit on Ubuntu 14.04 (trusty).

aerostitch commented 8 years ago

2015-12-15 12:20:51: tryagain commented


I'm afraid there are no currently active team members who has a copy of Marco Polo Reiseplaner 2007/2008 maps, so no recent changes were tested for compatibility with these maps.

Does it crash as soon as you enter into Town search dialogue, or only when you enter a letter (or a few letters)?

Does disconnecting the GPS-USB receiver prevent Navit from crashing? Do you have an active route at the time of crash? The does it crash if you press "Abort navigation" before entering Town search?

Try running Navit under valgrind or gdb, maybe this would help getting more informative stack trace.

aerostitch commented 8 years ago

2015-12-18 02:45:24: amarius4711.livejournal.com commented


Hi,

Q: Does it crash as soon as you enter into Town search dialogue, or only when you enter a letter (or a few letters)? A: It crashes as soon as I enter into Town search dialogue.

Q: Does disconnecting the GPS-USB receiver prevent Navit from crashing? A1: When disconnecting the GPS-USB receiver while Navit is running and then enter into town search it still crashes. When disconnecting the GPS-USB receiver before starting Navit it doesn't crash.

Q: Do you have an active route at the time of crash? The does it crash if you press "Abort navigation" before entering Town search? A: No difference if active route or not - always crashes.

Some output from gdb:

31    ../sysdeps/unix/sysv/linux/waitpid.c: Datei oder Verzeichnis nicht gefunden.
#0  0x00007fc68130db4c in __libc_waitpid (pid=2666, stat_loc=stat_loc@entry=0x7ffd4a3c7d40, options=options@entry=0)
    at ../sysdeps/unix/sysv/linux/waitpid.c:31
#1  0x00007fc6812932e2 in do_system (line=line@entry=0x7ffd4a3c7ea0 "gdb -ex bt ./navit 2661") at ../sysdeps/posix/system.c:148
#2  0x00007fc68129364a in __libc_system (line=line@entry=0x7ffd4a3c7ea0 "gdb -ex bt ./navit 2661") at ../sysdeps/posix/system.c:184
#3  0x00007fc68204d235 in system (line=line@entry=0x7ffd4a3c7ea0 "gdb -ex bt ./navit 2661") at pt-system.c:28
#4  0x000000000042070c in sigsegv (sig=<optimized out>) at .../navit/debug.c:83
#5  <signal handler called>
#6  strlen () at ../sysdeps/x86_64/strlen.S:106
#7  0x000000000042ddef in linguistics_casefold (in=0x114 <error: Cannot access memory at address 0x114>)
    at .../navit/linguistics.c:291
#8  0x00000000004514df in country_search_new (search=search@entry=0x7ffd4a3c8520, partial=partial@entry=0)
    at .../navit/country.c:365
#9  0x00007fc678e09b64 in gui_internal_search_list_set_default_country (this=0xdd58e0)
    at .../navit/gui/internal/gui_internal_search.c:451
#10 gui_internal_search_list_new (this=0xdd58e0, this@entry=0x7ffd4a3c8520)
    at .../navit/gui/internal/gui_internal_search.c:485
#11 gui_internal_search (this=this@entry=0xdd58e0, what=0x7fc68247217e "Ort", type=type@entry=0x7fc678e0fc5b "Town", flags=flags@entry=1)
    at .../navit/gui/internal/gui_internal_search.c:504
#12 0x00007fc678e042ad in gui_internal_cmd2_town (function=0x7ffd4a3c88b0 "town", in=<optimized out>, out=0x7ffd4a3c88d8, 
    valid=<optimized out>, this=0xdd58e0) at .../navit/gui/internal/gui_internal_command.c:305
#13 gui_internal_cmd2 (this=0xdd58e0, function=<optimized out>, in=0x0, out=0x7ffd4a3c88d8, valid=<optimized out>)
    at .../navit/gui/internal/gui_internal_command.c:1187
#14 0x000000000041abc7 in command_table_call (table=0x7fc679015db0 <commands+368>, count=<optimized out>, data=0xdd58e0, 
    command=0x7ffd4a3c88b0 "town", in=0x0, out=0x7ffd4a3c88d8, valid=0x7ffd4a3c88d4)
    at .../navit/command.c:1605
#15 0x000000000041a599 in callback_call (cb=0xdd9390, pcount=4, p=0x7ffd4a3c8800) at .../navit/callback.c:166
#16 0x000000000041a830 in callback_list_call_attr (l=0x114, type=attr_command, pcount=4, p=0x7ffd4a3c8800)
    at .../navit/callback.c:229
#17 0x000000000041a8fa in callback_list_call_attr_args (cbl=<optimized out>, type=type@entry=attr_command, count=count@entry=4)
    at .../navit/callback.c:245
#18 0x000000000041e23f in command_call_function (ctx=ctx@entry=0x7ffd4a3c8fe0, res=res@entry=0x7ffd4a3c8f00)
    at .../navit/command.c:917
#19 0x000000000041c328 in eval_postfix (res=0x7ffd4a3c8f00, ctx=0x7ffd4a3c8fe0) at .../navit/command.c:1003
#20 eval_unary (ctx=ctx@entry=0x7ffd4a3c8fe0, res=res@entry=0x7ffd4a3c8f00) at .../navit/command.c:1018
---Type <return> to continue, or q <return> to quit---qq
Quit
aerostitch commented 8 years ago

2015-12-18 02:45:24: @pgrandin

aerostitch commented 8 years ago

2015-12-20 00:16:00: amarius4711.livejournal.com commented


===========================================================

Hi,

did some more investigations:

My Mapset looks like this:

    <mapset enabled="yes">
        <map type="mg" enabled="yes" data=".../NAVIT/maps/DE.map"/>
        <map type="mg" enabled="yes" data=".../NAVIT/maps/DE.map/smp1.smp"/>
        <map type="mg" enabled="yes" data=".../NAVIT/maps/DE.map/smp2.smp"/>
        <map type="mg" enabled="yes" data=".../NAVIT/maps/DE.map/smp3.smp"/>
        <map type="mg" enabled="yes" data=".../NAVIT/maps/DE.map/smp4.smp"/>
        <map type="mg" enabled="yes" data=".../NAVIT/maps/DE.map/smp5.smp"/>
        <map type="textfile" enabled="yes" data=".../NAVIT/poi.txt"/>
    </mapset>

and it crashes with connected GPS-USB receiver.

When I remove just the line i.e. ..../smp3.smp where I am located at that moment it doesn't crash.

aerostitch commented 8 years ago

2015-12-21 16:17:22: @pgrandin commented


I took the liberty to edit your gdb trace for readability, hope you don't mind.

Out of curiosity, why do you prefer using Marco Polo Reiseplaner Maps? Those maps are badly outdated, and OSM is really detailed nowadays.

I probably have my M&G copy lying around somewhere if I can't find it, but I'm not sure it's worth the effort, unless you have a specific need.

aerostitch commented 8 years ago

2015-12-22 08:37:44: amarius4711.livejournal.com commented


Hi,

I would be happy if OSM maps would be usable but unfortunately there is a bug, not rendering large lakes correctly, the water area is not filled with blue color. See bug #754 Multipolygon relations not handled correctly.

So I keep using Reiseplaner Maps, old but working.

I found the problem of the crash in gui_internal_search.c

I commented out this and now it doesn't crash any more: / tracking=navit_get_tracking(this->nav); if (tracking && tracking_get_attr(tracking, attr_country_id, &search_attr, NULL)) country_attr=&search_attr; /

It is not the solution but a work around. So something in this lines of code must go wrong with Reiseplaner maps. One thing I noticed is that the attr_country_id is 131082 (must be Germany) and this ID is not in country.c

aerostitch commented 8 years ago

2015-12-31 05:07:43: @pgrandin

aerostitch commented 8 years ago

2016-01-02 12:29:05: tryagain commented


Hi!

Thank you for publishing the workaround you found. It has helped a lot in tracking the problem down.

I think this commit should fix it.

Please check if current unmodified code works well for you.

aerostitch commented 8 years ago

2016-01-13 08:47:04: amarius4711.livejournal.com commented


Hi,

unfortunately the fix doesn't solve the problem. It seems that only when using Reiseplaner Maps the code I commented out will be used at all. It seems to be a feature to set the current location country as starting country for the town search dialog. This country will be different from the default country when travelling outside the home country.

But I can live without this feature.

More important for me is to get the OSM bug fixed, (see bug #754 Multipolygon relations not handled correctly.) where the rendering of large lakes with blue color doesn't work. If this is fixed I then will switch to using OSM maps.

aerostitch commented 6 years ago

2017-12-02 04:08:44: @jkoan

aerostitch commented 6 years ago

2017-12-02 04:08:44: @jkoan commented


This ticket was pushed back in order to bring 0.5.1 out soon.