EXC_BAD_ACCESS (SIGSEGV) On OSX 10.9.2 With Qt Application

痴心易碎 提交于 2019-12-25 07:24:35

问题


I build OSX wallets for various cryptocurrencies and use QT 4.8.5 to build them.

One of the users of my .app files recently sent me these error logs which appear when he tries to open any of the apps I built on his system. He did appear to be a one off case so I assumed something was wrong with his system but someone else posted another log citing the same issue. I cannot seem to pinpoint the issue. Any ideas on what's wrong?

Process:         FairCoin-Qt [42516]
Path:            /Users/USER/Downloads/FairCoin-Qt 3.app/Contents/MacOS/FairCoin-Qt
Identifier:      com.yourcompany.FairCoin-Qt
Version:         ???
Code Type:       X86-64 (Native)
Parent Process:  launchd [145]
Responsible:     FairCoin-Qt [42516]
User ID:         501

Date/Time:       2014-04-17 11:04:09.485 +0200
OS Version:      Mac OS X 10.9.2 (13C64)
Report Version:  11
Anonymous UUID:  61FC4C8C-2509-6D30-A775-5C3E7F320AB1

Sleep/Wake UUID: CEC509C8-BC3E-4170-8656-A3B9499E5BB9

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000

VM Regions Near 0:
--> 
    __TEXT                 0000000100000000-0000000100540000 [ 5376K] r-x/rwx SM=COQ /Users/USER/Downloads/FairCoin-Qt 3.app/Contents/MacOS/FairCoin-Qt

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   QtGui                           0x0000000109ebb570 QApplication::setActiveWindow(QWidget*) + 400
1   QtGui                           0x0000000109e4fe94 onApplicationWindowChangedActivation(QWidget*, bool) + 100
2   com.apple.CoreFoundation        0x00007fff8cb3ce0c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
3   com.apple.CoreFoundation        0x00007fff8ca30a6d _CFXNotificationPost + 2893
4   com.apple.Foundation            0x00007fff8bb297ba -[NSNotificationCenter postNotificationName:object:userInfo:] + 68
5   QtGui                           0x0000000100a3e12b QWidgetPrivate::setParent_sys(QWidget*, QFlags<Qt::WindowType>) + 5163
6   com.apple.AppKit                0x00007fff91e36a67 _NXShowKeyAndMain + 171
7   com.apple.AppKit                0x00007fff91cd3ad6 -[NSApplication sendEvent:] + 7127
8   QtGui                           0x0000000100a4b8b2 QMacInputContext::reset() + 45538
9   com.apple.AppKit                0x00007fff91b22b89 -[NSApplication run] + 646
10  QtGui                           0x0000000100a541bf QDesktopWidget::resizeEvent(QResizeEvent*) + 3887
11  QtGui                           0x0000000100a55de1 QDesktopWidget::resizeEvent(QResizeEvent*) + 11089
12  QtCore                          0x00000001016e8d35 QCoreApplication::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 69
13  QtGui                           0x0000000100af77cf QWidgetPrivate::show_helper() + 639
14  QtGui                           0x0000000100af7a1f QWidget::setVisible(bool) + 511
15  com.yourcompany.FairCoin-Qt     0x000000010002b022 main + 7794
16  com.yourcompany.FairCoin-Qt     0x0000000100027fd8 start + 52

Thread 1:
0   libsystem_kernel.dylib          0x00007fff90c3be6a __workq_kernreturn + 10
1   libsystem_pthread.dylib         0x00007fff97dcff08 _pthread_wqthread + 330
2   libsystem_pthread.dylib         0x00007fff97dd2fb9 start_wqthread + 13

Thread 2:: Dispatch queue: com.apple.libdispatch-manager
0   libsystem_kernel.dylib          0x00007fff90c3c662 kevent64 + 10
1   libdispatch.dylib               0x00007fff8a7b243d _dispatch_mgr_invoke + 239
2   libdispatch.dylib               0x00007fff8a7b2152 _dispatch_mgr_thread + 52

Thread 3:
0   libsystem_kernel.dylib          0x00007fff90c3be6a __workq_kernreturn + 10
1   libsystem_pthread.dylib         0x00007fff97dcff08 _pthread_wqthread + 330
2   libsystem_pthread.dylib         0x00007fff97dd2fb9 start_wqthread + 13

