I found a solution in this list from 2009-12-15. sorry for posting again.
> 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!
--- Begin Message ---
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
<emanuelesan...@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@python.org
>> http://mail.python.org/mailman/listinfo/pythonmac-sig
>>
>
> _______________________________________________
> Pythonmac-SIG maillist - Pythonmac-SIG@python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
>
_______________________________________________
Pythonmac-SIG maillist - Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
--- End Message ---
On Apr 22, 2010, at 6:52 PM, Michael Held wrote:
> hi PyQt,
>
> after merging to the new Qt 4.6 and PyQt 4.7 I observed strange crashes of my
> py2app bundled application on another test computer. on my development Mac
> everything was fine.
>
> running the binary from my .app directly on the shell I saw a number of
> strange warnings about two Qt versions being used in an undefined way. on the
> test Mac Qt 4.5 was installed and that was mixed with my Qt 4.6 from the app
> which caused the crash.
> I checked my env and no DYLD_LIBRARY_PATH is set. after deleting the old Qt
> 4.5 version everything was fine on the test Mac.
>
> the question is now: does my app conflict with any pre-installed Qt version a
> user might have? what can I do against it?
>
> see a shortened output from the binary below.
>
> thanks a lot!
> michael
>
> /Users/analyzer/Downloads/test_package/test.app/Contents/MacOS/test
> objc[32502]: Class QMacSoundDelegate is implemented in both
> /Users/analyzer/Downloads/test_package/test.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui
> and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two
> will be used. Which one is undefined.
> objc[32502]: Class QCocoaColorPanelDelegate is implemented in both
> /Users/analyzer/Downloads/test_package/test.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui
> and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two
> will be used. Which one is undefined.
> objc[32502]: Class QNSOpenSavePanelDelegate is implemented in both
> /Users/analyzer/Downloads/test_package/test.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui
> and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two
> will be used. Which one is undefined.
> objc[32502]: Class QCocoaFontPanelDelegate is implemented in both
> /Users/analyzer/Downloads/test_package/test.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui
> and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two
> will be used. Which one is undefined.
> objc[32502]: Class QNSWindowProxy is implemented in both
> /Users/analyzer/Downloads/test_package/test.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui
> and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two
> will be used. Which one is undefined.
> objc[32502]: Class QNSPanelProxy is implemented in both
> /Users/analyzer/Downloads/test_package/test.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui
> and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two
> will be used. Which one is undefined.
> objc[32502]: Class QCocoaPageLayoutDelegate is implemented in both
> /Users/analyzer/Downloads/test_package/test.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui
> and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two
> will be used. Which one is undefined.
> objc[32502]: Class QCocoaPrintPanelDelegate is implemented in both
> /Users/analyzer/Downloads/test_package/test.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui
> and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two
> will be used. Which one is undefined.
> objc[32502]: Class QNSMenu is implemented in both
> /Users/analyzer/Downloads/test_package/test.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui
> and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two
> will be used. Which one is undefined.
> objc[32502]: Class QNSStatusItem is implemented in both
> /Users/analyzer/Downloads/test_package/test.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui
> and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two
> will be used. Which one is undefined.
> objc[32502]: Class QNSImageView is implemented in both
> /Users/analyzer/Downloads/test_package/test.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui
> and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two
> will be used. Which one is undefined.
> QObject::moveToThread: Current thread (0xa300220) is not the object's thread
> (0x4c80490).
> Cannot move to target thread (0x4c80490)
>
> 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.
> QObject::moveToThread: Current thread (0xa300220) is not the object's thread
> (0x4c80490).
> Cannot move to target thread (0x4c80490)
>
> _______________________________________________
> PyQt mailing list p...@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
_______________________________________________
Pythonmac-SIG maillist - Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG