Giter VIP home page Giter VIP logo

Comments (9)

hubcapsc avatar hubcapsc commented on June 18, 2024

Following up again as I try to learn more... I think viking doesn't
know I have a bluetooth gps, and isn't able to know. I think Viking
gets my bluetooth gps's coordinates only on start up, which
is the only time Viking ever queries geoclue. I wished there was
a button I could press that would make Viking go to the location
being advertised by my gps. So I made one by replacing the code
in src/vikwindow.c:goto_default_location with the single line:

libgeoclue_where_am_i ( vw, update_from_geoclue );

So now View -> Go To The Default Location "does what I want" .

This is all so awesome, except for the frequent crashes.
It seems that all Viking does is call gtk_main() and the
crash occurs way down the line after libgeoclue somehow
causes g_type_check_instance_cast to be run.

-Mike "sometimes it works, sometimes it crashes..."

from viking.

rnorris avatar rnorris commented on June 18, 2024
  1. Regarding the crash, I'm not quite sure why you have so many threads.
    In particular the above instance thread 5794, is also starting a g_main_loop_run()
    If you could post the result of 'info threads' from gdb when it crashes it may help diagnose what is happening.

I have not been able to recreate this failure with a GeoClue setup on Ubuntu
If I use "GCLUE_ACCURACY_LEVEL_EXACT", geoclue never responds with a location.
GCLUE_ACCURACY_LEVEL_CITY/STREET etc... appear to work fine and the viewport moves to the location.

So I have now at least made the accuracy level configurable.

Use "geoclue_accuracy_level=X" in your ~/.viking/viking.ini
where X is:
1 = GCLUE_ACCURACY_LEVEL_COUNTRY
4 = GCLUE_ACCURACY_LEVEL_CITY
5 = GCLUE_ACCURACY_LEVEL_NEIGHBORHOOD
6 = GCLUE_ACCURACY_LEVEL_STREET
8 = GCLUE_ACCURACY_LEVEL_EXACT
(Remember to edit viking.ini when Viking is not running)

  1. Regarding "have continuous update of location from geoclue":
    Unfortunately currently the use of Geoclue is purely to get an initial location (i.e. hopefully to set a map to somewhere near the user).

However I like your idea of being able to request the Auto Lookup on demand.
So I've added it as View->Go to the Auto Location
You can of course customize the toolbar to add this as an toolbar button.

  1. When writing the initial GeoClue support I also wrote some code for a continuous update method.
    This always uses GCLUE_ACCURACY_LEVEL_EXACT.
    This is in the form of a new Layer, heavily based on the GPS Layer.
    However I didn't finish it or think it would be of much interest... until now!
    I've published what I have as a branch - https://github.com/rnorris/viking/tree/GeoClue
    IIRC the main things lacking (that should be easy to add) is some code to limit the update rate from GeoClue to at most every second & somekind of heading triangle/arrow thing.
    Since I want to release version 1.7 of Viking very soon, I think this will be too late to get in good enough working order to include.

from viking.

hubcapsc avatar hubcapsc commented on June 18, 2024

I fetched your new commits and rebuilt... and set
geoclue_accuracy_level=8

Here's the "info threads" on some core dumps...

I've only run viking a handful of times, but it cores every
time... the where-am-i program happily consumes geoclue provided
data from the gps... It runs until I hit control-C since once queried, geoclue
seems to continue streaming location information as fast as the gps
can stream nmea to rfcomm0... I wonder if viking is having trouble
drinking from the fire hose - maybe it expects a single response?

Here's "info threads" from two core dumps and a whole run of gdb from
a third core dump in case there's something interesting there...

(gdb) info threads
Id Target Id Frame

  • 1 Thread 0x7efc7bd883c0 (LWP 27764) 0x00007efc809f37a0 in g_type_check_instance_cast () from /lib64/libgobject-2.0.so.0
    2 Thread 0x7efc6da6e700 (LWP 27780) 0x00007efc7f4ddefd in syscall ()
    from /lib64/libc.so.6
    3 Thread 0x7efc6e3cc700 (LWP 27773) 0x00007efc7f4d8421 in poll ()
    from /lib64/libc.so.6
    4 Thread 0x7efc6ec4a700 (LWP 27772) 0x00007efc7f4d8421 in poll ()
    from /lib64/libc.so.6
    5 Thread 0x7efc6cf38700 (LWP 27785) 0x00007efc7f4ddefd in syscall ()
    from /lib64/libc.so.6

(gdb) info threads
Id Target Id Frame

  • 1 Thread 0x7fa18e12d3c0 (LWP 28184) 0x00007fa192d987a0 in g_type_check_instance_cast () from /lib64/libgobject-2.0.so.0
    2 Thread 0x7fa17affd700 (LWP 28195) 0x00007fa191882efd in syscall ()
    from /lib64/libc.so.6
    3 Thread 0x7fa1797fa700 (LWP 28203) 0x00007fa191882efd in syscall ()
    from /lib64/libc.so.6
    4 Thread 0x7fa178ff9700 (LWP 28204) 0x00007fa191882efd in syscall ()
    from /lib64/libc.so.6
    5 Thread 0x7fa179ffb700 (LWP 28202) 0x00007fa191882efd in syscall ()
    from /lib64/libc.so.6
    6 Thread 0x7fa17a7fc700 (LWP 28201) 0x00007fa191882efd in syscall ()
    from /lib64/libc.so.6
    7 Thread 0x7fa17bfff700 (LWP 28193) 0x00007fa192deecb0 in sendmsg@plt ()
    from /lib64/libgio-2.0.so.0
    8 Thread 0x7fa17b7fe700 (LWP 28194) 0x00007fa191882efd in syscall ()
    from /lib64/libc.so.6
    9 Thread 0x7fa16b7fe700 (LWP 28206) 0x00007fa191882efd in syscall ()
    from /lib64/libc.so.6
    10 Thread 0x7fa180fef700 (LWP 28192) 0x00007fa19187d421 in poll ()
    from /lib64/libc.so.6
    11 Thread 0x7fa16bfff700 (LWP 28205) 0x00007fa191882efd in syscall ()
    from /lib64/libc.so.6
    (gdb)

