RFR: 8271024: Implement macOS Metal Rendering Pipeline [v8]

Kevin Rushforth kcr at openjdk.org
Fri Aug 1 17:15:13 UTC 2025


On Fri, 1 Aug 2025 15:52:35 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> Normally, this would be the right thing to do. However, it looks like switching the order has introduced several crashes. I discovered this today while testing the latest version of this PR. I bisected it and found out that this was the culprit.
>> 
>> It would be helpful to know why the order matters. If there is a good reason, then a comment would be helpful.
>
> This is alarming - perhaps something in `super.dispose()` calls overriden methods?

No, it isn't that. We tracked this down, and the problem is that `super.dispose()` clears references to disposer-managed resources, which then get GCed and have their dispose method called. Those dispose methods assume that the context is still active so unconditionally call context.dispose().

The fix, which Ambarish is doing final testing of, is to check whether the context has been disposed before disposing of textures. Basically, this is a latent bug that was exposed by changing the order.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1824#discussion_r2248468500


More information about the openjfx-dev mailing list