minman / browse-word-at-caret

Navigation plugin for IntelliJ
http://plugins.jetbrains.com/plugin/?id=201
Other
46 stars 5 forks source link

AssertionError with your plugin #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I got an issue reported in IntelliJ ; sorry I'm not sure what went wrong here 
or how to reproduce it. Plus the following stacktrace also point at some 
IntelliJ code.

Error during dispatching of 
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=browsewordatcaret.BWA
CEditorComponent$1@57365198,notifier=null,catchExceptions=false,when=13534957890
76] on apple.awt.CToolkit@45dc1f76: (9972,10003)
java.lang.AssertionError: (9972,10003)
    at com.intellij.openapi.editor.impl.RedBlackTree.deleteNode(RedBlackTree.java:146)
    at com.intellij.openapi.editor.impl.IntervalTreeImpl.deleteNode(IntervalTreeImpl.java:939)
    at com.intellij.openapi.editor.impl.IntervalTreeImpl.removeNode(IntervalTreeImpl.java:928)
    at com.intellij.openapi.editor.impl.IntervalTreeImpl$IntervalNode.a(IntervalTreeImpl.java:134)
    at com.intellij.openapi.editor.impl.IntervalTreeImpl$IntervalNode.access$1400(IntervalTreeImpl.java:51)
    at com.intellij.openapi.editor.impl.IntervalTreeImpl.removeInterval(IntervalTreeImpl.java:915)
    at com.intellij.openapi.editor.impl.MarkupModelImpl.removeHighlighter(MarkupModelImpl.java:180)
    at browsewordatcaret.BWACEditorComponent$1.run(BWACEditorComponent.java:65)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:702)
    at java.awt.EventQueue.access$400(EventQueue.java:82)
    at java.awt.EventQueue$2.run(EventQueue.java:663)
    at java.awt.EventQueue$2.run(EventQueue.java:661)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:672)
    at com.intellij.ide.IdeEventQueue.d(IdeEventQueue.java:673)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:498)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:333)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

I'm using IntelliJ 12 EAP build 122.746 with your plugin BrowseWordAtCaret at 
version 2.3.3.
Under JDK 1.6_037 on OSX 10.8

Cheers

Original issue reported on code.google.com by brice.du...@gmail.com on 21 Nov 2012 at 11:11

GoogleCodeExporter commented 9 years ago
You still have exceptions?

Original comment by minas.ma...@gmail.com on 26 Nov 2012 at 8:02

GoogleCodeExporter commented 9 years ago
Hi,

Yeah I got one on friday, using EAP 123.4.

Original comment by brice.du...@gmail.com on 26 Nov 2012 at 10:07

GoogleCodeExporter commented 9 years ago
Can you reproduce it? I'm afraid it happens only under OSX, something during 
event dispatch thread... have to investigate...

Original comment by minas.ma...@gmail.com on 26 Nov 2012 at 10:16

GoogleCodeExporter commented 9 years ago
Unfortunately, I still don't have a scenario to reproduce it yet. If I identify 
one I'll update the issue.

Original comment by brice.du...@gmail.com on 26 Nov 2012 at 10:38

GoogleCodeExporter commented 9 years ago
Hi,

With the latest EAP, I didn't experience this error in a week. Not sure if it's 
gone or not though. But that might be a good sign.

Cheers
Brice

Original comment by brice.du...@gmail.com on 4 Dec 2012 at 9:27

GoogleCodeExporter commented 9 years ago
Sounds good, thanks for the info. :-) 

I close this issue for the moment. If you got the problem again feel free to 
leave a comment and will reopen.

Thanks.

Original comment by minas.ma...@gmail.com on 4 Dec 2012 at 9:34

GoogleCodeExporter commented 9 years ago
OK, thx for the support :)

Original comment by brice.du...@gmail.com on 4 Dec 2012 at 9:35

GoogleCodeExporter commented 9 years ago
Hi,

Just using the final release of IntelliJ 12. And I got almost the same stack 
trace (line 65 on your component when it tries to remove something). I still 
don't quite have a hold on how to repeat the issue. But this time I was 
navigating tests in the run pane, anyway that didn't help to elaborate the 
scenario.

