Program crashes when removing actors

Hello everybody,
I try to remove actors from the renderer, but my program always crashes.
the following error message appears:

vtkWin32OpenGLRenderWin:217 ERR| vtkWin32OpenGLRenderWindow (0000000027348C40): wglMakeCurrent failed in MakeCurrent(), error: The requested resource is already in use.
# A fatal error has been detected by the Java Runtime Environment:
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffdf99de33d, pid=3760, tid=0x0000000000004278
# JRE version: Java™ SE Runtime Environment (8.0_181-b13) (build 1.8.0_181-b13)
# Java VM: Java HotSpot™ 64-Bit Server VM (25.181-b13 mixed mode windows-amd64 compressed oops) …

The crash happens within this code snippet:

public void Clear3DView() {

	vtkActorCollection actors =;
	vtkPropCollection props = ren.GetViewProps();
	vtkActor lastActor = actors.GetLastActor();		
	System.out.println(" Actors = "+actors.GetNumberOfItems());
	System.out.println(" Props  = "+props.GetNumberOfItems());
	try {
		ren.RemoveActor(lastActor);		// Crash
	} catch (Exception e) {

Seems to be a issue with java.
Does anyone have an idea what this is due to or how do I fix it?

Hi there,

in another application, removing actors was not a problem.
Now I use JavaFX in addition to Java and in this application no actors can be removed as described above.
Anyone know advice?