From hs at tagtraum.com Tue Sep 2 07:58:10 2014 From: hs at tagtraum.com (Hendrik Schreiber) Date: Tue, 2 Sep 2014 09:58:10 +0200 Subject: Crashes in Java_sun_lwawt_macosx_LWCToolkit_stopAWTRunLoop (called with NULL argument) In-Reply-To: <85DFF7C4-F266-4938-8458-78DC1299C3F7@gmail.com> References: <16CCD64E-E5F6-4503-B9CF-33B67471B028@tagtraum.com> <53FF7215.3070105@oracle.com> <85DFF7C4-F266-4938-8458-78DC1299C3F7@gmail.com> Message-ID: <12633CD1-62D2-49F1-98E0-762C0BB4D911@tagtraum.com> On Aug 29, 2014, at 23:39, Michael Hall wrote: > On Aug 29, 2014, at 7:45 AM, Hendrik Schreiber wrote: > >> public void exit() { >> if (!isOwned()) { >> throw new IllegalMonitorStateException(); >> } >> LWCToolkit.stopAWTRunLoop(awtRunLoopMediator); >> awtRunLoopMediator = 0; >> } > > What does isOwned() do? It's defined in the superclass, Mutex. > Doesn't it ensure that clearing the loop mediator is only done by the owning thread? If some other thread successfully runs through exit doesn't it mean this is not working correctly? > [...] > Wouldn't it be simpler and safer to fix it in the JNI? > if (mediatorObject) CFRelease(mediatorObject); That's certainly also possible, but it also does not solve the issue completely. The underlying problem is that exit() shouldn't be called more than once in the first place. My suggestion for improving the sun.lwawt.macosx.CToolkitThreadBlockedHandler code were only aimed at programmatically enforcing the implicit contract. It does not solve the problem that causes the issue. I have created a test case and tried to explain what the problem is in http://mail.openjdk.java.net/pipermail/awt-dev/2014-September/008425.html hoping that AWT folks provide some input. AWT, because the class that calls exit() twice is a class shared between all platforms. It would be shortsighted to try to "fix" this only for OS X. -hendrik From hs at tagtraum.com Tue Sep 2 08:00:24 2014 From: hs at tagtraum.com (Hendrik Schreiber) Date: Tue, 2 Sep 2014 10:00:24 +0200 Subject: Application name in About, Hide, and Quit menu items In-Reply-To: <072D6774-10B3-427E-BCCF-6B6581C92A1D@seanreilly.com> References: <072D6774-10B3-427E-BCCF-6B6581C92A1D@seanreilly.com> Message-ID: On Aug 1, 2014, at 18:29, Sean Reilly wrote: > In my app bundle ant file I?ve set a few options with the tag including these: >