[hubcap@hubcapsc ~]$ coredumpctl debug viking
Hint: You are currently not seeing messages from other users and the system.
Users in groups 'adm', 'systemd-journal', 'wheel' can see all messages.
Pass -q to turn off this notice.
PID: 28361 (viking)
UID: 1000 (hubcap)
GID: 1000 (hubcap)
Signal: 11 (SEGV)
Timestamp: Tue 2018-12-11 07:08:00 EST (11s ago)
Command Line: viking
Executable: /usr/local/bin/viking
Control Group: /user.slice/user-1000.slice/[email protected]/gnome-terminal-server.service
Unit: [email protected]
User Unit: gnome-terminal-server.service
Slice: user-1000.slice
Owner UID: 1000 (hubcap)
Hostname: hubcapsc
Storage: /var/lib/systemd/coredump/core.viking.1000.6f699197986640189076aefddc6949b8.28361.1544530080000000.lz4
Message: Process 28361 (viking) of user 1000 dumped core.

            Stack trace of thread 28361:
            #0  0x00007fb7e713c7a0 g_type_check_instance_cast (libgobject-2.0.so.0)
            #1  0x00007fb7e60273f2 n/a (libgeoclue-2.so.0)
            #2  0x00007fb7e71ecf74 n/a (libgio-2.0.so.0)
            #3  0x00007fb7e71ed8d6 n/a (libgio-2.0.so.0)
            #4  0x00007fb7e722bfac n/a (libgio-2.0.so.0)
            #5  0x00007fb7e71ecf74 n/a (libgio-2.0.so.0)
            #6  0x00007fb7e71ed8d6 n/a (libgio-2.0.so.0)
            #7  0x00007fb7e722b766 n/a (libgio-2.0.so.0)
            #8  0x00007fb7e71ecf74 n/a (libgio-2.0.so.0)
            #9  0x00007fb7e71ed8d6 n/a (libgio-2.0.so.0)
            #10 0x00007fb7e7220441 n/a (libgio-2.0.so.0)
            #11 0x00007fb7e71ecf74 n/a (libgio-2.0.so.0)
            #12 0x00007fb7e71ecfad n/a (libgio-2.0.so.0)
            #13 0x00007fb7e7b9cb7b n/a (libglib-2.0.so.0)
            #14 0x00007fb7e7ba026d g_main_context_dispatch (libglib-2.0.so.0)
            #15 0x00007fb7e7ba0638 n/a (libglib-2.0.so.0)
            #16 0x00007fb7e7ba0962 g_main_loop_run (libglib-2.0.so.0)
            #17 0x00007fb7e7808e4f gtk_main (libgtk-x11-2.0.so.0)
            #18 0x0000000000418909 main (viking)
            #19 0x00007fb7e5b53413 __libc_start_main (libc.so.6)
            #20 0x0000000000418bbe _start (viking)
            
            Stack trace of thread 28381:
            #0  0x00007fb7e5c26efd syscall (libc.so.6)
            #1  0x00007fb7e7be811e g_cond_wait_until (libglib-2.0.so.0)
            #2  0x00007fb7e7b72231 n/a (libglib-2.0.so.0)
            #3  0x00007fb7e7bc9fd2 n/a (libglib-2.0.so.0)
            #4  0x00007fb7e7bc948a n/a (libglib-2.0.so.0)
            #5  0x00007fb7e5cfd58e start_thread (libpthread.so.0)
            #6  0x00007fb7e5c2c6a3 __clone (libc.so.6)
            
            Stack trace of thread 28372:
            #0  0x00007fb7e5c26efd syscall (libc.so.6)
            #1  0x00007fb7e7be811e g_cond_wait_until (libglib-2.0.so.0)
            #2  0x00007fb7e7b72231 n/a (libglib-2.0.so.0)
            #3  0x00007fb7e7bc9fd2 n/a (libglib-2.0.so.0)
            #4  0x00007fb7e7bc948a n/a (libglib-2.0.so.0)
            #5  0x00007fb7e5cfd58e start_thread (libpthread.so.0)
            #6  0x00007fb7e5c2c6a3 __clone (libc.so.6)
            
            Stack trace of thread 28370:
            #0  0x00007fb7e7bdac0a g_variant_builder_end (libglib-2.0.so.0)
            #1  0x00007fb7e7223f76 n/a (libgio-2.0.so.0)
            #2  0x00007fb7e7225fc1 g_dbus_message_new_from_blob (libgio-2.0.so.0)
            #3  0x00007fb7e7230788 n/a (libgio-2.0.so.0)
            #4  0x00007fb7e71ecf74 n/a (libgio-2.0.so.0)
            #5  0x00007fb7e71ecfad n/a (libgio-2.0.so.0)
            #6  0x00007fb7e7b9cb7b n/a (libglib-2.0.so.0)
            #7  0x00007fb7e7ba026d g_main_context_dispatch (libglib-2.0.so.0)
            #8  0x00007fb7e7ba0638 n/a (libglib-2.0.so.0)
            #9  0x00007fb7e7ba0962 g_main_loop_run (libglib-2.0.so.0)
            #10 0x00007fb7e722e79a n/a (libgio-2.0.so.0)
            #11 0x00007fb7e7bc948a n/a (libglib-2.0.so.0)
            #12 0x00007fb7e5cfd58e start_thread (libpthread.so.0)
            #13 0x00007fb7e5c2c6a3 __clone (libc.so.6)
            
            Stack trace of thread 28371:
            #0  0x00007fb7e5c26efd syscall (libc.so.6)
            #1  0x00007fb7e7be811e g_cond_wait_until (libglib-2.0.so.0)
            #2  0x00007fb7e7b72231 n/a (libglib-2.0.so.0)
            #3  0x00007fb7e7bc9fd2 n/a (libglib-2.0.so.0)
            #4  0x00007fb7e7bc948a n/a (libglib-2.0.so.0)
            #5  0x00007fb7e5cfd58e start_thread (libpthread.so.0)
            #6  0x00007fb7e5c2c6a3 __clone (libc.so.6)
            
            Stack trace of thread 28369:
            #0  0x00007fb7e5c21421 __poll (libc.so.6)
            #1  0x00007fb7e7ba05a6 n/a (libglib-2.0.so.0)
            #2  0x00007fb7e7ba06d0 g_main_context_iteration (libglib-2.0.so.0)
            #3  0x00007fb7e7ba0721 n/a (libglib-2.0.so.0)
            #4  0x00007fb7e7bc948a n/a (libglib-2.0.so.0)
            #5  0x00007fb7e5cfd58e start_thread (libpthread.so.0)
            #6  0x00007fb7e5c2c6a3 __clone (libc.so.6)
            
            Stack trace of thread 28379:
            #0  0x00007fb7e5c26efd syscall (libc.so.6)
            #1  0x00007fb7e7be811e g_cond_wait_until (libglib-2.0.so.0)
            #2  0x00007fb7e7b72231 n/a (libglib-2.0.so.0)
            #3  0x00007fb7e7bc9fd2 n/a (libglib-2.0.so.0)
            #4  0x00007fb7e7bc948a n/a (libglib-2.0.so.0)
            #5  0x00007fb7e5cfd58e start_thread (libpthread.so.0)
            #6  0x00007fb7e5c2c6a3 __clone (libc.so.6)
            
            Stack trace of thread 28380:
            #0  0x00007fb7e5c26efd syscall (libc.so.6)
            #1  0x00007fb7e7be811e g_cond_wait_until (libglib-2.0.so.0)
            #2  0x00007fb7e7b72231 n/a (libglib-2.0.so.0)
            #3  0x00007fb7e7bc9fd2 n/a (libglib-2.0.so.0)
            #4  0x00007fb7e7bc948a n/a (libglib-2.0.so.0)
            #5  0x00007fb7e5cfd58e start_thread (libpthread.so.0)
            #6  0x00007fb7e5c2c6a3 __clone (libc.so.6)
            
            Stack trace of thread 28377:
            #0  0x00007fb7e5c26efd syscall (libc.so.6)
            #1  0x00007fb7e7be811e g_cond_wait_until (libglib-2.0.so.0)
            #2  0x00007fb7e7b72231 n/a (libglib-2.0.so.0)
            #3  0x00007fb7e7bc9fd2 n/a (libglib-2.0.so.0)
            #4  0x00007fb7e7bc948a n/a (libglib-2.0.so.0)
            #5  0x00007fb7e5cfd58e start_thread (libpthread.so.0)
            #6  0x00007fb7e5c2c6a3 __clone (libc.so.6)
            
            Stack trace of thread 28378:
            #0  0x00007fb7e5c26efd syscall (libc.so.6)
            #1  0x00007fb7e7be811e g_cond_wait_until (libglib-2.0.so.0)
            #2  0x00007fb7e7b72231 n/a (libglib-2.0.so.0)
            #3  0x00007fb7e7bc9fd2 n/a (libglib-2.0.so.0)
            #4  0x00007fb7e7bc948a n/a (libglib-2.0.so.0)
            #5  0x00007fb7e5cfd58e start_thread (libpthread.so.0)
            #6  0x00007fb7e5c2c6a3 __clone (libc.so.6)

