Program Crashed: address 0x0001141e7340 which does not point to an object of type 'QObjectData'
-
Hi,
I have developed a screenshot app using Qt and Qt Quick. I use QML for the desktop UI and cpp for the backends logical process. Of cause, for best performance, I have use a lot ofQQuickPaintedItemand register it to Qml Engine.Now, when I debug app using ASAN, the app crashed. I don't know if is the Qt bug or my code bug. I really need your help.
Thanks.
/Users/steff/code/myapp/build/Qt_6_7_3_macos-Debug/myapp_autogen/S5MZHKY2R4/moc_app_context.cpp:146:28: runtime error: member access within address 0x00010825b180 which does not point to an object of type 'QObjectData' 0x00010825b180: note: object is of type 'QObjectPrivate' 00 00 00 00 c8 ff b4 06 01 00 00 00 a0 42 1d 08 01 00 00 00 b0 6e e0 6c 01 00 00 00 00 00 00 00 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'QObjectPrivate' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/steff/code/myapp/build/Qt_6_7_3_macos-Debug/myapp_autogen/S5MZHKY2R4/moc_app_context.cpp:146:28 in /Users/steff/code/myapp/build/Qt_6_7_3_macos-Debug/myapp_autogen/I55BME2QEZ/moc_settings.cpp:118:28: runtime error: member access within address 0x00010825ae80 which does not point to an object of type 'QObjectData' 0x00010825ae80: note: object is of type 'QObjectPrivate' 00 00 00 00 c8 ff b4 06 01 00 00 00 c0 e6 75 08 01 00 00 00 b0 6e e0 6c 01 00 00 00 30 e6 75 08 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'QObjectPrivate' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/steff/code/myapp/build/Qt_6_7_3_macos-Debug/myapp_autogen/I55BME2QEZ/moc_settings.cpp:118:28 in /Users/steff/code/myapp/build/Qt_6_7_3_macos-Debug/myapp_autogen/I55BME2QEZ/moc_globalhotkey.cpp:137:28: runtime error: member access within address 0x00010825af40 which does not point to an object of type 'QObjectData' 0x00010825af40: note: object is of type 'QObjectPrivate' 00 00 00 00 c8 ff b4 06 01 00 00 00 f0 e6 75 08 01 00 00 00 b0 6e e0 6c 01 00 00 00 00 00 00 00 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'QObjectPrivate' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/steff/code/myapp/build/Qt_6_7_3_macos-Debug/myapp_autogen/I55BME2QEZ/moc_globalhotkey.cpp:137:28 in ==57421==SetCurrentThread: 0x000103bfc3c0 for thread 0x00016d8cb000 ==57421==SetCurrentThread: 0x000103bfc500 for thread 0x00016d9e3000 ==57421==SetCurrentThread: 0x000103bfc460 for thread 0x00016d957000 ==57421==T6: stack [0x00016d848000,0x00016d8cb000) size 0x83000; local=0x00016d8caf78 ==57421==T8: stack [0x00016d960000,0x00016d9e3000) size 0x83000; local=0x00016d9e2f78 ==57421==T7: stack [0x00016d8d4000,0x00016d957000) size 0x83000; local=0x00016d956f78 /Users/steff/code/myapp/build/Qt_6_7_3_macos-Debug/myapp_autogen/I55BME2QEZ/moc_translator.cpp:101:28: runtime error: member access within address 0x00010825b0c0 which does not point to an object of type 'QObjectData' 0x00010825b0c0: note: object is of type 'QObjectPrivate' 00 00 00 00 c8 ff b4 06 01 00 00 00 50 b0 96 08 01 00 00 00 b0 6e e0 6c 01 00 00 00 00 00 00 00 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'QObjectPrivate' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/steff/code/myapp/build/Qt_6_7_3_macos-Debug/myapp_autogen/I55BME2QEZ/moc_translator.cpp:101:28 in /Users/steff/code/myapp/build/Qt_6_7_3_macos-Debug/3rdparty/QHotkey/qhotkey_autogen/CDZSFYPHEU/moc_qhotkey_p.cpp:159:28: runtime error: member access within address 0x0001141e7340 which does not point to an object of type 'QObjectData' 0x0001141e7340: note: object is of type 'QObjectPrivate' 00 00 00 00 c8 ff b4 06 01 00 00 00 c0 a5 7e 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'QObjectPrivate' -
here is the thread backtrace:
Process 2636 stopped * thread #18, name = 'QSGRenderThread', stop reason = EXC_BREAKPOINT (code=1, subcode=0x19ea5a3ec) frame #0: 0x000000019ea5a3ec libsystem_c.dylib`__abort + 160 libsystem_c.dylib`__abort: -> 0x19ea5a3ec <+160>: brk #0x1 libsystem_c.dylib`abort_report_np: 0x19ea5a3f0 <+0>: pacibsp 0x19ea5a3f4 <+4>: sub sp, sp, #0x30 0x19ea5a3f8 <+8>: stp x20, x19, [sp, #0x10] (lldb) bt * thread #18, name = 'QSGRenderThread', stop reason = EXC_BREAKPOINT (code=1, subcode=0x19ea5a3ec) * frame #0: 0x000000019ea5a3ec libsystem_c.dylib`__abort + 160 frame #1: 0x000000019ea5a34c libsystem_c.dylib`abort + 180 frame #2: 0x0000000103b9c060 libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Abort() + 68 frame #3: 0x0000000103b9b728 libclang_rt.asan_osx_dynamic.dylib`__sanitizer::Die() + 212 frame #4: 0x0000000103b9b7d0 libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) + 156 frame #5: 0x0000000103b9c190 libclang_rt.asan_osx_dynamic.dylib`__sanitizer::UnsetAlternateSignalStack() + 100 frame #6: 0x0000000103b86a8c libclang_rt.asan_osx_dynamic.dylib`__asan::AsanThread::Destroy() + 252 frame #7: 0x000000019eb1db88 libsystem_pthread.dylib`_pthread_tsd_cleanup + 448 frame #8: 0x000000019eb20968 libsystem_pthread.dylib`_pthread_exit + 84 frame #9: 0x000000019eb20278 libsystem_pthread.dylib`_pthread_start + 160