Thread 4:
0   libsystem_kernel.dylib          0x00007fff90c3be6a __workq_kernreturn + 10
1   libsystem_pthread.dylib         0x00007fff97dcff08 _pthread_wqthread + 330
2   libsystem_pthread.dylib         0x00007fff97dd2fb9 start_wqthread + 13

Thread 5:
0   libsystem_kernel.dylib          0x00007fff90c37a1a mach_msg_trap + 10
1   libsystem_kernel.dylib          0x00007fff90c36d18 mach_msg + 64
2   com.apple.CoreFoundation        0x00007fff8ca91155 __CFRunLoopServiceMachPort + 181
3   com.apple.CoreFoundation        0x00007fff8ca90779 __CFRunLoopRun + 1161
4   com.apple.CoreFoundation        0x00007fff8ca900b5 CFRunLoopRunSpecific + 309
5   com.apple.AppKit                0x00007fff91ccf16e _NSEventThread + 144
6   libsystem_pthread.dylib         0x00007fff97dce899 _pthread_body + 138
7   libsystem_pthread.dylib         0x00007fff97dce72a _pthread_start + 137
8   libsystem_pthread.dylib         0x00007fff97dd2fc9 thread_start + 13

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x00007fff5fbff660  rcx: 0x0000000101c66130  rdx: 0x0000000000000002
  rdi: 0x00007fff5fbff660  rsi: 0x0000000000000001  rbp: 0x00007fff5fbfe880  rsp: 0x00007fff5fbfe7e0
  r8: 0x0000000106ea5410   r9: 0x0000000000000011  r10: 0x0000000101b4a1d0  r11: 0x00007fff7ab45c88
  r12: 0x00000000000f4282  r13: 0x00007fff5fbfea80  r14: 0x00007fff5fbff660  r15: 0x000000010a6e8418
  rip: 0x0000000109ebb570  rfl: 0x0000000000010202  cr2: 0x0000000000000000

Logical CPU:     1
Error Code:      0x00000004
Trap Number:     14


External Modification Summary:
  Calls made by other processes targeting this process:
  task_for_pid: 1
  thread_create: 0
  thread_set_state: 0
Calls made by this process:
  task_for_pid: 0
  thread_create: 0
  thread_set_state: 0
Calls made by all processes on this machine:
  task_for_pid: 126855
  thread_create: 2
  thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=200.9M resident=76.7M(38%) swapped_out_or_unallocated=124.3M(62%)
Writable regions: Total=75.9M written=4632K(6%) resident=10.2M(13%) swapped_out=1224K(2%) unallocated=65.7M(87%)

REGION TYPE                      VIRTUAL
===========                      =======
CG backing stores                   452K
CG shared images                    172K
CoreServices                       1068K
Dispatch continuations             8192K
Kernel Alloc Once                     8K
MALLOC                             38.8M
MALLOC (admin)                       32K
Memory Tag 242                       12K
STACK GUARD                        56.0M
Stack                              10.1M
VM_ALLOCATE                        16.3M
__DATA                             20.9M
__IMAGE                             528K
__LINKEDIT                         73.9M
__TEXT                            127.0M
__UNICODE                           544K
mapped file                        82.0M
shared memory                         4K
===========                      =======
TOTAL                             435.9M

I've cut out the binaries loaded part to trim the error down to size but you can find the full error log and the rest of the error logs here:

FairCoin-Qt CannaCoin-Qt


回答1:


I know it's been a while but I just dealt with an essentially identical error. Long story short, this was caused by a collision between two versions of Qt. There are several possible causes:

  • The most common seems to be a plugin with its own version of Qt.
  • In my case, it was an issue where PyInstaller wasn't getting my application pointed to the included version of Qt so it was conflicting with the general installation in my Library.

I actually removed my install of Qt to confirm that this was actually the issue (the app ran fine afterwards). By extension, you'd only see the issue among customers who have an installation of Qt.

Two ways users can diagnose the issue:

  • Open the .app folder and navigate down to Contents/MacOS. Run the program from this location. You'll get a terminal showing errors like these: http://www.pyinstaller.org/ticket/472.
  • Confirm the presence of a Qt install. (Temporarily) move the Qt Libraries and see if the app runs successfully.


来源:https://stackoverflow.com/questions/23130322/exc-bad-access-sigsegv-on-osx-10-9-2-with-qt-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!