GNU gdb (GDB) Fedora 8.2-5.fc29
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/local/bin/viking...done.
[New LWP 28361]
[New LWP 28381]
[New LWP 28372]
[New LWP 28370]
[New LWP 28371]
[New LWP 28369]
[New LWP 28379]
[New LWP 28380]
[New LWP 28377]
[New LWP 28378]

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments
Core was generated by `viking'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007fb7e713c7a0 in g_type_check_instance_cast ()
from /lib64/libgobject-2.0.so.0
[Current thread is 1 (Thread 0x7fb7e24d13c0 (LWP 28361))]
Missing separate debuginfos, use: dnf debuginfo-install PackageKit-gtk3-module-1.1.12-1.fc29.x86_64 adwaita-gtk2-theme-3.28-2.fc29.x86_64 at-spi2-atk-2.30.0-1.fc29.x86_64 at-spi2-core-2.30.0-2.fc29.x86_64 atk-2.30.0-1.fc29.x86_64 bluez-libs-5.50-3.fc29.x86_64 boost-filesystem-1.66.0-14.fc29.x86_64 boost-regex-1.66.0-14.fc29.x86_64 boost-system-1.66.0-14.fc29.x86_64 brotli-1.0.5-1.fc29.x86_64 bzip2-libs-1.0.6-28.fc29.x86_64 cairo-1.16.0-1.fc29.x86_64 cyrus-sasl-lib-2.1.27-0.3rc7.fc29.x86_64 dbus-libs-1.12.10-1.fc29.x86_64 exiv2-libs-0.26-12.fc29.x86_64 expat-2.2.6-1.fc29.x86_64 file-libs-5.34-6.fc29.x86_64 fontconfig-2.13.1-3.fc29.x86_64 freetype-2.9.1-6.fc29.x86_64 fribidi-1.0.5-1.fc29.x86_64 gdk-pixbuf2-2.38.0-4.fc29.x86_64 geoclue2-libs-2.4.13-1.fc29.x86_64 glib2-2.58.1-1.fc29.x86_64 glibc-2.28-23.fc29.x86_64 graphite2-1.3.10-6.fc29.x86_64 gtk2-2.24.32-3.fc29.x86_64 gvfs-client-1.38.1-1.fc29.x86_64 harfbuzz-1.8.7-1.fc29.x86_64 jbigkit-libs-2.1-15.fc29.x86_64 krb5-libs-1.16.1-21.fc29.x86_64 libX11-1.6.7-1.fc29.x86_64 libXcomposite-0.4.4-15.fc29.x86_64 libXcursor-1.1.15-4.fc29.x86_64 libXdamage-1.1.4-15.fc29.x86_64 libXext-1.3.3-10.fc29.x86_64 libXfixes-5.0.3-8.fc29.x86_64 libXinerama-1.1.4-2.fc29.x86_64 libXrandr-1.5.1-8.fc29.x86_64 libXrender-0.9.10-8.fc29.x86_64 libblkid-2.32.1-1.fc29.x86_64 libcanberra-gtk2-0.30-17.fc29.x86_64 libcom_err-1.44.3-1.fc29.x86_64 libcurl-7.61.1-5.fc29.x86_64 libdatrie-0.2.9-8.fc29.x86_64 libffi-3.1-18.fc29.x86_64 libgcc-8.2.1-5.fc29.x86_64 libgcrypt-1.8.4-1.fc29.x86_64 libgexiv2-0.10.9-1.fc29.x86_64 libgpg-error-1.31-2.fc29.x86_64 libicu-62.1-3.fc29.x86_64 libidn2-2.0.5-2.fc29.x86_64 libjpeg-turbo-2.0.0-1.fc29.x86_64 liboauth-1.0.3-11.fc29.x86_64 libogg-1.3.3-1.fc29.x86_64 libpng-1.6.34-6.fc29.x86_64 libpsl-0.20.2-5.fc29.x86_64 libselinux-2.8-4.fc29.x86_64 libssh-0.8.5-1.fc29.x86_64 libstdc++-8.2.1-5.fc29.x86_64 libthai-0.1.28-1.fc29.x86_64 libtiff-4.0.10-1.fc29.x86_64 libunistring-0.9.10-4.fc29.x86_64 libuuid-2.32.1-1.fc29.x86_64 libvorbis-1.3.6-3.fc29.x86_64 libxcb-1.13.1-1.fc29.x86_64 libxcrypt-4.4.0-5.fc29.x86_64 libxml2-2.9.8-4.fc29.x86_64 mapnik-3.0.20-6.fc29.x86_64 nettle-3.4.1rc1-1.fc29.x86_64 nspr-4.20.0-1.fc29.x86_64 nss-util-3.40.1-1.0.fc29.x86_64 openldap-2.4.46-9.fc29.x86_64 openssl-libs-1.1.1-3.fc29.x86_64 pango-1.42.4-1.fc29.x86_64 pcre-8.42-5.fc29.x86_64 pcre2-10.32-4.fc29.x86_64 proj-4.9.3-6.fc29.x86_64 sqlite-libs-3.24.0-2.fc29.x86_64 systemd-libs-239-6.git9f3aed1.fc29.x86_64 zlib-1.2.11-14.fc29.x86_64
(gdb) info threads
Id Target Id Frame

  • 1 Thread 0x7fb7e24d13c0 (LWP 28361) 0x00007fb7e713c7a0 in g_type_check_instance_cast () from /lib64/libgobject-2.0.so.0
    2 Thread 0x7fb7ccd97700 (LWP 28381) 0x00007fb7e5c26efd in syscall ()
    from /lib64/libc.so.6
    3 Thread 0x7fb7cf67c700 (LWP 28372) 0x00007fb7e5c26efd in syscall ()
    from /lib64/libc.so.6
    4 Thread 0x7fb7d4b15700 (LWP 28370) 0x00007fb7e7bdac0a in g_variant_builder_end () from /lib64/libglib-2.0.so.0
    5 Thread 0x7fb7cffff700 (LWP 28371) 0x00007fb7e5c26efd in syscall ()
    from /lib64/libc.so.6
    6 Thread 0x7fb7d5393700 (LWP 28369) 0x00007fb7e5c21421 in poll ()
    from /lib64/libc.so.6
    7 Thread 0x7fb7cdd99700 (LWP 28379) 0x00007fb7e5c26efd in syscall ()
    from /lib64/libc.so.6
    8 Thread 0x7fb7cd598700 (LWP 28380) 0x00007fb7e5c26efd in syscall ()
    from /lib64/libc.so.6
    9 Thread 0x7fb7ced9b700 (LWP 28377) 0x00007fb7e5c26efd in syscall ()
    from /lib64/libc.so.6
    10 Thread 0x7fb7ce59a700 (LWP 28378) 0x00007fb7e5c26efd in syscall ()
    from /lib64/libc.so.6
    (gdb)

-Mike

from viking.

hubcapsc avatar hubcapsc commented on June 18, 2024

Perhaps this is interesting, idaknow...

There's warnings from both glib and geoclue when I start viking.
Viking usually crashes right away, but sometimes it doesn't and
goes to the exact location. Here are two screen-scrapes of
me running viking. The first time it core dumps, the second time
it works as desired.

[hubcap@hubcapsc ~]$ viking
settings_get_integer: Key file does not have key “maps_max_tiles” in group “viking”settings_get_integer: Key file does not have key “maps_scale_inc_up” in group “viking”settings_get_integer: Key file does not have key “maps_scale_inc_down” in group “viking”settings_get_integer: Key file does not have key “background_max_threads” in group “viking”settings_get_integer: Key file does not have key “background_max_threads_local” in group “viking”settings_get_integer: Key file does not have key “viewport_scale” in group “viking”settings_get_integer: Key file does not have key “viewport_history_size” in group “viking”settings_get_integer: Key file does not have key “viewport_history_diff_dist” in group “viking”
(viking:30153): Gtk-WARNING **: 08:02:39.470: Refusing to add non-unique action 'Waymarked Trails' to action group 'MenuActions'

(viking:30153): Gtk-WARNING **: 08:02:39.470: Refusing to add non-unique action 'Osmose' to action group 'MenuActions'

(viking:30153): Gtk-WARNING **: 08:02:39.470: Refusing to add non-unique action 'Yahoo! Maps' to action group 'MenuActions'

(viking:30153): Gtk-WARNING **: 08:02:39.470: Refusing to add non-unique action 'HERE Maps' to action group 'MenuActions'

** (viking:30153): WARNING **: 08:02:39.482: No direction routing engines available
libgeoclue_where_am_i: settings accuracy:8:

(viking:30153): GLib-GObject-WARNING **: 08:02:39.603: invalid unclassed pointer in cast to 'GClueSimple'

(viking:30153): Geoclue-WARNING **: 08:02:39.603: Failed to create location proxy: Operation was cancelled

(viking:30153): GLib-GObject-WARNING **: 08:02:39.603: invalid unclassed pointer in cast to 'GClueSimple'

(viking:30153): Geoclue-WARNING **: 08:02:39.603: Failed to create location proxy: Operation was cancelled
Segmentation fault (core dumped)
[hubcap@hubcapsc ~]$ viking
settings_get_integer: Key file does not have key “maps_max_tiles” in group “viking”settings_get_integer: Key file does not have key “maps_scale_inc_up” in group “viking”settings_get_integer: Key file does not have key “maps_scale_inc_down” in group “viking”settings_get_integer: Key file does not have key “background_max_threads” in group “viking”settings_get_integer: Key file does not have key “background_max_threads_local” in group “viking”settings_get_integer: Key file does not have key “viewport_scale” in group “viking”settings_get_integer: Key file does not have key “viewport_history_size” in group “viking”settings_get_integer: Key file does not have key “viewport_history_diff_dist” in group “viking”
(viking:30226): Gtk-WARNING **: 08:02:40.907: Refusing to add non-unique action 'Waymarked Trails' to action group 'MenuActions'

(viking:30226): Gtk-WARNING **: 08:02:40.907: Refusing to add non-unique action 'Osmose' to action group 'MenuActions'

(viking:30226): Gtk-WARNING **: 08:02:40.907: Refusing to add non-unique action 'Yahoo! Maps' to action group 'MenuActions'

(viking:30226): Gtk-WARNING **: 08:02:40.907: Refusing to add non-unique action 'HERE Maps' to action group 'MenuActions'

** (viking:30226): WARNING **: 08:02:40.919: No direction routing engines available
libgeoclue_where_am_i: settings accuracy:8:

(viking:30226): GLib-GObject-WARNING **: 08:02:41.033: invalid unclassed pointer in cast to 'GClueSimple'

(viking:30226): Geoclue-WARNING **: 08:02:41.033: Failed to create location proxy: Operation was cancelled

(viking:30226): GLib-GObject-WARNING **: 08:02:41.034: invalid unclassed pointer in cast to 'GClueSimple'

(viking:30226): Geoclue-WARNING **: 08:02:41.034: Failed to create location proxy: Operation was cancelled

(viking:30226): GLib-GObject-WARNING **: 08:02:41.034: invalid unclassed pointer in cast to 'GClueSimple'

(viking:30226): Geoclue-WARNING **: 08:02:41.034: Failed to create location proxy: Operation was cancelled

(viking:30226): GLib-GObject-WARNING **: 08:02:41.034: invalid unclassed pointer in cast to 'GClueSimple'

(viking:30226): Geoclue-WARNING **: 08:02:41.034: Failed to create location proxy: Operation was cancelled

(viking:30226): GLib-GObject-WARNING **: 08:02:41.034: invalid unclassed pointer in cast to 'GClueSimple'

(viking:30226): Geoclue-WARNING **: 08:02:41.034: Failed to create location proxy: Operation was cancelled

(viking:30226): GLib-GObject-WARNING **: 08:02:41.034: invalid unclassed pointer in cast to 'GClueSimple'

(viking:30226): Geoclue-WARNING **: 08:02:41.034: Failed to create location proxy: Operation was cancelled

(viking:30226): GLib-GObject-WARNING **: 08:02:41.034: invalid unclassed pointer in cast to 'GClueSimple'

(viking:30226): Geoclue-WARNING **: 08:02:41.034: Failed to create location proxy: Operation was cancelled

(viking:30226): GLib-GObject-WARNING **: 08:02:41.034: invalid unclassed pointer in cast to 'GClueSimple'

(viking:30226): Geoclue-WARNING **: 08:02:41.034: Failed to create location proxy: Operation was cancelled

(viking:30226): GLib-GObject-WARNING **: 08:02:41.034: invalid unclassed pointer in cast to 'GClueSimple'

(viking:30226): Geoclue-WARNING **: 08:02:41.034: Failed to create location proxy: Operation was cancelled

(viking:30226): GLib-GObject-WARNING **: 08:02:41.035: invalid unclassed pointer in cast to 'GClueSimple'

(viking:30226): Geoclue-WARNING **: 08:02:41.035: Failed to create location proxy: Operation was cancelled

(viking:30226): GLib-GObject-WARNING **: 08:02:41.035: invalid unclassed pointer in cast to 'GClueSimple'

(viking:30226): Geoclue-WARNING **: 08:02:41.035: Failed to create location proxy: Operation was cancelled

from viking.

rnorris avatar rnorris commented on June 18, 2024

Hmm, I was hoping the 'info threads' would show the thread name - it does on my system.

I've updated my GeoClue branch but I don't think it will make a difference.

What would be useful is to break on the Warning -> "invalid unclassed pointer in cast to 'GClueSimple", as this seems to indicate a fault.

The best way to do this is to set this before running gdb:

export G_DEBUG=fatal_warnings

However now we need to prevent the earlier warnings - this should stop them:

  1. Remove/comment out in the file vik_window.c on about line 5058 to disable the
    "No direction routing engines available" warning.

  2. Prevent conflicts between your ~/.viking/external_tools.xml file and the system one (from /usr/share/viking/external_tools.xml - file location might be different on Fedora).
    Move/delete/rename either file. e.g. ~/.viking/external_tools.xml --> ~/.viking/external_tools.xml.bak

Now running Viking in the debugger it should stop on the first GLib-GObject-WARNING, and a backtrace here can tell us where this happening and hopefully an insight on how to fix it...

Good luck!

from viking.

hubcapsc avatar hubcapsc commented on June 18, 2024

Sorry, not much time the last few days...

(viking:15251): GLib-GObject-WARNING **: 20:38:28.820: invalid unclassed pointer in cast to 'GClueSimple'

Thread 1 "viking" received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff7ed43c5 in ?? () from /lib64/libglib-2.0.so.0
(gdb) bt
#0 0x00007ffff7ed43c5 in () at /lib64/libglib-2.0.so.0
#1 0x00007ffff7ed56fd in g_logv () at /lib64/libglib-2.0.so.0
#2 0x00007ffff7ed58d3 in g_log () at /lib64/libglib-2.0.so.0
#3 0x00007ffff746a871 in g_type_check_instance_cast ()
at /lib64/libgobject-2.0.so.0
#4 0x00007ffff63553f2 in () at /lib64/libgeoclue-2.so.0
#5 0x00007ffff751af74 in () at /lib64/libgio-2.0.so.0
#6 0x00007ffff751b8d6 in () at /lib64/libgio-2.0.so.0
#7 0x00007ffff7559704 in () at /lib64/libgio-2.0.so.0
#8 0x00007ffff751af74 in () at /lib64/libgio-2.0.so.0
#9 0x00007ffff751b8d6 in () at /lib64/libgio-2.0.so.0
#10 0x00007ffff7549415 in () at /lib64/libgio-2.0.so.0
#11 0x00007ffff751af74 in () at /lib64/libgio-2.0.so.0
#12 0x00007ffff751afad in () at /lib64/libgio-2.0.so.0
#13 0x00007ffff7ecab7b in () at /lib64/libglib-2.0.so.0
#14 0x00007ffff7ece26d in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#15 0x00007ffff7ece638 in () at /lib64/libglib-2.0.so.0
#16 0x00007ffff7ece962 in g_main_loop_run () at /lib64/libglib-2.0.so.0
#17 0x00007ffff7b36e4f in gtk_main () at /lib64/libgtk-x11-2.0.so.0
#18 0x0000000000418909 in main (argc=, argv=)
at main.c:277
(gdb)

from viking.

rnorris avatar rnorris commented on June 18, 2024

Oh dear - that seems to indicates it's within GeoClue itself.

What version of GeoClue are you using?

It might be interesting to dig into / build (the latest) GeoClue - but obviously this is another level of effort :(

from viking.

hubcapsc avatar hubcapsc commented on June 18, 2024

geoclue 2.4.13 is what I've got with 4.19.6-300.fc29.x86_64 (fedora 29).
I've compiled 2.5.2 that I cloned from https://gitlab.freedesktop.org/geoclue/geoclue,
is that the canonical place? What would you want me to do with it? One thing
I did was cause stuff to be linked with the 2.5.2 version of libgeoclue-2, but
I didn't notice a difference...

ldd /usr/local/bin/viking | grep geo

libgeoclue-2.so.0 => /usr/local/lib/libgeoclue-2.so.0 (0x00007fbb957d8000)

Sometimes when I click on "goto the auto location", I get the general location and
no connection to gps-share. Sometimes I get a connection to gps-share, and that's
the only time viking crashes. The exact location data is always recieved by Viking
before the crash occurs. Occasionally, there won't be a crash and the exact
location is displayed in the viewfinder.

-Mike

from viking.

hubcapsc avatar hubcapsc commented on June 18, 2024

I loaded the debuginfo version of glib and am using geoclue
2.5.2 that I compiled from gitlab.freedesktop.org/geoclue/geoclue,
so I can see more stuff with gdb. There's some obfuscation
about how to get from on_location_proxy_ready to
g_type_check_instance_cast but you can see how by following
the defines...

libgeoclue/gclue-simple.c:
on_location_proxy_ready:GCLUE_SIMPLE()

libgeoclue/gclue-simple.h:
#define GCLUE_SIMPLE() G_TYPE_CHECK_INSTANCE_CAST()

gobject/gtype.h:
#define G_TYPE_CHECK_INSTANCE_CAST() _G_TYPE_CIC()
#define _G_TYPE_CIC() (ct*) g_type_check_instance_cast()
g_type_check_instance_cast()
lookup_type_node_I()

static inline TypeNode* lookup_type_node_I (GType utype)
{
...
}

gdb shows details and the backtrace has lots more information... but
I still don't see what is broken ... the user_data in
on_location_proxy_ready contains a callback function provided by
geoclue, on other projects where people are debugging "invalid unclassed
pointer in cast to ..." crashes, they seem often to find the problem
in the callback's arguments... but I don't see it...

(gdb) info line *0x00007f8eb6fcd7a0
Line 4057 of "gtype.c"
starts at address 0x7f8eb6fcd7a0 <g_type_check_instance_cast+32>
and ends at 0x7f8eb6fcd7a3 <g_type_check_instance_cast+35>.
(gdb) list *0x00007f8eb6fcd7a0
0x7f8eb6fcd7a0 is in g_type_check_instance_cast (gtype.c:4057).
4052 if (type_instance->g_class)
4053 {
4054 TypeNode *node, *iface;
4055 gboolean is_instantiatable, check;
4056
4057 node = lookup_type_node_I (type_instance->g_class->g_type);
4058 is_instantiatable = node && node->is_instantiatable;
4059 iface = lookup_type_node_I (iface_type);
4060 check = is_instantiatable && iface && type_node_conforms_to_U (node, iface, TRUE, FALSE);
4061 if (check)
(gdb) info symbol 0x00007f8eb6fcd7a0
g_type_check_instance_cast + 32 in section .text of /lib64/libgobject-2.0.so.0
(gdb) info symbol 0x00007f8eb5eb8902
on_location_proxy_ready + 43 in section .text of /usr/local/lib/libgeoclue-2.so.0
(gdb) info line *0x00007f8eb5eb8902
Line 229 of "../libgeoclue/gclue-simple.c"
starts at address 0x7f8eb5eb8902 <on_location_proxy_ready+43>
and ends at 0x7f8eb5eb890a <on_location_proxy_ready+51>.
(gdb) list *0x00007f8eb5eb8902
0x7f8eb5eb8902 is in on_location_proxy_ready (../libgeoclue/gclue-simple.c:229).
224 static void
225 on_location_proxy_ready (GObject *source_object,
226 GAsyncResult *res,
227 gpointer user_data)
228 {
229 GClueSimplePrivate *priv = GCLUE_SIMPLE (user_data)->priv;
230 GClueLocation *location;
231 GError *error = NULL;
232
233 location = gclue_location_proxy_new_for_bus_finish (res, &error);
(gdb)

Process 22446 (viking) of user 1000 dumped core.
Stack trace of thread 22446:
#0 0x00007f8eb6fcd7a0 g_type_check_instance_cast (libgobject-2.0.so.0)
#1 0x00007f8eb5eb8902 on_location_proxy_ready (libgeoclue-2.so.0)
#2 0x00007f8eb707df74 g_task_return_now (libgio-2.0.so.0)
#3 0x00007f8eb707e8d6 g_task_return (libgio-2.0.so.0)
#4 0x00007f8eb70bcfac init_second_async_cb (libgio-2.0.so.0)
#5 0x00007f8eb707df74 g_task_return_now (libgio-2.0.so.0)
#6 0x00007f8eb707e8d6 g_task_return (libgio-2.0.so.0)
#7 0x00007f8eb70bc9be async_init_start_service_by_name_cb (libgio-2.0.so.0)
#8 0x00007f8eb707df74 g_task_return_now (libgio-2.0.so.0)
#9 0x00007f8eb707e8d6 g_task_return (libgio-2.0.so.0)
#10 0x00007f8eb70b1441 g_dbus_connection_call_done (libgio-2.0.so.0)
#11 0x00007f8eb707df74 g_task_return_now (libgio-2.0.so.0)
#12 0x00007f8eb707e8d6 g_task_return (libgio-2.0.so.0)
#13 0x00007f8eb707f444 g_task_return_new_error (libgio-2.0.so.0)
#14 0x00007f8eb70aaa78 send_message_data_deliver_error (libgio-2.0.so.0)
#15 0x00007f8eb70aab23 send_message_with_reply_cancelled_idle_cb (libgio-2.0.so.0)
#16 0x00007f8eb7a2db7b g_idle_dispatch (libglib-2.0.so.0)
#17 0x00007f8eb7a3126d g_main_dispatch (libglib-2.0.so.0)
#18 0x00007f8eb7a31638 g_main_context_iterate (libglib-2.0.so.0)
#19 0x00007f8eb7a31962 g_main_loop_run (libglib-2.0.so.0)
#20 0x00007f8eb7699e4f gtk_main (libgtk-x11-2.0.so.0)
#21 0x0000000000418909 main (viking)
#22 0x00007f8eb59e3413 __libc_start_main (libc.so.6)
#23 0x0000000000418bbe _start (viking)

Stack trace of thread 22454:
#0 0x00007f8eb5ab1421 __poll (libc.so.6)
#1 0x00007f8eb7a315a6 g_main_context_poll (libglib-2.0.so.0)
#2 0x00007f8eb7a316d0 g_main_context_iteration (libglib-2.0.so.0)
#3 0x00007f8eb7a31721 glib_worker_main (libglib-2.0.so.0)
#4 0x00007f8eb7a5a48a g_thread_proxy (libglib-2.0.so.0)
#5 0x00007f8eb5b8d58e start_thread (libpthread.so.0)
#6 0x00007f8eb5abc6a3 __clone (libc.so.6)

Stack trace of thread 22462:
#0 0x00007f8eb5ab6efd syscall (libc.so.6)
#1 0x00007f8eb7a7911e g_cond_wait_until (libglib-2.0.so.0)
#2 0x00007f8eb7a03231 g_async_queue_pop_intern_unlocked (libglib-2.0.so.0)
#3 0x00007f8eb7a5afd2 g_thread_pool_wait_for_new_task (libglib-2.0.so.0)
#4 0x00007f8eb7a5a48a g_thread_proxy (libglib-2.0.so.0)
#5 0x00007f8eb5b8d58e start_thread (libpthread.so.0)
#6 0x00007f8eb5abc6a3 __clone (libc.so.6)

Stack trace of thread 22455:
#0 0x00007f8eb5ab1421 __poll (libc.so.6)
#1 0x00007f8eb7a315a6 g_main_context_poll (libglib-2.0.so.0)
#2 0x00007f8eb7a31962 g_main_loop_run (libglib-2.0.so.0)
#3 0x00007f8eb70bf79a gdbus_shared_thread_func (libgio-2.0.so.0)
#4 0x00007f8eb7a5a48a g_thread_proxy (libglib-2.0.so.0)
#5 0x00007f8eb5b8d58e start_thread (libpthread.so.0)
#6 0x00007f8eb5abc6a3 __clone (libc.so.6)

Stack trace of thread 22457:
#0 0x00007f8eb5ab6efd syscall (libc.so.6)
#1 0x00007f8eb7a7911e g_cond_wait_until (libglib-2.0.so.0)
#2 0x00007f8eb7a03231 g_async_queue_pop_intern_unlocked (libglib-2.0.so.0)
#3 0x00007f8eb7a5afd2 g_thread_pool_wait_for_new_task (libglib-2.0.so.0)
#4 0x00007f8eb7a5a48a g_thread_proxy (libglib-2.0.so.0)
#5 0x00007f8eb5b8d58e start_thread (libpthread.so.0)
#6 0x00007f8eb5abc6a3 __clone (libc.so.6)

Stack trace of thread 22463:
#0 0x00007f8eb5ab6efd syscall (libc.so.6)
#1 0x00007f8eb7a7911e g_cond_wait_until (libglib-2.0.so.0)
#2 0x00007f8eb7a03231 g_async_queue_pop_intern_unlocked (libglib-2.0.so.0)
#3 0x00007f8eb7a5afd2 g_thread_pool_wait_for_new_task (libglib-2.0.so.0)
#4 0x00007f8eb7a5a48a g_thread_proxy (libglib-2.0.so.0)
#5 0x00007f8eb5b8d58e start_thread (libpthread.so.0)
#6 0x00007f8eb5abc6a3 __clone (libc.so.6)

Stack trace of thread 22456:
#0 0x00007f8eb5ab6efd syscall (libc.so.6)
#1 0x00007f8eb7a7911e g_cond_wait_until (libglib-2.0.so.0)
#2 0x00007f8eb7a03231 g_async_queue_pop_intern_unlocked (libglib-2.0.so.0)
#3 0x00007f8eb7a5afd2 g_thread_pool_wait_for_new_task (libglib-2.0.so.0)
#4 0x00007f8eb7a5a48a g_thread_proxy (libglib-2.0.so.0)
#5 0x00007f8eb5b8d58e start_thread (libpthread.so.0)
#6 0x00007f8eb5abc6a3 __clone (libc.so.6)

from viking.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.