Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Eierkopp opened this issue Jul 22, 2024 · 8 comments · May be fixed by #1284
Open

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

Eierkopp opened this issue Jul 22, 2024 · 8 comments · May be fixed by #1284
Assignees

Comments

@Eierkopp
Copy link

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
Copy link

NGC935 commented Aug 11, 2024

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.

@Eierkopp
Copy link
Author

It would be nice to have a fix here, ...

I think the workaround is already in my initial report:

  1. Fetch libglib-2.0.so.0.7200.3 suitable for your phone, e.g. from the sailfishos-platform-sdk:4.5.0.16 docker image.
  2. Create a directory as e.g. /usr/share/harbour-navit/lib/ and copy the library into it.
  3. Create symlinks to libglib-2.0.so and libglib-2.0.so.0 in the same directory
  4. Tweak /usr/share/applications/harbour-navit.desktop in two places:
    1. Diasble sandboxing, i.e. put Sandboxing=Disabled in the [X-Sailjail] section.
    2. Load libglib from the new position, i.e. change Exec to Exec=env LD_LIBRARY_PATH=/usr/share/harbour-navit/lib harbour-navit.

@hoehnp hoehnp self-assigned this Dec 12, 2024
@hoehnp
Copy link
Contributor

hoehnp commented Dec 22, 2024

@Eierkopp, @NGC935: Is there an option for you to update to SF 5?

@Eierkopp
Copy link
Author

@Eierkopp, @NGC935: Is there an option for you to update to SF 5?

Nor for me. SF 5 is only available on the C2, not my XA2. Will upgrade as soon as it becomes available.

@NGC935
Copy link

NGC935 commented Dec 22, 2024

Same here. I have a XA and a 10III with different 4.x releases. And IDK what I'll do in the future with the new licensing model…

@hoehnp
Copy link
Contributor

hoehnp commented Dec 22, 2024

no problem @Eierkopp, @NGC935. I only have myself a C2. So I will need your help for testing, once i have built a new package version.

@hoehnp hoehnp linked a pull request Dec 23, 2024 that will close this issue
@Eierkopp
Copy link
Author

@Eierkopp, @NGC935, can you please test the rpms from here?

Just briefly tested the armv7hl version. The shipped config is not tweaked for Sailfish. Hence I changed it in a few places to enable qt5 UI and internal GPS. The config used for testing is attached.

With this config it gets past reading the configuration and displays the map but now it crashes when computing a route.

navit.xml.txt
stacktrace.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants