JVM crashes on macOS when entering too many nested event loops
Martin Fox
martinfox656 at gmail.com
Mon Mar 10 17:10:19 UTC 2025
Hi Christopher,
I was able to reproduce this crash. I wrote a small routine that recursively calls itself in a runLater block and then enters a nested event loop. The program crashes when creating loop 254. I’m not sure where that limit comes from so it’s possible that consuming some other system resource could lower it. I couldn’t see any good way to determine how many loops are active by looking at the crash report since it doesn’t show the entire call stack.
I did a quick trial on Linux and was able to create a lot more loops (over 600) but then started seeing erratic behavior and errors coming from the Java VM. The behavior was variable unlike on the Mac which always crashes when creating loop 254.
Martin
> On Mar 7, 2025, at 6:24 AM, Christopher Schnick <crschnick at xpipe.io> wrote:
>
> Hello,
>
> I have attached a JVM fatal error log that seemingly was caused by our JavaFX application entering too many nested event loops, which macOS apparently doesn't like.
>
> As far as I know, there is no upper limit defined on how often an event loop can be nested, so I think this is a bug that can occur in rare situations.
>
> Best
> Christopher Schnick<hs_err_pid.txt>
More information about the openjfx-dev
mailing list