Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-14749

QSettings crashes on Mac when trying to read a corrupt plist file.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P2: Important
    • None
    • 4.7.0
    • Core: I/O
    • None
    • Tested on Mac OS X 10.6
    • macOS

    Description

      Sometimes the plist settings file can get in a corrupted state.

      This causes QSettings to crash with a stack trace similar to the following :

      Process: qsettings_test [40007] 
      Path: ./qsettings_test.app/Contents/MacOS/qsettings_test 
      Identifier: qsettings_test 
      Version: ??? (???) 
      Code Type: X86 (Native) 
      Parent Process: bash [9715] 
      
      Date/Time: 2010-10-22 21:05:00.850 +0400 
      OS Version: Mac OS X 10.5.8 (9L30) 
      Report Version: 6 
      Anonymous UUID: 2160AA92-5DF6-498C-BA75-6885433E485F 
      
      Exception Type: EXC_BREAKPOINT (SIGTRAP) 
      Exception Codes: 0x0000000000000002, 0x0000000000000000 
      Crashed Thread: 0 
      
      Application Specific Information: 
      *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSNull length]: unrecognized selector sent to instance 0xa0420020' 
      
      Thread 0 Crashed: 
      0 com.apple.CoreFoundation 0x943dce94 ___TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION___ + 4 
      1 libobjc.A.dylib 0x9048be3b objc_exception_throw + 40 
      2 com.apple.CoreFoundation 0x943e41ea -[NSObject doesNotRecognizeSelector:] + 186 
      3 com.apple.CoreFoundation 0x943e27ec ___forwarding___ + 892 
      4 com.apple.CoreFoundation 0x943e28b2 _CF_forwarding_prep_0 + 50 
      5 com.apple.CoreFoundation 0x9437a9f7 CFStringGetLength + 215 
      6 libQtCorePrl_debug.4.dylib 0x005e6f05 QCFString::toQString(__CFString const*) + 43 
      7 libQtCorePrl_debug.4.dylib 0x0058bcb0 qtKey(__CFString const*) + 34 
      8 libQtCorePrl_debug.4.dylib 0x0058e9ca QMacSettingsPrivate::children(QString const&, QSettingsPrivate::ChildSpec) const + 234 
      9 libQtCorePrl_debug.4.dylib 0x0058dbb7 QMacSettingsPrivate::remove(QString const&) + 115 
      10 libQtCorePrl_debug.4.dylib 0x005678d4 QSettings::remove(QString const&) + 214 
      11 com.yourcompany.qsettings_test 0x00003c34 main + 2194 (test.cpp:25) 
      12 com.yourcompany.qsettings_test 0x00002d2b _start + 209 
      13 com.yourcompany.qsettings_test 0x00002c59 start + 41 
      
      Thread 0 crashed with X86 Thread State (32-bit): 
      eax: 0xa04210f0 ebx: 0x9048be1c ecx: 0xa04201a0 edx: 0x00008000 
      edi: 0xa0457f40 esi: 0xa0420020 ebp: 0xbfffe908 esp: 0xbfffe908 
      ss: 0x0000001f efl: 0x00000286 eip: 0x943dce94 cs: 0x00000017 
      ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037 
      cr2: 0xffe17df8 
      

      Attachments

        For Gerrit Dashboard: QTBUG-14749
        # Subject Branch Project Status CR V

        Activity

          People

            sgaist Samuel Gaist
            dettman Dean Dettman (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes