简体   繁体   English

堆栈跟踪未使用的异常

[英]An Exception with unusefull stack trace

i have this wierd exception wheere it's stack trace IS NOT HELPING OR SHOWING WHERE IT IS FROM !!!!!!!!! 我有这个奇怪的异常,它的堆栈跟踪不帮助或显示它来自!!!!!!!!! .

I'v searched about it and the usefull resault with someone who did have the same glitch when using a modal JDialog instances and disposing it with KeyListner while the frame owner alwaysOnTop proprety is set to false . 我已经搜索了此文件,并与使用模态JDialog实例并使用KeyListner进行处理(在帧所有者alwaysOnTop属性设置为false时,它具有相同的故障)的人进行了有用的重新搜索。

But in my case i havn't use any dialogs at all!! 但就我而言,我根本不使用任何对话框!! here is the exception stack trace : 这是异常堆栈跟踪:

Exception in thread "AWT-EventQueue-0" java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:2062)
at java.awt.Component.getLocationOnScreen(Component.java:2036)
at javax.swing.text.JTextComponent$InputMethodRequestsHandler.getTextLocation(JTextComponent.java:4643)
at sun.awt.im.InputMethodContext.getTextLocation(InputMethodContext.java:278)
at sun.awt.windows.WInputMethod$1.run(WInputMethod.java:588)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

I haven't used this app for a while and i can confirm that no one did mess with the code ,earlier i was devoloping the app in a linux enviroment it didn't throw that exception , but after changing my laptop and the enviroment to windows somehow this is happenning . 我已经有一段时间没有使用过此应用程序了,我可以确认没有人把代码弄乱,之前我在Linux环境中开发该应用程序,但并没有抛出该异常,但是在将笔记本电脑和环境更改为Windows莫名其妙正在发生。 I need to deliver my app soon and this exception have a strange thing that it's not thrown every time i open my app ! 我需要尽快交付我的应用程序,此异常有一个奇怪的事情,那就是每次我打开我的应用程序时都不会抛出该异常! and i couldn't face any pattern to notice when it wil be thrown or what specific action that would do that . 而且我什么时候都不会注意到它会被抛出或什么具体的动作可以做到。 what am asing is if any one did face off a strange case like this what is it usually from ?? 如果有人面对这样一个奇怪的案件,那是什么意思呢? and thanks in advance . 并预先感谢。

Edit 编辑
Found the solution !I just found it at bugzilla it seems to be some sort of bug when is extending JRootPane without implemeting RootPaneContainer in windows in Runtime: Java(TM) SE Runtime Environment 1.8.0_141-b15 with some gpu and methods related stuff i couldn't understand and if also used modal JDialogs without the owner always on top when using the default rootpane button of the dialogs to exit . 找到了解决方案!我只是在bugzilla上发现它,而在不运行Windows的情况下在Windows中扩展JRootPane而不实现RootPaneContainer时,这似乎是某种错误:Java(TM)SE Runtime Environment 1.8.0_141-b15具有一些gpu和与方法相关的东西无法理解,如果使用对话框的默认rootpane按钮退出时,是否还使用模态JDialogs而所有者始终JDialogs最前。

I used to get regular Swing Exception s without a traceable stack trace. 我过去经常获取常规的Swing Exception而没有可跟踪的堆栈跟踪。 It was because I was violating the rules regarding concurrency in Swing. 这是因为我违反了有关Swing中并发性的规则。 This SO answer elaborates: SwingWorker ProgressBar . 该SO回答详细说明: SwingWorker ProgressBar Basically, make sure all of your Swing code is being called on the Event Dispatch Thread. 基本上,请确保在事件调度线程上调用了所有Swing代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM