[Pythonmac-SIG] Problems with py2app and qt

Michael Held michael.held at bc.biol.ethz.ch
Thu Apr 22 19:12:51 CEST 2010


hi,

thanks for that excellent trick.

it sounds like this is a problem of py2app and its PyQt recipe. this conflict is very dangerous since it could lead to frustrated users of your apps and might give developers a hard time.

could that be included to py2app? also deleting the Qt.debug files from the app in my own post-processing step is a bit cumbersome...

cheers,
and thanks again!!!
michael


On Dec 15, 2009, at 9:27 PM, aditya bhargava wrote:

> Brilliant...it turned out that the Qt libraries were being loaded *twice* – once from inside the bundle and once from the libraries on my computer.
> 
> The hack fix was to create a qt.conf file inside Contents/Resources and give it a bad path...this way only the libraries inside the bundle are being loaded. Putting this inside qt.conf:
> 
> [Paths]
> Plugins = bollocks
> 
> Did the trick :)
> 
> Thanks Emanuele!
> 
> 
> On Tue, Dec 15, 2009 at 12:45 PM, Emanuele Santos <emanuelesantos at gmail.com> wrote:
> Maybe your app is loading the wrong libs?
> Try running from the terminal and printing the libs that are being loaded:
> 
> $ cd /path/to/your/bundle.app/Contents/MacOS
> $ DYLD_PRINT_LIBRARIES=1 ./your_app
> 
> Check if all the Qt and PyQt libraries loaded are in your bundle.
> 
> -- Emanuele.
> 
> 
> On Dec 15, 2009, at 10:30 AM, aditya bhargava wrote:
> 
> It's a memory issue with Qt I think. The other interesting thing is, this problem doesn't occur if I build the app in alias mode with the -A flag...but of course that's not too useful if I want to distribute applications.
> 
> Here's the issue I get:
> 
> 
> Exception:  EXC_BAD_ACCESS (0x0001)
> Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x00000000
> 
> Thread 0 Crashed:
> 0   QtGui                              0x167c792d QWidget::isActiveWindow() const + 141
> 1   QtGui                              0x16c6fd2e QAccessibleWidget::state(int) const + 222
> 2   QtGui                              0x16c6fd73 QAccessibleWidgetEx::state(int) const + 35
> 3   libqtaccessiblewidgets.dylib       0x16197b9d QAccessibleLineEdit::state(int) const + 33
> 4   QtGui                              0x028f2178 QAccessible::cleanup() + 14728
> 5   QtGui                              0x028f7016 QAccessible::cleanup() + 34854
> 6   QtGui                              0x028f750d QAccessible::updateAccessibility(QObject*, int, QAccessible::Event) + 621
> 7   QtGui                              0x02954e7a QWidgetPrivate::show_helper() + 330
> 8   QtGui                              0x02955553 QWidget::setVisible(bool) + 1267
> 9   QtGui.so                           0x02234aa5 sipQLineEdit::setVisible(bool) + 101
> 10  QtGui                              0x02954cd8 QWidgetPrivate::showChildren(bool) + 328
> 11  QtGui                              0x02954d8c QWidgetPrivate::show_helper() + 92
> 12  QtGui                              0x02955553 QWidget::setVisible(bool) + 1267
> 13  QtGui.so                           0x02417f11 sipQWidget::setVisible(bool) + 101
> 14  QtGui                              0x02954cd8 QWidgetPrivate::showChildren(bool) + 328
> 15  QtGui                              0x02954d8c QWidgetPrivate::show_helper() + 92
> 16  QtGui                              0x02955553 QWidget::setVisible(bool) + 1267
> 17  QtGui.so                           0x02417f11 sipQWidget::setVisible(bool) + 101
> 18  QtGui.so                           0x02420150 sipQWidget::sipProtectVirt_languageChange(bool) + 25936
> 19  org.python.python                  0x00499c5d PyEval_EvalFrameEx + 19936
> 20  org.python.python                  0x0049b8ad PyEval_EvalCodeEx + 1819
> 21  org.python.python                  0x0049ba61 PyEval_EvalCode + 87
> 22  org.python.python                  0x004bf1d0 PyRun_FileExFlags + 260
> 23  org.python.python                  0x0048fe3d PyAST_FromNode + 7784
> 24  org.python.python                  0x00499c5d PyEval_EvalFrameEx + 19936
> 25  org.python.python                  0x0049b8ad PyEval_EvalCodeEx + 1819
> 26  org.python.python                  0x00498f2e PyEval_EvalFrameEx + 16561
> 27  org.python.python                  0x0049b8ad PyEval_EvalCodeEx + 1819
> 28  org.python.python                  0x0049ba61 PyEval_EvalCode + 87
> 29  org.python.python                  0x004bf1d0 PyRun_FileExFlags + 260
> 30  org.python.python                  0x004bf56a PyRun_SimpleFileExFlags + 640
> 31  org.python.python                  0x004bf70d PyRun_SimpleFile + 40
> 32  ...cified.softwareRequirements     0x00007b9f start + 23863
> 33  ...cified.softwareRequirements     0x00008091 main + 297
> 34  ...cified.softwareRequirements     0x00001f63 start + 251
> 35  ...cified.softwareRequirements     0x00001e91 start + 41
> 
> Thread 0 crashed with X86 Thread State (32-bit):
>  eax: 0x00000000  ebx: 0x028f2007  ecx: 0x16784105  edx: 0x00000000
>  edi: 0x003bc630  esi: 0x003ab8a0  ebp: 0xbfffdce8  esp: 0xbfffdcc0
>   ss: 0x0000001f  efl: 0x00010246  eip: 0x167c792d   cs: 0x00000017
>   ds: 0x0000001f   es: 0x0000001f   fs: 0x00000000   gs: 0x00000037
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
> 
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
> 
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20100422/fb6eeee8/attachment.html>


More information about the Pythonmac-SIG mailing list