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 160441 - javax.swing.text.BadLocationException: Offset 7783 with bias Forward is outside of the view, children = 77 covering offsets <0, 5398>, docLen=5397
Summary: javax.swing.text.BadLocationException: Offset 7783 with bias Forward is outsi...
Status: NEW
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Peter Zavadsky
Depends on:
Reported: 2009-03-17 11:21 UTC by Sergey Petrov
Modified: 2010-06-09 10:30 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 147700

stacktrace (1.62 KB, text/plain)
2009-03-17 11:21 UTC, Sergey Petrov

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Petrov 2009-03-17 11:21:24 UTC
Build: NetBeans IDE Dev (Build 200903121546)
VM: OpenJDK 64-Bit Server VM, 1.6.0_0-b12, IcedTea6 1.3.1 (6b12-0ubuntu6.1) Runtime Environment, 1.6.0_0-b12
OS: Linux, 2.6.27-13-generic, amd64

User Comments:
marfous: 1, create web app with JavaServer Faces
2, add some label and text field
3, rightclick on both of them and choose Add Binding Attribute
4, click into JSP file and press CTRL + click on textField1
-> exception appears

sergeyp: create sample TravelCenter application,
open Page1
go to java code
add '1' before mthod declaration and after '**/' in the same line.
go to designer.
press link pointing to the error.

GUEST: saving and working with jsp pages

jonathanramsey: I had just used the Remove unused import feature to remove an unused import from a JSF page bean. When I flipped back to the design view, I got this error.

javax.swing.text.BadLocationException: Offset 7783 with bias Forward is outside of the view, children = 77 covering offsets <0, 5398>, docLen=5397
        at org.netbeans.lib.editor.view.GapBoxView.modelToView(
        at org.netbeans.editor.view.spi.LockView.modelToView(
        at javax.swing.plaf.basic.BasicTextUI$RootView.modelToView(
        at javax.swing.plaf.basic.BasicTextUI.modelToView(
        at javax.swing.plaf.basic.BasicTextUI.modelToView(
        at javax.swing.text.JTextComponent.modelToView(
Comment 1 Sergey Petrov 2009-03-17 11:21:35 UTC
Created attachment 78287 [details]
Comment 2 Vitezslav Stejskal 2009-03-20 11:08:45 UTC
My guess is that sometimes e.getEditorPane().getDocument() != getDocument() and then further down the offset where to
scroll is computed from a different document instance than the one that is used in the ePane. Hence ePane.modelToView
Comment 3 mslama 2009-03-20 13:38:29 UTC
Sergey as I said in issue #121560 I cannot find Travel Center sample. Please add more details.
Comment 4 Sergey Petrov 2009-03-20 13:49:54 UTC
Yes, it's in visual webplugin,
and have full path 'Samples|Java Web (Visual JSF)|Corporate Travel Center).
Comment 5 mslama 2009-03-24 13:38:54 UTC
Model/model navigation in visualweb is broken. Please first make it work as expected and then if any reproducible
problem persists assign it back to platform/text. I tried to reproduce with dev build as described above:
1. First problem: When I create sample projects there is a lot of errors in 'Page1'.
2. Thanks to problem 1 I am able to reproduce problem 2: When I create another compilation error in 'Page1' navigation
from Design to Source using error link does not work. It navigates me to incorrect link or I get AIOOBE.