Error loading BPMN into flowable-modeler ui

Just throwing this out there… not sure what’s the cause but when I import a specific file, I get the following error message:

Error while processing the BPMN XML file : Import failed for fileName.bpmn, error message Comparison method violates its general contract!

Not sure what this means but I’ve got an end event and sequence that if I remove, the file loads fine… then I use the editor to generate the exact same piece of logic and save, download the bpmn and upload it… also fine.

The error message Comparison method violates its general contract is an exception from Java’s comparator interface, it happens when a comparitor is not internally consistent (a < b < c < a) are you able to share a bpmn file that throws the exception?

I wouldn’t be able to share the exact BPMN but maybe I’ll be able to prepare something for you later this week for further examination.

So I’ve managed to narrow this down a bit further (unfortunately I can’t seem to assemble a test XML to duplicate the problem.

I’m creating a converter to port business rules from one system in another diagram format to another and just last week I started to use the BPMNAutoLayout class to create a cleaner look for the diagrams that I’ve been creating and I’ve run into this stack trace on some of the diagrams…

I thought I’d bounce the exception off of you and see if you could tell me anything about it since it’s very similar to the one I was getting when attempting to load the diagram into the editor.

Here it is:

java.lang.IllegalArgumentException: Comparison method violates its general contract!
	at java.util.ComparableTimSort.mergeLo(
	at java.util.ComparableTimSort.mergeAt(
	at java.util.ComparableTimSort.mergeForceCollapse(
	at java.util.ComparableTimSort.sort(
	at java.util.Arrays.sort(
	at com.mxgraph.layout.hierarchical.stage.mxCoordinateAssignment.rankMedianPosition(
	at com.mxgraph.layout.hierarchical.stage.mxCoordinateAssignment.medianPos(
	at com.mxgraph.layout.hierarchical.stage.mxCoordinateAssignment.execute(
	at com.mxgraph.layout.hierarchical.mxHierarchicalLayout.placementStage(
	at com.mxgraph.layout.hierarchical.mxHierarchicalLayout.execute(
	at com.mxgraph.layout.hierarchical.mxHierarchicalLayout.execute(
	at org.flowable.bpmn.BpmnAutoLayout.layout(
	at org.flowable.bpmn.BpmnAutoLayout.execute(
	at levisj.tests.ConvertSDL.processFile(
	at levisj.tests.ConvertSDL.test(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(
	at org.junit.runners.ParentRunner.runLeaf(
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(
	at org.junit.runners.ParentRunner$
	at org.junit.runners.ParentRunner$1.schedule(
	at org.junit.runners.ParentRunner.runChildren(
	at org.junit.runners.ParentRunner.access$000(
	at org.junit.runners.ParentRunner$2.evaluate(
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(