0

This month I had four weird problems with Java methods running something in the UI thread like SwingUtilities.InvokeAndWait() and Display.syncexec().

The code running these methods worked for years but now they just seem to run into a deadlock.

I searched for bugs that would explain that, but all I can find is the Swing Webstart Bug: NullPointerException in invokeLater while running through Java Webstart

To fix that, I used this solution: https://stackoverflow.com/a/20102779/1503901

Now to my question: Is this just my experience or is anyone facing the same problems? Could this be a bug, or is it just my code?

Thanks a Lot!

Community
  • 1
  • 1
Oli
  • 561
  • 7
  • 18
  • 6
    It's unlikely that you are facing a bug in the Java platform itself. It's far more likely that there is a bug in your code, and you never discovered it until now. Threading bugs can easily lie latent for years and then appear when you try running your program on different hardware, a different OS, different Java VM, etc. – Alex D Jan 28 '14 at 13:34
  • 1
    Odds are against you. – Sergey Kalinichenko Jan 28 '14 at 13:35
  • 1
    Please add your code or other details so that we can verify your implementation. Otherwise this is likely to be closed. – TwoThe Jan 28 '14 at 13:37
  • `invokeAndWait` and `syncExec` are notorious for their sneaky deadlock potential. The Web is full of examples and explanations. – Marko Topolnik Jan 28 '14 at 13:48
  • Due to modern CPUs with multiple cores, today threads often truly run in parallel. So you might suddenly face concurrency issues that have always been in your code but have never shown up before. – isnot2bad Jan 28 '14 at 16:15
  • This question appears to be off-topic because it is essentially a poll. –  Oct 18 '14 at 00:34

0 Answers0