[Kde-bindings] new QApplication and MethodCall cleanup

Chris Burel chrisburel at gmail.com
Tue Aug 5 09:17:44 UTC 2008


I've been trying to get Hello World! to work in Perl and Qt4 for the past
couple weeks, and the problem that I've really been battling is a segfault
when I call $label->show().  The backtrace showed it failing in libc's
strlen() function.  I eventually traced it down to the fact that since we
pass in a char** to the QApplication, when it goes to show the application,
it tries to access the data stored by that pointer.  But in the PerlQt3
code, and qtruby4, the MethodCall object cleanup() method returns true, so
that memory has already been cleared by the marshall_charP_array handler fn
('rb_ary_clear(arglist);' in qtruby and by 'av_clear(arglist);' perlqt3).

How is this working?  As soon as I change the MethodCall cleanup() method to
return false, the $label->show works fine.  Obviously that's not the real
solution, and the other bindings are getting around this somehow.

Thanks,
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20080805/2a9a7c0e/attachment.html>


More information about the Kde-bindings mailing list