aspose file tools*
The moose likes Threads and Synchronization and the fly likes I think I found a JDK1.7.0_40 bug Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "I think I found a JDK1.7.0_40 bug" Watch "I think I found a JDK1.7.0_40 bug" New topic
Author

I think I found a JDK1.7.0_40 bug

Mack Wilmot
Ranch Hand

Joined: Jul 27, 2011
Posts: 88

I have a little application that has a Swing form and text area. I open a file and I press a button that does a search on the text by doing a string search on the text in a List. The work of searching is done in a SingleThreadExecutor and puts the start and end indexes of each word found in a List. Then I do an InvokeAndWait and send the index List into the EDT and it uses it to paint highlighting on the words.

If I open a big text file, click the button to highlight the words, then clear and click the button again, as soon as the words are highlighted and I click the red X on the Form to close the application I get:



This is repeatable and only happens on the 2nd time I perform the highlight routine. It never happens the 1st time or the 3rd time and so forth.

This does not occur with JDK1.7.0_25 or JDK1.8.0.
Richard Tookey
Ranch Hand

Joined: Aug 27, 2012
Posts: 1084
    
  10

You are going to have to create and post an SSCCE ( see http://sscce.org/ ) if you want people here to comment on your potential bug.
Mack Wilmot
Ranch Hand

Joined: Jul 27, 2011
Posts: 88

I went about trying to consolidate the only code that is needed, but it is a huge task to do. In the process I did minimize the code and managed to get the exception on JDK1.7.0_25 too, so I think this is a normal exception (normal for JDK 7 anyway) from trying to shutdown the program to quickly without adding extra code to make sure it doesn't happen. It's just a matter of timing.
 
jQuery in Action, 2nd edition
 
subject: I think I found a JDK1.7.0_40 bug