Zotero beta keeps crashing on Mac

Zotero report ID: 2051273446

The Zotero beta keeps crashing for me (on macOS 11.6). It has never crashed on me while actively using it, but I frequently find a crash report instead of a running Zotero app when I am trying to return to the app after some time.
Unfortunately I do not have a way to reproduce the issue (yet?), but I am hoping that the stack trace from the crash report (copied below) might still help tracking down this issue.

Some potentially relevant details on how I use Zotero:
I am using Zotfile to store attached PDFs in a Dropbox folder. I am accessing the papers in that folder from my iPad and make changes to those files (adding highlights) that get synced back by Dropbox to the Mac.
Also, because the stack trace looks like it might be related to the windowing system: I am running on an 27" iMac with an additional 27" display attached that is in mirroring mode. The internal iMac screen is Retina resolution, the external screen is not.

The most recent (abbreviated) crash report:
Process: zotero [77541]
Path: /Applications/Zotero.app/Contents/MacOS/zotero
Identifier: org.zotero.zotero-beta
Version: 5.0.97-beta.48+67720cf74 (5.0.97)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: zotero [77541]
User ID: 501

Date/Time: 2021-10-14 23:56:12.287 -0700
OS Version: macOS 11.6 (20G165)
Report Version: 12
Anonymous UUID: 4F218997-7168-BB83-3429-D6FCA6A171D9

Sleep/Wake UUID: 61EA86EF-23F0-41F7-876F-4E93F8502ECB

System Integrity Protection: enabled

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

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00007ffee93edff8
Exception Note: EXC_CORPSE_NOTIFY

Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [77541]

VM Regions Near 0x7ffee93edff8:
MALLOC_SMALL 7faa58000000-7faa58800000 [ 8192K] rw-/rwx SM=PRV
--> STACK GUARD 7ffee5bee000-7ffee93ee000 [ 56.0M] ---/rwx SM=NUL stack guard for thread 0
Stack 7ffee93ee000-7ffee9bee000 [ 8192K] rw-/rwx SM=SHM thread 0

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_pthread.dylib 0x00007fff204fb47f ___chkstk_darwin + 55
1 com.apple.CoreGraphics 0x00007fff25117528 vImageConverter_convert_internal + 17
2 com.apple.CoreGraphics 0x00007fff2511749f vImageConverterConvert + 460
3 com.apple.CoreGraphics 0x00007fff2511630a convert_using_vImageConverter + 246
4 com.apple.CoreGraphics 0x00007fff25115bd4 convert_icc + 200
5 com.apple.CoreGraphics 0x00007fff25115aeb CGCMSConverterConvert + 152
6 com.apple.CoreGraphics 0x00007fff251159c3 CGCMSConverterConvertColorComponents + 724
7 com.apple.CoreGraphics 0x00007fff25113f50 CGColorTransformConvertColorComponents + 620
8 com.apple.CoreGraphics 0x00007fff251243c8 ripc_GetColor + 1720
9 com.apple.CoreGraphics 0x00007fff2512337d ripc_Render + 169
10 com.apple.CoreGraphics 0x00007fff25120434 ripc_DrawRects + 463
11 com.apple.CoreGraphics 0x00007fff251201d5 CGContextFillRects + 96
12 com.apple.CoreGraphics 0x00007fff2512016a CGContextFillRect + 105
13 com.apple.CoreGraphics 0x00007fff2511fce9 CGContextClearRect + 48
14 com.apple.AppKit 0x00007fff22f645d6 +[NSCGImageSnapshotRep _lockFocusForCreatingSnapshot:withRect:context:hints:flipped:] + 923
15 com.apple.AppKit 0x00007fff22f63ff6 -[NSImage _lockFocusOnRepresentation:rect:context:hints:flipped:] + 440
16 com.apple.AppKit 0x00007fff22f63e2f __51-[NSImage lockFocusWithRect:context:hints:flipped:]_block_invoke + 66
17 com.apple.AppKit 0x00007fff22f44f39 -[NSImage _usingBestRepresentationForRect:context:hints:body:] + 129
18 com.apple.AppKit 0x00007fff22f63de3 -[NSImage lockFocusWithRect:context:hints:flipped:] + 141
19 com.apple.AppKit 0x00007fff22feb9c7 -[NSImage lockFocusFlipped:] + 111
20 com.apple.AppKit 0x00007fff22feb806 -[NSWindow _generateCompositedBackground] + 196
21 com.apple.AppKit 0x00007fff22feb71c -[NSWindow _compositedBackground] + 46
22 com.apple.AppKit 0x00007fff236ad094 -[NSWindow _cornerMaskShouldDefineShadow] + 46
23 com.apple.AppKit 0x00007fff230b3dce -[NSWindow _cornerMaskChanged] + 102
24 com.apple.AppKit 0x00007fff2304a80a __67-[NSWindow _updateSettingsSendingScreenChangeNotificationToScreen:]_block_invoke + 575
25 com.apple.AppKit 0x00007fff22e5074f NSPerformVisuallyAtomicChange + 132
26 com.apple.AppKit 0x00007fff2304a5c5 -[NSWindow _updateSettingsSendingScreenChangeNotificationToScreen:] + 69
27 com.apple.AppKit 0x00007fff22e51fa0 -[NSWindow _setFrameCommon:display:fromServer:] + 1401
28 XUL 0x00000001086ab107 0x10664e000 + 33935623

