RFR: 8351733: [macos] Crash when creating too many nested event loops [v3]

Kevin Rushforth kcr at openjdk.org
Mon Mar 24 20:33:15 UTC 2025


On Mon, 24 Mar 2025 20:11:51 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> The limit is an implementation detail, and should not be elevated to specification. What application developers should be doing if they want to avoid hitting the limit, is call `Platform.canStartNestedEventLoop()`.
>
> disagree: we are not codifying what the limit is, but showing the condition at the exception, for the sake of application developers.
> 
> `ArrayList.set(int, T)` throws an exception specifying the offending index value.  Not exactly the same situation, but the same spirit.

This is more like the StackOverflow case where the nesting level has gone too deep. It wouldn't hurt tell the application how deep they are (and from that they could infer what the limit is for the platform), but I'm not sure how useful it would be to the application developer. I don't mind one way or the other.

If we do decide to have a platform-independent nesting level, we would specify that limit. I'm still not sure whether we want to do this, but as I mentioned in another comment, there are some advantages to it.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1741#discussion_r2010884214


More information about the openjfx-dev mailing list