June 11, 2011

mkae mkae
Lab Rat
52 posts

[SOLVED] Crash when clicking on authors button in about dialog on MacOSX.

 

When I start the KDE application kmymoney4-devel (using QT 4.7.3), then go to Preferences/Plugin, select the info button of one of the plugins (e.g. libofx) and then click the authors button in the upcoming about dialog the application crashes.

The same happens in the applications about dialog as well, as I noticed later.

The original issue at MacPorts [trac.macports.org] I am referring to here has debug logs.

There one can see that the culprit seems to be containerWidget():

  1. Program received signal EXC_BAD_ACCESS, Could not access memory.
  2. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000008
  3. 0x000000010499ba80 in containerWidget ()
  4. (gdb) bt f
  5. #0  0x000000010499ba80 in containerWidget ()
  6. No symbol table info available.
  7. #1  0x00000001049b180d in QStyleSheetStyle::drawPrimitive ()
  8. No symbol table info available.
  9. #2  0x0000000101d93ef3 in KDEPrivate::KAboutApplicationPersonListDelegate::paint ()
  10. No symbol table info available.
  11. #3  0x0000000104baf6c8 in QListView::paintEvent ()

To get more info I certainly would need to have QT in its debug variant installed, so that I could dive into said containerWidget()…

But I hope that someone might have a clue on this list as to what might cause this on MacOSX. It doesn’t happen on Linux, that I know for sure. :-)

5 replies

June 12, 2011

mkae mkae
Lab Rat
52 posts

Well, the crash happens in qstylesheetstyle.cpp line 4252:

  1. case PE_Widget:
  2.         if (!rule.hasDrawable()) {
  3.             QWidget *container = containerWidget(w);
  4.             if (autoFillDisabledWidgets->contains(container)

The debugger shows this as the crash position:

  1.     0x0000000103823b85  <+4117>  mov    %r14,%rdi
  2.     0x0000000103823b88  <+4120>  callq  0x10380dd90 <_ZL15containerWidgetPK7QWidget>
  3. ->  0x0000000103823b8d  <+4125>  mov    %rax,-0x578(%rbp)

(The arrow marks the position where the program crashes with “EXC_BAD_ACCESS”!)

Too bad that – for some reason – I can’t get the debugger to accept my QT4 debug library. It runs fine through KMyMoney’s code line by line, but cannot step into QT4 code. :-(

That’s why I can’t debug the values of the variables so easily – well, at least my knowledge of assembler isn’t good enough to make the link to the original C++ code. :-/

June 19, 2011

mkae mkae
Lab Rat
52 posts

I verified with a minimal KDE app that the crash doesn’t occur on OpenSuSE 11.2 Linux but happens on Mac OS X if more than the standard about dialog info is being used.

See issue 1 here [bitbucket.org]

Code is available here: https://bitbucket.org/mkae/kde-tests/downloads

June 19, 2011

mkae mkae
Lab Rat
52 posts

Unfortunately it is impossible to debug the above code using

  1. $ DYLD_IMAGE_SUFFIX=_debug gdb

on MacOSX, since the app will stop with errors like these:
  1. On Mac OS X, you might be loading two sets of Qt binaries into the same process. Check that all plugins are compiled against the right Qt binaries. Export DYLD_PRINT_LIBRARIES=1 and check that only one set of binaries are being loaded.
  2. QWidget: Must construct a QApplication before a QPaintDevice
  3.  
  4. Program received signal SIGABRT, Aborted.
  5. 0x000000010128ada2 in __kill ()
  6. (gdb)

June 19, 2011

mkae mkae
Lab Rat
52 posts

As discussed here [bitbucket.org] the crashing about dialog is probably not a QT issue, but rather a KDE bug. I’ll go to the KDE-DEVELOP mailing list with this.

February 4, 2012

mkae mkae
Lab Rat
52 posts

This bug has been resolved in Qt 4.8.0! :-)

 
  ‹‹ Some Question regarding Pointers and Destructors and safety...      [Solved] QVariant and custom types ››

You must log in to post a reply. Not a member yet? Register here!