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

Chris Meyer cmeyer1969+qt at gmail.com
Tue Nov 29 18:31:57 CET 2011


On Tue, Nov 29, 2011 at 6:04 AM, NoRulez <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};

}



More information about the Interest mailing list