Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7988351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:25:09+00:00 2026-06-04T12:25:09+00:00

I installed the VTK toolkit and I use the Java wrapper for VTK in

  • 0

I installed the VTK toolkit and I use the Java wrapper for VTK in Eclipse. I added the vtk.jar to my java project and set the environment variable to point to my VTK installation.
Basically, it is working. The vtk classes etc. are found and the program starts, at least until I come to the point where I show a/the window.

For instance following example program:
http://www.vtk.org/Wiki/VTK/Examples/Java/Imaging/ImageTest

If I run it, the following exception is thrown by OS-X (or Cocoa) stating some problems with the UndoManager:

I have no clue what I am doing wrong or what causes this problem, anyone any ideas?

2012-05-22 22:48:09.093 java[925:1a03] *** Assertion failure in +[NSUndoManager _endTopLevelGroupings], /SourceCache/Foundation/Foundation-833.25/Misc.subproj/NSUndoManager.m:324
2012-05-22 22:48:09.093 java[925:1a03] +[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.
2012-05-22 22:48:09.096 java[925:1a03] (
    0   CoreFoundation                      0x00007fff9363cf56 __exceptionPreprocess + 198
    1   libobjc.A.dylib                     0x00007fff8aa9fd5e objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff9363cd8a +[NSException raise:format:arguments:] + 106
    3   Foundation                          0x00007fff910a371f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 169
    4   Foundation                          0x00007fff9101295f +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 144
    5   AppKit                              0x00000001025680ef -[NSApplication run] + 596
    6   libvtkRendering.5.10.dylib          0x000000010ff8c2df -[vtkCocoaServer start] + 335
    7   libvtkRendering.5.10.dylib          0x000000010ff8cf87 _ZN30vtkCocoaRenderWindowInteractor5StartEv + 293
    8   libvtkRenderingJava.5.10.0.dylib    0x000000010f94f29e Java_vtk_vtkRenderWindowInteractor_Start_15 + 62
    9   ???                                 0x0000000103b70d6e 0x0 + 4357295470
    10  ???                                 0x0000000103b6585a 0x0 + 4357249114
)
2012-05-22 22:48:09.096 java[925:1a03] *** Assertion failure in +[NSUndoManager _endTopLevelGroupings], /SourceCache/Foundation/Foundation-833.25/Misc.subproj/NSUndoManager.m:324
2012-05-22 22:48:09.096 java[925:1a03] An uncaught exception was raised
2012-05-22 22:48:09.097 java[925:1a03] +[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.
2012-05-22 22:48:09.098 java[925:1a03] (
    0   CoreFoundation                      0x00007fff9363cf56 __exceptionPreprocess + 198
    1   libobjc.A.dylib                     0x00007fff8aa9fd5e objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff9363cd8a +[NSException raise:format:arguments:] + 106
    3   Foundation                          0x00007fff910a371f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 169
    4   Foundation                          0x00007fff9101295f +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 144
    5   AppKit                              0x000000010256819c -[NSApplication run] + 769
    6   libvtkRendering.5.10.dylib          0x000000010ff8c2df -[vtkCocoaServer start] + 335
    7   libvtkRendering.5.10.dylib          0x000000010ff8cf87 _ZN30vtkCocoaRenderWindowInteractor5StartEv + 293
    8   libvtkRenderingJava.5.10.0.dylib    0x000000010f94f29e Java_vtk_vtkRenderWindowInteractor_Start_15 + 62
    9   ???                                 0x0000000103b70d6e 0x0 + 4357295470
    10  ???                                 0x0000000103b6585a 0x0 + 4357249114
)
2012-05-22 22:48:09.098 java[925:1a03] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '+[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff9363cf56 __exceptionPreprocess + 198
    1   libobjc.A.dylib                     0x00007fff8aa9fd5e objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff9363cd8a +[NSException raise:format:arguments:] + 106
    3   Foundation                          0x00007fff910a371f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 169
    4   Foundation                          0x00007fff9101295f +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 144
    5   AppKit                              0x000000010256819c -[NSApplication run] + 769
    6   libvtkRendering.5.10.dylib          0x000000010ff8c2df -[vtkCocoaServer start] + 335
    7   libvtkRendering.5.10.dylib          0x000000010ff8cf87 _ZN30vtkCocoaRenderWindowInteractor5StartEv + 293
    8   libvtkRenderingJava.5.10.0.dylib    0x000000010f94f29e Java_vtk_vtkRenderWindowInteractor_Start_15 + 62
    9   ???                                 0x0000000103b70d6e 0x0 + 4357295470
    10  ???                                 0x0000000103b6585a 0x0 + 4357249114
)
terminate called throwing an exception

proposed VM parameter lead to this error:

2012-05-23 09:10:18.635 java[747:307] [Java CocoaComponent compatibility mode]: Enabled
2012-05-23 09:10:18.635 java[747:307] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
2012-05-23 09:10:18.985 java[747:d303] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x7fa108c64600> '(null)') unlocked when not locked
2012-05-23 09:10:18.985 java[747:d303] *** Break on _NSLockError() to debug.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T12:25:11+00:00Added an answer on June 4, 2026 at 12:25 pm

    This could be a problem related to the Cocoa restriction that some things can be run only on the first thread that the process runs. The same issue arises with the SWT event loop, for example. The problem is that main method is not executed on the first thread because it is reserved for AWT’s event loop — for the same reason. The workaround: use the JVM switch -XstartOnFirstThread.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Installed PEAR and followed the directions on http://www.phpunit.de/manual/current/en/installation.html : pear config-set auto_discover 1 pear
Installed Tomcat 6 Installed Eclipse + GWT plugin Created GWT project with sample generated
Installed a fresh Delphi xe2. Open a new project (vcl forms application). opened the
i installed eclipse/galileo on mac x 10.5. i'm trying to install subversion plugin, but
I installed the latest version of Wordpress and added the WP-Syntax plugin (and also
I installed the paperclip plugin and was able to use it locally. When I
I installed Msys Git and TortoiseGIT x64. Whenever I try to use the Get
I installed with NuGet the packages NHibernate and Castle.Core 3.0 for a new project.
Installed Google App Engine 1.2.5 and Web Toolkit 1.7.1 . However I still get
Installed latest SDK updates from Google and my project changed to target 2.1 I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.