Basically java is being REALLY weird, any suggestions on helping to fix it?
Are you using 32 bit jvm or 64 (and which jdk?)? Though it could a multithreading problem, but I'm a bit more suspicious of your jvm memory/cpu usage.
Disclaimer: not a pro.
I am not an expert but maybe you could add some exception handling?
Java will always log exceptions, and throw them. This is an issue with Java itself
64bit
Java 8
Jdk (1.8.0.something)
It could be Windows 10.
TFW accidental double post
Found out the issue. I forgot each event that dispatched would create a thread. I was trying to dispatch too many events per second.
Nice! This made me think of a common problem with timed-event driven game engine models, but I wasn't quite sure how it would manifest in Java - I thought it would be more like a StackOverFlow exception like endless recursion. Or even an OutOfMemoryError like you see when operating too many server threads.
So the OS must've caught you instead? And out of curiosity, are you making a game engine?
Yeah. I am. It's pretty good now. It uses 3% of my CPU when doing 10mil events per second
The thing is that I didn't change my code in any way that could conceivably have this effect. I added more events to be dispatched.