Windows ユーザーから次のスタック トレースを頻繁に取得します。
java.lang.UnsatisfiedLinkError: sun.awt.image.ImageRepresentation.setBytePixels(IIII[BIILsun/awt/image/ByteComponentRaster;I)V
at sun.awt.image.ImageRepresentation.setBytePixels(Native Method)
at sun.awt.image.ImageRepresentation.setPixels(Unknown Source)
at sun.awt.image.ImageDecoder.setPixels(Unknown Source)
at sun.awt.image.GifImageDecoder.sendPixels(Unknown Source)
at sun.awt.image.GifImageDecoder.parseImage(Native Method)
at sun.awt.image.GifImageDecoder.readImage(Unknown Source)
at sun.awt.image.GifImageDecoder.produceImage(Unknown Source)
at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source)
at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
at sun.awt.image.ImageFetcher.run(Unknown Source)
これは、ユーザーが Java をアップグレードした後、最初に再起動せずにアプリを実行しようとしたときに発生します。どうやら Java をアップグレードするには (Windows の他のすべてと同様に) 使用可能な状態に戻すためにマシンを再起動する必要があります。
コール スタックにコードがないため、これはキャッチできる例外ではありません。からの例外を処理できますThread.UncaughtExceptionHandler
。これが現在行っていることです。
代わりに、この例外を直接発生させてキャッチするか、他のチェックを行うことにより、アップグレード後に再起動が必要な状態にあるかどうかを起動時にチェックする方法が必要です。(現在のところ、これを引き起こす原因さえわかりません...) どうすればそれができるか知っている人はいますか?