Simply put, VMD crashes if there are "too many" class definitions in the code. It feels like "something" hits some limit and causes the crash. AFAIK, it's not a limitation of Java, but something else is happening here.
To reproduce, just open a new fresh VMD project, and add class definitions in the code under "Add your own variables and functions here". Empty dummy classes do the trick just fine. Like so:
Code: Select all
class Test1 {}
class Test2 {}
class Test3 {}
...
A few points:
- This is not about too many class _instances_. Just adding class definitions is enough.
- The actual contents of the class does not seem to matter, an empty dummy class does the trick.
- As far as I can understand, the error happens somewhere between compiling and actually running the code. It happens with a new default project with no user code, except class definitions.
- It also doesn't seem to matter if the class definitions are in the main .java file or other files - if the total is "too much", it's crash boom bang. Enums and anonymous classes are also counted in the total.
I'm working on a pretty big module with lots of classes and enums, and I hit the limit "naturally", and it took me a while to figure out what is happening.
Can anyone else reproduce this, and any ideas how to get around it? Thanks!