Re: Stack traces from introspection bindings?



Hi,

On Wed, Feb 4, 2015 at 6:20 AM, Emmanuele Bassi <ebassi gmail com> wrote:
hi;

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:

(main.pl:25925): 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/Gtk3.pm 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 your-app.pl

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.

When, a while back, I mentioned that I'd love you guys to post
pro-tips on the Twitter account...

THAT right there is definetely something I'd like to see appear there.

Have a nice day,

-Pascal
-- 
Homepage (http://organact.mine.nu)
Debian GNU/Linux (http://www.debian.org)
COMunité/LACIME: École de technologie supérieure (http://www.comunite.ca)
ISIP Laboratory: McGill (http://www.isip.ece.mcgill.ca)


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