This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 130806 - IllegalArgumentException: bad position: 6765
Summary: IllegalArgumentException: bad position: 6765
Status: RESOLVED DUPLICATE of bug 131551
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Vladimir Voskresensky
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-21 16:39 UTC by dnikitin
Modified: 2008-03-30 19:01 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 39136


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dnikitin 2008-03-21 16:39:49 UTC
Build: NetBeans IDE Dev (Build 20080321055501)
VM: Java HotSpot(TM) Client VM, 1.5.0_13-121, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_13-b05-241
OS: Mac OS X, 10.4.11, i386
User comments: Double clicked an item in the Find Usages results window to open a Java file in the editor.

STACKTRACE: (first 10 lines)
java.lang.IllegalArgumentException: bad position: 6765
        at javax.swing.text.JTextComponent.setCaretPosition(JTextComponent.java:1398)
        at
org.netbeans.modules.refactoring.spi.SimpleRefactoringElementImplementation.openInEditor(SimpleRefactoringElementImplementation.java:102)
        at org.netbeans.modules.refactoring.spi.impl.CheckNodeListener.findInSource(CheckNodeListener.java:218)
        at org.netbeans.modules.refactoring.spi.impl.CheckNodeListener.mouseClicked(CheckNodeListener.java:94)
        at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:212)
        at java.awt.Component.processMouseEvent(Component.java:5586)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
        at java.awt.Component.processEvent(Component.java:5348)
        at java.awt.Container.processEvent(Container.java:2010)
        at java.awt.Component.dispatchEventImpl(Component.java:4050)
Comment 1 dnikitin 2008-03-24 17:01:45 UTC
I upgrade priority to P2 because impossible to use Find Usages. 
Comment 2 Daniel Prusa 2008-03-25 12:04:14 UTC
This does not seem to be a general problem, I have not managed to reproduce it.
Is it reliably reproducible in your case? Can you provide a source file you used to find usages in, please?
Comment 3 dnikitin 2008-03-25 12:36:47 UTC
It does not matter what source file you use.
I can reproduce this issue in 100% cases on the latest build 200803250006

Important NB: 
Before double-clicked an item in the Find Usages results view you should close source file in editor (if it opened).

Or if an item belongs to other source file which is not opened then I also get IAE.
Comment 4 Jiri Prox 2008-03-25 13:28:13 UTC
I cannot reproduce i with the latest build. What project type do you use? 
Comment 5 dnikitin 2008-03-25 13:59:43 UTC
I can reproduce only with c/c++ pack.

If I have both c/c++ & java pack installed -- this issue is not reproducible 

-- open C/C++ sample project Welcome
-- do find usages for local variable argc in main()
-- close welcome.cc in editor
-- double-click an item in Find Usages Results window
==> Exception
Comment 6 Daniel Prusa 2008-03-25 15:57:32 UTC
This could be a problem in C/C++ find usages implementation, seems like getBounds() method called on a refactoring
element returns incorrect position. Reassigning for further evaluation.
Comment 7 Vladimir Voskresensky 2008-03-30 19:01:01 UTC

*** This issue has been marked as a duplicate of 131551 ***