Error during dispatching of 
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=browsewordatcaret.BWA
CEditorComponent$1@440b6263,notifier=null,catchExceptions=false,when=13548097190
29] on apple.awt.CToolkit@1816daa9: 0
java.lang.AssertionError: 0
    at com.intellij.openapi.editor.impl.IntervalTreeImpl$IntervalNode.removeIntervalInternal(IntervalTreeImpl.java:146)
    at com.intellij.openapi.editor.impl.IntervalTreeImpl$IntervalNode.a(IntervalTreeImpl.java:132)
    at com.intellij.openapi.editor.impl.IntervalTreeImpl$IntervalNode.access$1400(IntervalTreeImpl.java:51)
    at com.intellij.openapi.editor.impl.IntervalTreeImpl.removeInterval(IntervalTreeImpl.java:915)
    at com.intellij.openapi.editor.impl.MarkupModelImpl.removeHighlighter(MarkupModelImpl.java:180)
    at browsewordatcaret.BWACEditorComponent$1.run(BWACEditorComponent.java:65)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:702)
    at java.awt.EventQueue.access$400(EventQueue.java:82)
    at java.awt.EventQueue$2.run(EventQueue.java:663)
    at java.awt.EventQueue$2.run(EventQueue.java:661)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:672)
    at com.intellij.ide.IdeEventQueue.d(IdeEventQueue.java:673)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:498)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:333)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Original comment by brice.du...@gmail.com on 6 Dec 2012 at 4:12

GoogleCodeExporter commented 9 years ago
Ok, thanks for reporting... have to look into...

Original comment by minas.ma...@gmail.com on 6 Dec 2012 at 8:24

GoogleCodeExporter commented 9 years ago
Hi back,

Still no idea how to reproduce, but I got another stacktrace, in the same 
component but in another anonymous class, that also use the MarkupModelImpl.

I wouldn't sort out an IntelliJ bug yet.

Error during dispatching of 
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=browsewordatcaret.BWA
CEditorComponent$2@49949394,notifier=null,catchExceptions=false,when=13554075432
98] on apple.awt.CToolkit@430eaae5: Wrong end: 717; document length=649; 
start=649
java.lang.IllegalArgumentException: Wrong end: 717; document length=649; 
start=649
    at com.intellij.openapi.editor.impl.RangeMarkerImpl.<init>(RangeMarkerImpl.java:44)
    at com.intellij.openapi.editor.impl.RangeMarkerImpl.<init>(RangeMarkerImpl.java:37)
    at com.intellij.openapi.editor.impl.RangeHighlighterImpl.<init>(RangeHighlighterImpl.java:41)
    at com.intellij.openapi.editor.impl.MarkupModelImpl.addRangeHighlighterAndChangeAttributes(MarkupModelImpl.java:133)
    at com.intellij.openapi.editor.impl.MarkupModelImpl.addRangeHighlighter(MarkupModelImpl.java:171)
    at browsewordatcaret.BWACEditorComponent$2.run(BWACEditorComponent.java:96)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:702)
    at java.awt.EventQueue.access$400(EventQueue.java:82)
    at java.awt.EventQueue$2.run(EventQueue.java:663)
    at java.awt.EventQueue$2.run(EventQueue.java:661)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:672)
    at com.intellij.ide.IdeEventQueue.d(IdeEventQueue.java:673)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:498)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:333)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Original comment by brice.du...@gmail.com on 13 Dec 2012 at 4:00

GoogleCodeExporter commented 9 years ago
Hmmm... strange, this one looks like the documents length changed before 
rangehighlighters added (has to be done during dispatch thread)... 

BrowseWordAtCaret does only add and remove RangeHighlighters during dispatch 
thread ( have to). Already looking into it and can't find any reason why the 
assertion happens... (I think I have to ask someone at jetbrians)

How ever, just to be sure... Do you have other third party plugins installed? 
Does it happens on a fresh IDEA installation too? 

Original comment by minas.ma...@gmail.com on 13 Dec 2012 at 4:35

GoogleCodeExporter commented 9 years ago
Hi, I've made some structural changes regarding to event dispatch thread (also 
to solve issue 6). Can you check if your problem is gone with it?

The plugin is attached. Just uninstall current plugin and install via 
PluginManager 'Install plugin from disk'.

Thanks

Original comment by minas.ma...@gmail.com on 13 Dec 2012 at 7:47

Attachments:

GoogleCodeExporter commented 9 years ago
Hi,

I will try it out, though these errors still happen at random.

Original comment by brice.du...@gmail.com on 13 Dec 2012 at 9:14

GoogleCodeExporter commented 9 years ago
any news?

Original comment by minas.ma...@gmail.com on 28 Jan 2013 at 8:41

GoogleCodeExporter commented 9 years ago
Hi, sorry for the late reply :)

I believe your changes made it work better, as I don't remember issues in the 
past weeks. I almost forgot it.

Original comment by brice.du...@gmail.com on 28 Jan 2013 at 9:03

GoogleCodeExporter commented 9 years ago

Original comment by minas.ma...@gmail.com on 29 Jan 2013 at 6:12

GoogleCodeExporter commented 9 years ago

Original comment by minas.ma...@gmail.com on 29 Jan 2013 at 6:50

GoogleCodeExporter commented 9 years ago
fixed with revision 53d287c11e5d

Original comment by minas.ma...@gmail.com on 29 Jan 2013 at 6:51