saalfeldlab / paintera

GNU General Public License v2.0
100 stars 17 forks source link

Committing canvas fails on OSX, potentially depending on number of blocks to commit #153

Open hanslovsky opened 6 years ago

hanslovsky commented 6 years ago

It also seems that committing the canvas is slow, at least on OSX, yet to confirm on other platforms.

This is the error log that we have:

wangy3-lm1:~ wangy6$ paintera -Xmx14g --
[JavaFX Application Thread] INFO org.janelia.saalfeldlab.paintera.data.mask.MaskedSource - Updating cache directory: observable=StringProperty [value: /Users/wangy6/Desktop/DATA/MultiFISH/Image processing/saalfeld lab_John segment/Manual corrections/prediction_2_8k/canvases/canvas-6191914382176595069] oldValue=null newValue=/Users/wangy6/Desktop/DATA/MultiFISH/Image processing/saalfeld lab_John segment/Manual corrections/prediction_2_8k/canvases/canvas-6191914382176595069
[Thread-33] INFO org.janelia.saalfeldlab.paintera.data.n5.CommitCanvasN5 - Committing canvas: 144 blocks
2018-10-26 09:15:05.701 java[90948:7516645] IMKClient Stall detected, *please Report* your user scenario attaching a spindump (or sysdiagnose) that captures the problem - (imkxpc_presentFunctionRowItemTextInputViewWithEndpoint:reply:) block performed very slowly (16.89 secs).
2018-10-26 09:15:05.719 java[90948:7516645] IMKClient Stall detected, *please Report* your user scenario attaching a spindump (or sysdiagnose) that captures the problem - (imkxpc_presentFunctionRowItemTextInputViewWithEndpoint:reply:) block performed very slowly (7.11 secs).
2018-10-26 09:15:05.725 java[90948:7516645] IMKClient Stall detected, *please Report* your user scenario attaching a spindump (or sysdiagnose) that captures the problem - (imkxpc_presentFunctionRowItemTextInputViewWithEndpoint:reply:) block performed very slowly (1.64 secs).
2018-10-26 09:15:05.735 java[90948:7516645] *** Assertion failure in -[NSRemoteView informAuxServiceOfSelf], /Library/Caches/com.apple.xbs/Sources/ViewBridge/ViewBridge-283/NSRemoteView.m:3208
2018-10-26 09:15:05.746 java[90948:7516645] IMKInputSession presentFunctionRowItemTextInputViewWithEndpoint:completionHandler: : [self textInputContext]=0x7fbbe20aa210 *NO* NSRemoteViewController to client, NSError=Error Domain=com.apple.ViewBridge Code=8 "(null)" UserInfo={com.apple.ViewBridge.error.hint=__38-[NSRemoteView _advanceToConfigPhase:]_block_invoke.2466 caught NSInternalInconsistencyException '<NSRemoteView: 0x7fbbe45c4bb0> lost its aux service connection' with backtrace (
    0   CoreFoundation                      0x00007fffc36812cb __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x00007fffd849748d objc_exception_throw + 48
    2   CoreFoundation                      0x00007fffc3686042 +[NSException raise:format:arguments:] + 98
    3   Foundation                          0x00007fffc50cebe0 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
    4   ViewBridge                          0x00007fffd6eedbca -[NSRemoteView informAuxServiceOfSelf] + 495
    5   ViewBridge                          0x00007fffd6eee47e -[NSRemoteView _finishAdvanceToConfigPhaseWithContextID:andServiceViewSize:andOffset:] + 685
    6   ViewBridge                          0x00007fffd6f02298 __38-[NSRemoteView _advanceToConfigPhase:]_block_invoke.2466 + 103
    7   CoreFoundation                      0x00007fffc35f4b8c __invoking___ + 140
    8   CoreFoundation                      0x00007fffc35f4a11 -[NSInvocation invoke] + 289
    9   ViewBridge                          0x00007fffd6f29579 withHintInProgress + 487
    10  ViewBridge                          0x00007fffd6f292b0 __deferNSXPCInvocationOntoMainThread_block_invoke_2 + 233
    11  ViewBridge                          0x00007fffd6ead459 +[NSViewServiceApplication withHostPID:invoke:] + 46
    12  ViewBridge                          0x00007fffd6f29173 __deferNSXPCInvocationOntoMainThread_block_invoke + 179
    13  ViewBridge                          0x00007fffd6f28d67 __deferBlockOntoMainThread_block_invoke_2 + 544
    14  CoreFoundation                      0x00007fffc361717c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
    15  CoreFoundation                      0x00007fffc35f7f84 __CFRunLoopDoBlocks + 356
    16  CoreFoundation                      0x00007fffc35f7ac6 __CFRunLoopRun + 1878
    17  CoreFoundation                      0x00007fffc35f7114 CFRunLoopRunSpecific + 420
    18  ViewBridge                          0x00007fffd6f27a59 __invokeRunLoopInModeUntil_block_invoke + 20
    19  ViewBridge                          0x00007fffd6f279d5 invokeUntil + 232
    20  ViewBridge                          0x00007fffd6f27a3f invokeRunLoopInModeUntil + 72
    21  ViewBridge                          0x00007fffd6f08059 __29-[NSCFRunLoopSemaphore wait:]_block_invoke_2 + 133
    22  ViewBridge                          0x00007fffd6f07f7e __29-[NSCFRunLoopSemaphore wait:]_block_invoke + 313
    23  ViewBridge                          0x00007fffd6f06b44 +[NSCFRunLoopSemaphore _observe:whilePerforming:] + 986
    24  ViewBridge                          0x00007fffd6f07c8c -[NSCFRunLoopSemaphore wait:] + 605
    25  ViewBridge                          0x00007fffd6f08309 -[NSCFRunLoopSemaphore wait] + 42
    26  ViewBridge                          0x00007fffd6ee01e8 -[NSRemoteViewSemaphore wait] + 40
    27  ViewBridge                          0x00007fffd6eedab5 -[NSRemoteView informAuxServiceOfSelf] + 218
    28  ViewBridge                          0x00007fffd6eee47e -[NSRemoteView _finishAdvanceToConfigPhaseWithContextID:andServiceViewSize:andOffset:] + 685
    29  ViewBridge                          0x00007fffd6f02298 __38-[NSRemoteView _advanceToConfigPhase:]_block_invoke.2466 + 103
    30  CoreFoundation                      0x00007fffc35f4b8c __invoking___ + 140
    31  CoreFoundation                      0x00007fffc35f4a11 -[NSInvocation invoke] + 289
    32  ViewBridge                          0x00007fffd6f29579 withHintInProgress + 487
    33  ViewBridge                          0x00007fffd6f292b0 __deferNSXPCInvocationOntoMainThread_block_invoke_2 + 233
    34  ViewBridge                          0x00007fffd6ead459 +[NSViewServiceApplication withHostPID:invoke:] + 46
    35  ViewBridge                          0x00007fffd6f29173 __deferNSXPCInvocationOntoMainThread_block_invoke + 179
    36  ViewBridge                          0x00007fffd6f28d67 __deferBlockOntoMainThread_block_invoke_2 + 544
    37  CoreFoundation                      0x00007fffc361717c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
    38  CoreFoundation                      0x00007fffc35f7f84 __CFRunLoopDoBlocks + 356
    39  CoreFoundation                      0x00007fffc35f7ac6 __CFRunLoopRun + 1878
    40  CoreFoundation                      0x00007fffc35f7114 CFRunLoopRunSpecific + 420
    41  HIToolbox                           0x00007fffc2b57ebc RunCurrentEventLoopInMode + 240
    42  HIToolbox                           0x00007fffc2b57bf9 ReceiveNextEventCommon + 184
    43  HIToolbox                           0x00007fffc2b57b26 _BlockUntilNextEventMatchingListInModeWithFilter + 71
    44  AppKit                              0x00007fffc10eea54 _DPSNextEvent + 1120
    45  AppKit                              0x00007fffc186a7ee -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796
    46  AppKit                              0x00007fffc10e33db -[NSApplication run] + 926
    47  libglass.dylib                      0x000000013022f8f9 -[GlassApplication runLoop:] + 1897
    48  Foundation                          0x00007fffc505952a __NSThreadPerformPerform + 326
    49  CoreFoundation                      0x00007fffc3617321 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    50  CoreFoundation                      0x00007fffc35f821d __CFRunLoopDoSources0 + 557
    51  CoreFoundation                      0x00007fffc35f7716 __CFRunLoopRun + 934
    52  CoreFoundation                      0x00007fffc35f7114 CFRunLoopRunSpecific + 420
    53  java                                0x0000000106c6a46e CreateExecutionEnvironment + 871
    54  java                                0x0000000106c6603c JLI_Launch + 1952
    55  java                                0x0000000106c6c4cb main + 101
    56  java                                0x0000000106c65894 start + 52
), com.apple.ViewBridge.error.description=NSViewBridgeExceptionError}, com.apple.inputmethod.EmojiFunctionRowItem
2018-10-26 09:15:05.753 java[90948:7516645] *** Assertion failure in -[NSRemoteView informAuxServiceOfSelf], /Library/Caches/com.apple.xbs/Sources/ViewBridge/ViewBridge-283/NSRemoteView.m:3207
2018-10-26 09:15:05.755 java[90948:7516645] IMKInputSession presentFunctionRowItemTextInputViewWithEndpoint:completionHandler: : [self textInputContext]=0x7fbbe20aa210 *NO* NSRemoteViewController to client, NSError=Error Domain=com.apple.ViewBridge Code=8 "(null)" UserInfo={com.apple.ViewBridge.error.hint=__38-[NSRemoteView _advanceToConfigPhase:]_block_invoke.2466 caught NSInternalInconsistencyException '<NSRemoteView: 0x7fbbe274a150> failed to rendezvous via aux service' with backtrace (
    0   CoreFoundation                      0x00007fffc36812cb __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x00007fffd849748d objc_exception_throw + 48
    2   CoreFoundation                      0x00007fffc3686042 +[NSException raise:format:arguments:] + 98
    3   Foundation                          0x00007fffc50cebe0 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
    4   ViewBridge                          0x00007fffd6eedb34 -[NSRemoteView informAuxServiceOfSelf] + 345
    5   ViewBridge                          0x00007fffd6eee47e -[NSRemoteView _finishAdvanceToConfigPhaseWithContextID:andServiceViewSize:andOffset:] + 685
    6   ViewBridge                          0x00007fffd6f02298 __38-[NSRemoteView _advanceToConfigPhase:]_block_invoke.2466 + 103
    7   CoreFoundation                      0x00007fffc35f4b8c __invoking___ + 140
    8   CoreFoundation                      0x00007fffc35f4a11 -[NSInvocation invoke] + 289
    9   ViewBridge                          0x00007fffd6f29579 withHintInProgress + 487
    10  ViewBridge                          0x00007fffd6f292b0 __deferNSXPCInvocationOntoMainThread_block_invoke_2 + 233
    11  ViewBridge                          0x00007fffd6ead459 +[NSViewServiceApplication withHostPID:invoke:] + 46
    12  ViewBridge                          0x00007fffd6f29173 __deferNSXPCInvocationOntoMainThread_block_invoke + 179
    13  ViewBridge                          0x00007fffd6f28d67 __deferBlockOntoMainThread_block_invoke_2 + 544
    14  CoreFoundation                      0x00007fffc361717c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
    15  CoreFoundation                      0x00007fffc35f7f84 __CFRunLoopDoBlocks + 356
    16  CoreFoundation                      0x00007fffc35f7ac6 __CFRunLoopRun + 1878
    17  CoreFoundation                      0x00007fffc35f7114 CFRunLoopRunSpecific + 420
    18  HIToolbox                           0x00007fffc2b57ebc RunCurrentEventLoopInMode + 240
    19  HIToolbox                           0x00007fffc2b57bf9 ReceiveNextEventCommon + 184
    20  HIToolbox                           0x00007fffc2b57b26 _BlockUntilNextEventMatchingListInModeWithFilter + 71
    21  AppKit                              0x00007fffc10eea54 _DPSNextEvent + 1120
    22  AppKit                              0x00007fffc186a7ee -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796
    23  AppKit                              0x00007fffc10e33db -[NSApplication run] + 926
    24  libglass.dylib                      0x000000013022f8f9 -[GlassApplication runLoop:] + 1897
    25  Foundation                          0x00007fffc505952a __NSThreadPerformPerform + 326
    26  CoreFoundation                      0x00007fffc3617321 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    27  CoreFoundation                      0x00007fffc35f821d __CFRunLoopDoSources0 + 557
    28  CoreFoundation                      0x00007fffc35f7716 __CFRunLoopRun + 934
    29  CoreFoundation                      0x00007fffc35f7114 CFRunLoopRunSpecific + 420
    30  java                                0x0000000106c6a46e CreateExecutionEnvironment + 871
    31  java                                0x0000000106c6603c JLI_Launch + 1952
    32  java                                0x0000000106c6c4cb main + 101
    33  java                                0x0000000106c65894 start + 52
), com.apple.ViewBridge.error.description=NSViewBridgeExceptionError}, com.apple.inputmethod.EmojiFunctionRowItem
[Thread-33] INFO org.janelia.saalfeldlab.paintera.data.n5.CommitCanvasN5 - Finished commiting canvas
[Thread-33] INFO org.janelia.saalfeldlab.paintera.data.n5.CommitCanvasN5 - Finished updating label-block-lookup
[Thread-33] INFO org.janelia.saalfeldlab.paintera.data.mask.MaskedSource - Updating cache directory: observable=StringProperty [value: /Users/wangy6/Desktop/DATA/MultiFISH/Image processing/saalfeld lab_John segment/Manual corrections/prediction_2_8k/canvases/canvas-5816684835427707061] oldValue=/Users/wangy6/Desktop/DATA/MultiFISH/Image processing/saalfeld lab_John segment/Manual corrections/prediction_2_8k/canvases/canvas-6191914382176595069 newValue=/Users/wangy6/Desktop/DATA/MultiFISH/Image processing/saalfeld lab_John segment/Manual corrections/prediction_2_8k/canvases/canvas-5816684835427707061
hanslovsky commented 6 years ago

Potentially relevant links found by @bogovicj https://discussions.apple.com/thread/7367367 https://support.mozilla.org/en-US/questions/1208891

hanslovsky commented 6 years ago

Could be an issue with the touch bar in more recent MacBook models, this might be a (hacky) workaround: https://discussions.apple.com/thread/7367367?answerId=31995563022#31995563022

hanslovsky commented 6 years ago

cc @wangyuhan01

hanslovsky commented 5 years ago

Unfortunately this issue seems to be out of our control as it seems to be an issue with the apple touchbar, which we can not control.

Does disabling (as suggested in my previous commit or here) improve this situation?

I am afraid there is nothing else that we could do about this.

axtimwalde commented 5 years ago

...at this time. We will keep our eyes open for potential fixes workarounds coming up in the future.

pgunn commented 3 years ago

FYI, we're running into what might be this issue (Paintera fails to save correctly on OSX with a message about committing canvas) here, and are trying the touchbar workaround above.