Results 1 to 4 of 4

Thread: Qt internal error: qt_menu.nib could not be loaded

  1. #1
    Join Date
    Nov 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Qt internal error: qt_menu.nib could not be loaded

    Hi all,

    Since we upgraded to 4.6.3 (and to 64 bit, and to Snow Leopard ... I'm on a mac) I started getting this strange error:

    Qt internal error: qt_menu.nib could not be loaded. The .nib file should be placed in QtGui.framework/Versions/Current/Resources/ or in the resources directory of your application bundle.

    The thing that's weird is I think it IS there:

    pb-d-128-141-37-36:~$ ls $QTDIR/QtGui.framework/Versions/Current/Resources/
    qt_menu.nib

    I've tried copying it locally and various other hacks, but with no luck. Does anyone have a clue?

    Cheers,

    Ed

  2. #2
    Join Date
    Nov 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: Qt internal error: qt_menu.nib could not be loaded

    Just to say that I ran our app with Dtrace enabled and I don't see any attempt to open qt_menu.nib!

    I don't quite know what to make of this - it sort of seems like there might be a Qt bug here (but of course it's always easy to blame someone else).

    I'm really at a loss to know what to try next though.

  3. #3
    Join Date
    Nov 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: Qt internal error: qt_menu.nib could not be loaded

    Hi all,

    Still struggling with this. So the error comes from:

    QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *qtMenuLoader = [[QT_MANGLE_NAMESPACE(QCocoaMenuLoader) alloc] init];
    if ([NSBundle loadNibNamed:@"qt_menu" owner:qtMenuLoader] == false) {
    qFatal("Qt internal error: qt_menu.nib could not be loaded. The .nib file"
    " should be placed in QtGui.framework/Versions/Current/Resources/ "
    " or in the resources directory of your application bundle.");
    }

    (in qapplication_mac.mm).

    Now, I'm wondering if there's some search path for the NIB files? Some environment variable I can set? I'm browsing Apple's docs but it's not clear to me.

  4. #4
    Join Date
    Apr 2013
    Posts
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: Qt internal error: qt_menu.nib could not be loaded

    Old thread, but will put some info here to help the next punter...


    1) I suspect your $QTDIR is the Qt source tree, not the QtGui.framework that the executable is suggesting you add qt_menu.nib into? The latter would be:

    Blah.app/Contents/Frameworks/QtGui.framework/Resources


    2) If you are running a console binary (i.e. CONFIG += console), something like this should work:

    ln -s $QTDIR/src/gui/mac/qt_menu.nib .
    ./executable


    3) There is a tool in Qt, macdeployqt, which might do the right thing?


    4) The Apple code that loads the NIB, NSBundle loadNibNamed, is actually deprecated in 10.8 onwards, but this should describe the directory structures:

    https://developer.apple.com/library/...123i-CH101-SW1

    However, creating Resources/en.lproj/qt_menu.nib didn't work for me :-(
    Last edited by NigelPearson; 10th April 2013 at 02:56. Reason: Phrase my guess as an assumption

Similar Threads

  1. internal error: no project could be found for
    By alphazero in forum Newbie
    Replies: 1
    Last Post: 16th November 2010, 13:16
  2. fatal error C1001: An internal error has occurred in the compiler
    By noodles in forum Installation and Deployment
    Replies: 0
    Last Post: 12th August 2010, 12:24
  3. QImage internal error
    By GiuseppeBonfa in forum Qt Programming
    Replies: 1
    Last Post: 4th August 2009, 15:12
  4. QHttp internal error
    By LubosD in forum Qt Programming
    Replies: 1
    Last Post: 16th August 2006, 10:57
  5. ERROR:: QPainter: Internal error; no available GC
    By Krishnacins in forum Qt Programming
    Replies: 2
    Last Post: 8th March 2006, 07:05

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.