If an image is exported, exceptions are thrown from the scene-graph. The image can be exported in most cases anyway, althought it can stop the export. It seems that the manipulations of the scene-graph by the export-camera cause this problems, more precisely line 234 and 236 in ExportCamera.
can you please give the stack trace (if you have it at hand) and describe which views are affected.
Last edit: Till Schäfer 2016-11-11
Could reproduce this exception while exporting an image of the scaffold tree.
And another, different exception with the cloud view
Piccolo is not thread-safe and all operations (manipulation and painting) must be performed in the event dispatch thread. A first step to solve this issue should be to check if the export is performed in the event dispatch thread.
The export is done in a separate worker including the methods that invoke the paint-method of PNode. Maybe SwingUtilities.invokeAndWait() may solve the problem.
I would like to propose to remove the separate worker instead. The GUI will freeze during the export in any case.
Tried this, but unfortunately there occur problems with the progress dialog. If the dialog is set to modal, the process cannot be completed, since setVisible() blocks, if the dialog is not modal, it works, but the content of the dialog cannot be displayed, since the dispatcher thread is busy.
With the current solution, the dialog is shown, but the progress bar stalls for the time the export is done([dafd4d]).
Related
Commit: [dafd4d]
Not easy to say, whether the bug is fixed. It appeared randomly. But after several exports from different views no exception was thrown.
The code looks fine and I have not seen the excpetion for several exports.
merged in [2aa33c]
Related
Commit: [2aa33c]