Results 1 to 6 of 6

Thread: Qt 4.4 on Mac OS X - app crashes with NSInvalidArgumentException

  1. #1
    Join Date
    Mar 2008
    Location
    Wrocław, Poland
    Posts
    3
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Qt 4.4 on Mac OS X - app crashes with NSInvalidArgumentException

    I'm deploying an application on Mac OS X written in Qt4. Under Qt 4.3.x all works fine, but when I try to use Qt 4.4.3 application crashes:

    Qt Code:
    1. $ ./QNapi
    2. 2009-02-15 23:45:50.435 QNapi[55424:10b] *** _NSAutoreleaseNoPool(): Object 0xc1d2e0 of class NSCFString autoreleased with no pool in place - just leaking
    3. Stack: (0x95addadf 0x959ea1f2 0x9221b1f1 0x9221b25d 0x9221b2b1 0x9221994c 0x92219a12 0x921b1b57 0x724e4b 0xd1807 0x80c43 0x80e4b 0x2c020 0x28baf 0x669a 0x5d52 0x5c79)
    4. 2009-02-15 23:45:50.436 QNapi[55424:10b] *** _NSAutoreleaseNoPool(): Object 0xc1e5a0 of class NSCFString autoreleased with no pool in place - just leaking
    5. Stack: (0x95addadf 0x959ea1f2 0x959f564a 0x9221b27d 0x9221b2b1 0x9221994c 0x92219a12 0x921b1b57 0x724e4b 0xd1807 0x80c43 0x80e4b 0x2c020 0x28baf 0x669a 0x5d52 0x5c79)
    6. 2009-02-15 23:45:50.436 QNapi[55424:10b] *** -[NSCFBoolean length]: unrecognized selector sent to instance 0xa02a8400
    7. 2009-02-15 23:45:50.438 QNapi[55424:10b] *** _NSAutoreleaseNoPool(): Object 0xc1eaa0 of class NSCFString autoreleased with no pool in place - just leaking
    8. Stack: (0x95addadf 0x959ea1f2 0x9221b1f1 0x9221b25d 0x9221b2f1 0x9221994c 0x92219a12 0x921b1b57 0x724e4b 0xd1807 0x80c43 0x80e4b 0x2c020 0x28baf 0x669a 0x5d52 0x5c79)
    9. 2009-02-15 23:45:50.439 QNapi[55424:10b] *** _NSAutoreleaseNoPool(): Object 0xc1e820 of class NSCFString autoreleased with no pool in place - just leaking
    10. Stack: (0x95addadf 0x959ea1f2 0x959f564a 0x9221b27d 0x9221b2f1 0x9221994c 0x92219a12 0x921b1b57 0x724e4b 0xd1807 0x80c43 0x80e4b 0x2c020 0x28baf 0x669a 0x5d52 0x5c79)
    11. 2009-02-15 23:45:50.439 QNapi[55424:10b] *** _NSAutoreleaseNoPool(): Object 0xc1e850 of class NSCFString autoreleased with no pool in place - just leaking
    12. Stack: (0x95addadf 0x959ea1f2 0x959f564a 0x9221b312 0x9221994c 0x92219a12 0x921b1b57 0x724e4b 0xd1807 0x80c43 0x80e4b 0x2c020 0x28baf 0x669a 0x5d52 0x5c79)
    13. 2009-02-15 23:45:50.439 QNapi[55424:10b] *** _NSAutoreleaseNoPool(): Object 0xc1d0b0 of class NSException autoreleased with no pool in place - just leaking
    14. Stack: (0x95addadf 0x959ea1f2 0x9221b342 0x9221994c 0x92219a12 0x921b1b57 0x724e4b 0xd1807 0x80c43 0x80e4b 0x2c020 0x28baf 0x669a 0x5d52 0x5c79)
    15. 2009-02-15 23:45:50.440 QNapi[55424:10b] *** _NSAutoreleaseNoPool(): Object 0xc1e2b0 of class _NSCallStackArray autoreleased with no pool in place - just leaking
    16. Stack: (0x95addadf 0x959ea1f2 0x95a44078 0x9221414b 0x910ede3b 0x9221b34a 0x9221994c 0x92219a12 0x921b1b57 0x724e4b 0xd1807 0x80c43 0x80e4b 0x2c020 0x28baf 0x669a 0x5d52 0x5c79)
    17. 2009-02-15 23:45:50.441 QNapi[55424:10b] *** _NSAutoreleaseNoPool(): Object 0xc1ef30 of class NSCFString autoreleased with no pool in place - just leaking
    18. Stack: (0x95addadf 0x959ea1f2 0x959f564a 0x922140ce 0x910ede3b 0x9221b34a 0x9221994c 0x92219a12 0x921b1b57 0x724e4b 0xd1807 0x80c43 0x80e4b 0x2c020 0x28baf 0x669a 0x5d52 0x5c79)
    19. 2009-02-15 23:45:50.441 QNapi[55424:10b] *** _NSAutoreleaseNoPool(): Object 0xc1ee50 of class NSCFData autoreleased with no pool in place - just leaking
    20. Stack: (0x95addadf 0x959ea1f2 0x959fe8c5 0x959fe4a1 0x922140e2 0x910ede3b 0x9221b34a 0x9221994c 0x92219a12 0x921b1b57 0x724e4b 0xd1807 0x80c43 0x80e4b 0x2c020 0x28baf 0x669a 0x5d52 0x5c79)
    21. 2009-02-15 23:45:50.441 QNapi[55424:10b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFBoolean length]: unrecognized selector sent to instance 0xa02a8400'
    22. 2009-02-15 23:45:50.443 QNapi[55424:10b] Stack: (
    23. 2451652939,
    24. 2433670715,
    25. 2451682122,
    26. 2451675468,
    27. 2451675666,
    28. 2451250007,
    29. 7491147,
    30. 858119,
    31. 527427,
    32. 527947,
    33. 180256,
    34. 166831,
    35. 26266,
    36. 23890,
    37. 23673
    38. )
    39. Trace/BPT trap
    40. $
    To copy to clipboard, switch view to plain text mode 

    I've tried both Qt dmg installer and own static Qt compilation with the same result. Any ideas?

  2. #2
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt 4.4 on Mac OS X - app crashes with NSInvalidArgumentException

    hey mate, all i know is that exception is thrown when some invalid argument is passed into a function..prolly sm function in 4.3.x has changed in 4.4.3

  3. The following user says thank you to talk2amulya for this useful post:

    krzemin (15th February 2009)

  4. #3
    Join Date
    Mar 2008
    Location
    Wrocław, Poland
    Posts
    3
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt 4.4 on Mac OS X - app crashes with NSInvalidArgumentException

    Thanks for your quick response

    But I have really no idea what argument of what function could be invalid. I have commented out all code from main() except QApplication app(..) and app.exec(). Debuger says that application is interrupted at creating QApplication object. There is no crash when I use QCoreApplication instead of QApplication.

  5. #4
    Join Date
    Feb 2009
    Location
    ŁÃ³dź, Poland
    Posts
    20
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt 4.4 on Mac OS X - app crashes with NSInvalidArgumentException

    Hey,

    there's everything allright with your app. The only problem is with your Info.plist file, and customising LSUIElement property - "Application is agent(UIElement)". The same happens to me when I try to customize it. Regardless of the value (true or false) this setting causes application to crash badly. When these lines are removed from Info.plist file:
    <key>LSUIElement</key>
    <true/>
    my application works, and so does yours (I've checked it ). Unfortunately, the application icon is then visible in dock, and you also get the unnecessary menu bar, but I guess this is the only way to get things working. I didn't find any solution to this problem so far, and neither did google. Just one trace of this issue, where guys gave up...

  6. #5
    Join Date
    Feb 2009
    Location
    ŁÃ³dź, Poland
    Posts
    20
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt 4.4 on Mac OS X - app crashes with NSInvalidArgumentException

    I've just checked with Qt 4.5 release candidate, and this setting works!

  7. The following user says thank you to ayoy for this useful post:

    krzemin (5th March 2009)

  8. #6
    Join Date
    Mar 2008
    Location
    Wrocław, Poland
    Posts
    3
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt 4.4 on Mac OS X - app crashes with NSInvalidArgumentException

    I've compiled app in Qt 4.5.0 stable without applying any changes in this area and all works fine No ugly crash and no dock icon is visible. It seems it was bug in Qt 4.4.x.

Similar Threads

  1. QGraphicsScene render() crashes
    By iebele in forum Qt Programming
    Replies: 0
    Last Post: 29th April 2008, 13:38
  2. Replies: 10
    Last Post: 19th October 2007, 19:17
  3. Designer crashes when selecting some widgets
    By gwendal in forum Qt Tools
    Replies: 4
    Last Post: 21st July 2006, 13:18
  4. Reading from TCP Socket crashes program
    By OnionRingOfDoom in forum Qt Programming
    Replies: 26
    Last Post: 27th January 2006, 19:32

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.