[...]

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000008200 rbx: 0x0000000000000240 rcx: 0x00007ffee93ee000 rdx: 0x00007ffee93f6468
rdi: 0x000000010e4a2c00 rsi: 0x00007ffee93f6448 rbp: 0x00007ffee93f6070 rsp: 0x00007ffee93f5fd8
r8: 0x0000000000000010 r9: 0x0000000000000001 r10: 0x0000000000000001 r11: 0x00000000000000c0
r12: 0x00007ffee93f60a0 r13: 0xfffffffffffffe3f r14: 0x000000010e4a2c00 r15: 0x00007ffee93f60a0
rip: 0x00007fff204fb47f rfl: 0x0000000000010216 cr2: 0x00007ffee93edff8

Logical CPU: 0
Error Code: 0x00000004 (no mapping for user data read)
Trap Number: 14


Model: iMac18,3, BootROM 429.140.8.0.0, 4 processors, Quad-Core Intel Core i7, 4.2 GHz, 24 GB, SMC 2.41f2
Graphics: kHW_AMDRadeonPro575Item, Radeon Pro 575, spdisplays_pcie_device, 4 GB
  • For the moment, best to just see if this is fixed in Monterey later this month.
  • Is that because Zotero will require Monterey?
  • No, of course not — it's just a new version of macOS that might fix this bug.
  • Ok, still seems important to fix this crash for users on older macOS versions then, even if this crash might no longer happen under Monterey.
  • If it's a macOS bug, it will be fixed in a new macOS version and there's nothing we can do about it.
  • Sure, yes, that makes sense. If you are 100% sure that this is a macOS bug that can't be worked around. However I will add that Zotero is the only Mac app out of very many that regularly crashes for me.
    I can live with it no problem, just wanted to bring it to the developers' attention.
  • As a developer myself (primarily iOS) I work around OS bugs all the time.
    Also crashes in system frameworks are quite often due to incorrect use of system APIs.
    OS bugs causing crashes that can't be worked around definitely exist, but are quite rare in my experience.
  • edited October 15, 2021
    Do I read the stack trace right that something in "XUL" calls a private system API?
  • Zotero is built on Firefox, and specifically an older version of Firefox, so we're limited in the degree to which we can fix things like this — the vast majority of Zotero code isn't at a level that can cause things like this. We've occasionally backported Firefox fixes for larger issues — e.g., general Big Sur compatibility — but that requires building a custom version of Firefox, which is quite an ordeal.

    Yours is the first report we've received of this, so this isn't affecting most users and is likely related to something specific about your system or monitor setup, or is a regression in 11.6 if you only started seeing it recently. It will most likely be fixed either in a macOS update or in a future version of Zotero that's based on a newer version of Firefox. That's pretty much all we can tell you.
  • Thanks for the context, that makes sense.
    As I said, I can live with it fine, just have to restart the app every now and then.
  • I wonder if this is similar / same as the issue I'm having? https://forums.zotero.org/discussion/92271/desktop-beta-crash#latest

    Copying in most recent crash report (which I don't know how to read, so apologies if this is random coincidence or meaningless noise!).

    Process: zotero [5741]
    Path: /Applications/Zotero.app/Contents/MacOS/zotero
    Identifier: org.zotero.zotero-beta
    Version: 5.0.97-beta.52+59455ebfa (5.0.97)
    Code Type: X86-64 (Native)
    Parent Process: ??? [1]
    Responsible: zotero [5741]
    User ID: 501

    Date/Time: 2021-11-03 22:03:57.052 +1100
    OS Version: macOS 11.6 (20G165)
    Report Version: 12
    Anonymous UUID: E4A0E4D9-1CC1-A090-F4B7-7E9848B3E005

    Sleep/Wake UUID: 9316FAA1-C475-4A49-8220-E24D63B2C169

    Time Awake Since Boot: 1100000 seconds
    Time Since Wake: 170000 seconds

    System Integrity Protection: enabled

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

    Exception Type: EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: KERN_PROTECTION_FAILURE at 0x00007ffee6823ff8
    Exception Note: EXC_CORPSE_NOTIFY

    Termination Signal: Segmentation fault: 11
    Termination Reason: Namespace SIGNAL, Code 0xb
    Terminating Process: exc handler [5741]

    VM Regions Near 0x7ffee6823ff8:
    MALLOC_SMALL 7fe333000000-7fe333800000 [ 8192K] rw-/rwx SM=PRV
    --> STACK GUARD 7ffee3024000-7ffee6824000 [ 56.0M] ---/rwx SM=NUL stack guard for thread 0
    Stack 7ffee6824000-7ffee7024000 [ 8192K] rw-/rwx SM=SHM thread 0

    Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
    0 com.apple.CoreFoundation 0x00007fff20587c90 CFCachedStringEqual + 20
    1 com.apple.CoreFoundation 0x00007fff205853e8 _CFXNotificationRegistrarFindName + 89
    2 com.apple.CoreFoundation 0x00007fff20585123 CFXNotificationRegistrarFind + 392
    3 com.apple.CoreFoundation 0x00007fff20441c5e _CFXNotificationPost + 624
    4 com.apple.AppKit 0x00007fff22cbe186 -[NSView _postFrameChangeNotification] + 304
    5 com.apple.AppKit 0x00007fff22cb703c -[NSView setFrameSize:] + 2357
    6 com.apple.AppKit 0x00007fff22ece3c7 -[NSNextStepFrame setFrameSize:] + 195
    7 com.apple.AppKit 0x00007fff22cd7cd7 -[NSWindow _oldPlaceWindow:fromServer:] + 714
    8 com.apple.AppKit 0x00007fff22cd5f69 -[NSWindow _setFrameCommon:display:fromServer:] + 1346
    9 XUL 0x000000010dd7f107 0x10bd22000 + 33935623

    [...]
  • Are you using an external monitor? I strongly suspect that it is related to that in my case.
    The stack trace in your crash report does look quite similar.
  • It is crashing at the exact same place in the XUL framework.
Sign In or Register to comment.