Menu

#377 Fix for OS X startup bug

closed-accepted
general (64)
5
2012-04-23
2011-01-19
Evan Wright
No

This is a fix for Bug #3034220 - "jEdit fails to load text-file under Mac OS X".

Discussion

  • Evan Wright

    Evan Wright - 2011-01-19
     
  • Evan Wright

    Evan Wright - 2011-02-08

    I've attached an example program to show the necessity of the SwingUtilities.invokeLater I added in the patch. Build with "ant" (needs JarBundler in the classpath), then run test.sh to test the program 100 times. With the invokeLater, it works every time for me. Then change "works()" in the main method to "fails()" and try again (only change is that there is no invokeLater). This time, the program fails (should pop up a message box) about 1 of every 5 trials. I think this must be an undocumented "feature" of Apple's version of Java - I'm using Java for Mac OS X 10.6 Update 3.

    You can try adding delays or opening a JFrame before adding the application listener (like jEdit actually does). Some changes can make the problem less frequent, but the only one that seems to always work is to use invokeLater.

     
  • Evan Wright

    Evan Wright - 2011-09-03

    Example program demonstrating JVM bug

     
  • Evan Wright

    Evan Wright - 2011-09-03

    I realized that I never uploaded the example program, so I've done so now. I can also verify that the issue is still present in the latest Java update for OSX 10.6. I've posted about the issue on Apple's java-dev mailing list and a member of Apple's java team confirmed that this is not the expected behavior and seemed to be a JVM bug: http://lists.apple.com/archives/java-dev/2011/Feb/msg00096.html.

     
  • Townsfolk

    Townsfolk - 2011-09-06
    • assigned_to: nobody --> elberry
    • status: open --> pending-accepted
     
  • Townsfolk

    Townsfolk - 2011-09-06

    applied in rev: 19932

     
  • Jarek Czekalski

    Jarek Czekalski - 2012-04-23
    • status: pending-accepted --> closed-accepted
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.