navit-gps / navit

The open source (GPL v2) turn-by-turn navigation software for many OS
http://www.navit-project.org
Other
551 stars 173 forks source link

Navit 0.5.6-2 on XA2 whith SFOS 4.6.0.13 reliably segfaults #1268

Open Eierkopp opened 1 month ago

Eierkopp commented 1 month ago

First of all many thanks to @metalstrolch for providing and maintaining the SFOS port of Navit.

The most recent version of Navit pulled from Openrepos keeps crashing after the latest SFOS update. Hence I built an unstripped version to obtain a stacktrace (code/line numbers are from branch trunk):

Thread 1 "harbour-navit" received signal SIGSEGV, Segmentation fault.
0x00045402 in callback_list_call_attr (l=<optimized out>, type=attr_navigation, pcount=2, p=0xfffee3d8) at /home/nemo/navit/navit/callback.c:212
212 /home/nemo/navit/navit/callback.c: Datei oder Verzeichnis nicht gefunden.
(gdb) bt
#0  0x00045402 in callback_list_call_attr (l=<optimized out>, type=attr_navigation, pcount=2, p=0xfffee3d8) at /home/nemo/navit/navit/callback.c:212
#1  0x00045472 in callback_list_call_attr_args (cbl=<optimized out>, type=<optimized out>, count=2) at /home/nemo/navit/navit/callback.c:227
#2  0x0005afae in navit_add_attr (this_=0x1d9578, attr=0x338a1c) at /home/nemo/navit/navit/navit.c:3167
#3  0x00042122 in start_element (context=<optimized out>, error=<optimized out>, user_data=<optimized out>, attribute_values=<optimized out>, 
    attribute_names=<optimized out>, element_name=<optimized out>) at /home/nemo/navit/navit/xmlconfig.c:687
#4  xi_start_element (context=<optimized out>, element_name=<optimized out>, attribute_names=<optimized out>, attribute_values=<optimized out>, user_data=0xfffee6b8, 
    error=0xfffee588) at /home/nemo/navit/navit/xmlconfig.c:958
#5  0xf68a42e4 in ?? () from /usr/lib/libglib-2.0.so.0
#6  0xf68a4f56 in g_markup_parse_context_parse () from /usr/lib/libglib-2.0.so.0
#7  0x0004101c in parse_file (document=document@entry=0xfffee6b8, error=error@entry=0xfffee728) at /home/nemo/navit/navit/xmlconfig.c:1194
#8  0x000429e6 in config_load (filename=filename@entry=0x1cafa0 "/usr/share/harbour-navit/navit.xml", error=error@entry=0xfffee728) at /home/nemo/navit/navit/xmlconfig.c:1272
#9  0x00033562 in main_real (argc=<optimized out>, argv=<optimized out>) at /home/nemo/navit/navit/start_real.c:193
#10 0xf6588ae8 in __libc_start_main (main=0x33261 <main>, argc=1, argv=0xfffef8b4, init=<optimized out>, fini=0xc9fd1 <__libc_csu_fini>, rtld_fini=0xf77e19c9 <_dl_fini>, 
    stack_end=0xfffef8b4) at libc-start.c:308
#11 0x000332d4 in _start ()

From a quick glance at the code I think some internals in libglib's list handling changed. As a quick test I copied libglib-2.0.so.0.7200.3 from sailfishos-platform-sdk:4.5.0.16 as /tmp/lib/libglib-2.0.so.0 and tried

LD_LIBRARY_PATH=/tmp/lib /usr/bin/harbour-navit

which worked just fine and serves as workaround. Unfortunately I know nothing about libglib but I hope the info helps debugging if you find the time. If you need further information or someone to test changes, just let me know.

NGC935 commented 1 month ago

Thank you for your issue, as I stated here, I didn't know where to start as I ran into the same problems. It would be nice to have a fix here, I try to restart my old phone to get navit running again.