[Interest] [Qt-interest] Fwd: Application crashes on Mac OS X when loading a pixmap

NoRulez norulez at me.com
Tue Nov 29 21:39:29 CET 2011


Hi Chris,

 

Sorry, my fault. Here is a new attempt.

 

With macdeployqt it seems to work, but what I don't understand is, why are
there plugins and frameworks which my app doesn't require?

 

For example:

In this simple example only QtCore and QtGui is required, but in the bundle
I have the following:

 

·         QtCore.framework

·         QtDBus.framework

·         QtGui.framework

·         QtNetwork.framework

·         QtXml.framework

 

And the same applies for the plugins

 

Thanks in advance

 

Best Regards

 

-----Ursprüngliche Nachricht-----
Von: cmeyer1969 at gmail.com [mailto:cmeyer1969 at gmail.com] Im Auftrag von Chris
Meyer
Gesendet: Dienstag, 29. November 2011 18:32
An: NoRulez
Cc: interest at qt-project.org
Betreff: Re: [Interest] [Qt-interest] Fwd: Application crashes on Mac OS X
when loading a pixmap

 

On Tue, Nov 29, 2011 at 6:04 AM, NoRulez < <mailto:norulez at me.com>
norulez at me.com> wrote:

> Hi Thiago,

> 

> I've attached an example where the crash is reproducible.

> The example works fine if the app is not signed, if the app is signed 

> the app crashes.

> 

> Steps to Reproduce:

> .) First of all the variable in the script signing.sh must be set:

>        APPLICATION_CERTIFICATE="3rd Party Mac Developer Application: ...."

> .) Build the project on Mac OS X Lion (10.7.2)

>        mkdir build

>        cd build

>        cmake -G "Unix Makefiles"

>        make

> .) Launch the unsigned app and press the button "push me" => a QDialog 

> appears with the goggle image

> .) From the "bin" directory call the script "../../signing.sh 

> PixmapCrash.app"

>        This script copies the Qt Framework into the bundle and execute 

> the "codesign" utility

> .) Launch the signed app and press the button "push me" => CRASH

> 

> Hope this helps

> 

> Best Regards

 

Are you missing the PixmapCrash.qrc file?

 

When I added that file and used a more traditional .pro file to build the
project, it worked for me right away.

 

PixmapCrash.qrc:

 

<RCC>

    <qresource>

        <file>resources/google.png</file>

    </qresource>

</RCC>

 

 

PixmapCrash.pro:

 

QT       += core gui

 

TARGET = PixmapCrash

TEMPLATE = app

 

# Change name to any existing Certificate in your keychain CERT = MyCertName

 

SOURCES += main.cpp\

        MainWindow.cpp

 

HEADERS  += MainWindow.h

 

macx {

  RESOURCES += PixmapCrash.qrc

 

  QMAKE_EXTRA_TARGETS += signature

 

  signature.depends  += all

  signature.commands += /path/to/qt-48/bin/macdeployqt $${TARGET}.app;

  signature.commands += codesign -s $${CERT} -v
$${TARGET}.app/Contents/MacOS/$${TARGET};

 

}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20111129/b11f8b61/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PixmapCrash.zip
Type: application/octet-stream
Size: 9620 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20111129/b11f8b61/attachment.obj>


More information about the Interest mailing list