viking icon indicating copy to clipboard operation
viking copied to clipboard

ui_cr_clear: assertion 'cr != NULL' failed

Open jidanni opened this issue 1 year ago • 3 comments

Lately,

$ viking
** viking [Critical]): ui_cr_clear: assertion 'cr != NULL' failed
Segmentation fault (core dumped)

$ strace viking
...close(17)                               = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x4} ---
+++ killed by SIGSEGV (core dumped) +++
Segmentation fault (core dumped)

OK, the above is without any arguments.

If I give it an argument it works fine (with only its usual warnings.):

$ viking /tmp/nsdakmon.kmz 

(viking:1311): Gdk-CRITICAL **: 16:08:17.205: gdk_window_set_cursor: assertion 'GDK_IS_WINDOW (window)' failed

jidanni avatar Dec 06 '23 08:12 jidanni

I don't know why it is crashing for you.

Occasionally (perhaps once every other month) it crashes for me - when reporting an error about 'cr != NULL' in ui_cr_draw_rectangle().

But like the above I don't think this where it actually crashes but may be this 'cr' variable is NULL in other contexts which actually crashes it. I've not ever managed to capture it going wrong under the debugger to fully understand the behaviour.

In the file ui_util.c not every function protects usage of this 'cr' - so potentially adding this might help robustness of the program - even if the real issue of cr having the value of NULL is elsewhere (as ideally should not happen).

rnorris avatar Dec 28 '23 19:12 rnorris

@jidanni : Are you are able to build from the latest source code and see if there is any increased reliability please?

rnorris avatar Jan 13 '24 15:01 rnorris

Err... I only use what Debian gives me via aptitude full-upgrade ... but I use Debian Sid, so things will get to me much quicker.

By the way I saw these once too. But can't reproduce them, so wasn't going to mention them...

(viking:1055): GLib-GObject-CRITICAL **: 07:17:19.717: invalid uninstantiatable type '<invalid>' in cast to 'VikLayer'
(viking:1055): GLib-GObject-CRITICAL **: 07:17:19.717: invalid unclassed pointer in cast to 'GtkWidget'
(viking:1055): Gtk-CRITICAL **: 07:17:19.718: gtk_widget_get_toplevel: assertion 'GTK_IS_WIDGET (widget)' failed

jidanni avatar Jan 13 '24 23:01 jidanni