Re: Stack traces from introspection bindings?


On 4 February 2015 at 03:19, Daniel Kasak <d j kasak dk gmail com> wrote:
Hi all.

One of the things that became more difficult with the move to
introspection-based bindings was figuring out what caused some error
messages. For example:

( Gtk-CRITICAL **: gtk_list_store_get_value: assertion
'column < priv->n_columns' failed
*** unhandled exception in callback:
***   [gperl_sv_from_value] FIXME: unhandled type - 0 ((null) fundamental
for (null))
***  ignoring at /usr/local/lib64/perl5/5.20.1/ line 318.

Luckily for me, I know precisely what caused this error, because I just
changed some code in the area. If I'd just triggered a rare bug that I'd
introduced a while back, I'd be absolutely lost as to *where* in the code
this was happening. Is there any way of triggering a full stack trace on
these kinds of errors?

$ export G_DEBUG=fatal-criticals
$ gdb --args perl

then, when the critical warning happens, use `bt` to get the backtrace
of the error.

you can also use a breakpoint on the `g_logv` function.


[ ] ebassi [ gmail com]

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]