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 210121 - javax.swing.text.BadLocationException: Invalid offset=96 not within <0, 55>
Summary: javax.swing.text.BadLocationException: Invalid offset=96 not within <0, 55>
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Hints & Annotations (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
: 214584 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-26 14:35 UTC by aldobrucale
Modified: 2013-06-02 21:15 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 186245


Attachments
stacktrace (787 bytes, text/plain)
2012-03-26 14:35 UTC, aldobrucale
Details
snapshot (27.62 KB, application/octet-stream)
2012-03-27 09:54 UTC, KhArtNJava
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aldobrucale 2012-03-26 14:35:16 UTC
Build: NetBeans IDE Dev (Build 201203250401)
VM: Java HotSpot(TM) Client VM, 22.1-b02, Java(TM) SE Runtime Environment, 1.7.0_03-b04
OS: Linux

User Comments:
aldobrucale: Deleted the last line from a .properties file

rip_pit: deleting quickly line after line in a php file




Stacktrace: 
javax.swing.text.BadLocationException: Invalid offset=96 not within <0, 55>
   at org.netbeans.editor.Utilities.checkOffsetValid(Utilities.java:1345)
   at org.netbeans.editor.Utilities.checkOffsetValid(Utilities.java:1340)
   at org.netbeans.editor.Utilities.getLineOffset(Utilities.java:559)
   at org.netbeans.modules.editor.hints.AnnotationHolder$9.run(AnnotationHolder.java:1346)
   at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1340)
   at org.netbeans.modules.editor.hints.AnnotationHolder.resolveWarnings(AnnotationHolder.java:1343)
Comment 1 aldobrucale 2012-03-26 14:35:17 UTC
Created attachment 117262 [details]
stacktrace
Comment 2 Jan Lahoda 2012-03-26 15:02:12 UTC
http://hg.netbeans.org/jet-main/rev/15d78eb9f5b2
Comment 3 KhArtNJava 2012-03-27 09:54:53 UTC
Created attachment 117305 [details]
snapshot

javax.swing.text.BadLocationException: Invalid offset=1019 not within <0, 1018>
        at org.netbeans.editor.Utilities.checkOffsetValid(Utilities.java:1345)
        at org.netbeans.editor.Utilities.checkOffsetValid(Utilities.java:1340)
        at org.netbeans.editor.Utilities.getLineOffset(Utilities.java:559)
        at org.netbeans.modules.editor.hints.AnnotationHolder$10.run(AnnotationHolder.java:1350)
        at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1340)
        at org.netbeans.modules.editor.hints.AnnotationHolder.resolveWarnings(AnnotationHolder.java:1347)
        at org.netbeans.modules.editor.hints.HintsUI$4.run(HintsUI.java:957)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1452)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2032)


How to reproduce:
Code:
*********************************
<div class="info"> 
    <div class="a"> <b><?= $arResult['product']['massiv']['PROPERTY_PRICE_1_VALUE'] ?></b> <b>руб.</b> </div>

    <div class="b"> <a class="btn-goto-order" href="/order" ></a> 
        <div><img src="<?= SITE_TEMPLATE_PATH ?>/images/ico-phone-b.png"  /> <?= $arResult['product']['phone']['PROPERTY_PHONE_VALUE'] ?></div>
    </div>
</div>

<?
$x = 0;
foreach ($arResult['awards_hor'] as $k => $v) {
    $x++;
    if ($x > 4) {
        echo "<br />";
        $x = 1;
    }
    ?>
    <a class = "hor" href = "<?= $v ?>" ><span></span> <img src = "<?= SITE_TEMPLATE_PATH ?>/images/px.gif" style = "background-image:url('/thumb/140x108xCUT/<?= $v ?>');" /> </a>
    <?
}
?>
<br /> 
<?
$x = 0;
foreach ($arResult['awards_ver'] as $k => $v) {
    $x++;
    if ($x > 4) {
        echo "<br />";
        $x = 1;
    }
    ?>
    <a class="ver" href="#" > <span></span> <img src="<?= SITE_TEMPLATE_PATH ?>/images/px.gif" style="background-image:url('/thumb/112x148xCUT/<?= $v ?>');"  /> </a> 
    <?
}
?>

*********************************
Place cursor to the last empty line, press shift+del.
Comment 4 KhArtNJava 2012-03-27 09:55:42 UTC
It's for (Build 201203260401)
Comment 5 Jan Lahoda 2013-06-02 21:15:45 UTC
*** Bug 214584 has been marked as a duplicate of this bug. ***