Java(TM)平台SE二进制文件在检测Swing应用程序中的外部硬件连接时停止了工作错误消息

时间:2018-03-07 16:45:53

标签: java multithreading swing

这是非常详细的,请耐心等待。

我正在将硬件设备连接到我的Swing应用程序(是的,Swing)。该设备是用于虹膜生物识别数据采集的摄像头。

在我的项目中,我有一个设备监视器类,用于侦听与此设备的连接或断开连接。这是在类.growbig:hover, .growbig:focus {width:192px;height: 136px;} 中实现的,它扩展了DeviceMonitorThread

Thread

这是private static boolean monitorDevices = true; private boolean irisScannerConnectionStatus = false; ... private synchronized boolean checkIrisScannerConnectivity() { logger.debug(">>>>>>>>>>>>>>>>>>>>>>>>>Checking iris scanner connectivity..."); Controller.deviceMonitorIrisScannerOn = true; if (Controller.irisScannerOn) { logger.debug(">>>>>>>>>>>>> Iris camera is connected so device monitor thread was skipped..."); Controller.deviceMonitorIrisScannerOn = false; return true; } try { if (Controller.iIrisCam == null) { Controller.iIrisCam = new IrisCamJNI(); } Controller.iIrisCam.connectToCameraIndex(0); irisScannerConnectionStatus = Controller.iIrisCam.isCameraConnected(); logger.debug(irisScannerConnectionStatus ? ">>>>>>>>>>>>>>>>>Iris Scanner is connected" : "Iris scanner is not connected"); if (irisScannerConnectionStatus) { try { logger.debug(">>>>>>>>>>>>>>>>>>>>>>>>.Disconnecting iriscam"); Controller.iIrisCam.disconnect(); } catch (IrisCamException irisCamException) { logger.error("[Error]", irisCamException); } catch (Exception exception) { logger.error("ERROR ", exception); } catch (Error error) { logger.error("Error", error); throw new Error(error); } return true; } } catch (IrisCamException exception) { logger.error(">>>>>>>>>> Error initializing IrisCam object...........", exception); } return false; } 方法:

run()

@SuppressWarnings("SleepWhileInLoop") @Override public void run() { while (monitorDevices) { if (!monitorDevices) { break; } try { logger.debug(">>>>>>>>>>>>>About to check irisScannerConnectivity()..."); boolean newIrisScannerConnectionStatus = checkIrisScannerConnectivity(); logger.debug(">>>>>>>>newIrisScannerConnectionStatus = " + newIrisScannerConnectionStatus); if (newIrisScannerConnectionStatus != irisScannerConnectionStatus) { irisScannerConnectionStatus = newIrisScannerConnectionStatus; } } catch (Exception e) { logger.error(e.getMessage()); } notifyListeners(); try { if (!monitorDevices) { break; } Thread.sleep(THREAD_SLEEP_INTERVAL); if (systemExited) { monitorDevices = false; } } catch (InterruptedException e) { logger.error("Thread Interrutped: ", e); } catch (Exception e) { logger.error("Exception in device monitor thread"); } } } 和其他布尔值在Controller类中声明为:

iIrisCam

现在,当我运行这个应用程序时。我必须保持手指交叉,因为这种崩溃并不总是发生。它现在崩溃,下次我能够捕获图像,或者它连续几次崩溃等等。

当它崩溃时,这是我收到的错误消息:

enter image description here

全力以赴

enter image description here

此项目使用来自IIrisCam SDK的大量 public static IIrisCam iIrisCam; public static boolean irisScannerOn, deviceMonitorIrisScannerOn = false; 个文件(放在.dllSystem32文件夹中)。

我做了大量的日志记录但是这个错误的原因似乎永远不会被捕获。我的猜测是这与使用的内存有关,而不是释放。 我会为愿意提供帮助的人提供更多信息。

如果它有任何相关性,我使用的是64位Windows 10计算机,而IIrisCam sdk使用了很多32位的东西。

修改

这是错误消息中引用的sysWOW64文件的样子:

run.xml

0 个答案:

没有答案