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 182672 - [69cat] NullPointerException at org.netbeans.modules.editor.lib2.view.EditorBoxView.getViewIndexChecked
Summary: [69cat] NullPointerException at org.netbeans.modules.editor.lib2.view.EditorB...
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 6.x
Hardware: All All
: P1 normal (vote)
Assignee: issues@editor
URL:
Keywords:
: 182664 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-03-24 14:25 UTC by jasondonmoyer
Modified: 2010-04-07 04:44 UTC (History)
28 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 166894


Attachments
stacktrace (2.33 KB, text/plain)
2010-03-24 14:25 UTC, jasondonmoyer
Details
stacktrace (2.33 KB, text/plain)
2010-03-25 10:46 UTC, Ondrej Vrabec
Details
stacktrace (2.33 KB, text/plain)
2010-03-25 13:49 UTC, Andrei Chistiakov
Details
stacktrace (2.33 KB, text/plain)
2010-03-26 10:48 UTC, tnleeuw
Details
stacktrace (2.33 KB, text/plain)
2010-03-26 16:45 UTC, sreimers
Details
stacktrace (2.33 KB, text/plain)
2010-03-26 19:08 UTC, Michel Graciano
Details
stacktrace (2.33 KB, text/plain)
2010-03-27 21:12 UTC, host
Details
stacktrace (2.33 KB, text/plain)
2010-03-27 21:14 UTC, host
Details
stacktrace (2.33 KB, text/plain)
2010-03-28 08:54 UTC, esmithbss
Details
stacktrace (2.33 KB, text/plain)
2010-03-29 06:37 UTC, esmithbss
Details
stacktrace (2.33 KB, text/plain)
2010-03-29 09:45 UTC, stefan79
Details
stacktrace (2.33 KB, text/plain)
2010-03-29 10:15 UTC, host
Details
stacktrace (2.33 KB, text/plain)
2010-03-29 10:17 UTC, Alexander Simon
Details
stacktrace (2.33 KB, text/plain)
2010-03-29 18:55 UTC, misterm
Details
stacktrace (2.33 KB, text/plain)
2010-03-29 19:20 UTC, misterm
Details
stacktrace (2.33 KB, text/plain)
2010-03-29 19:46 UTC, Michel Graciano
Details
stacktrace (2.33 KB, text/plain)
2010-03-30 02:54 UTC, swpalmer
Details
stacktrace (2.33 KB, text/plain)
2010-03-30 10:27 UTC, Alexandr Scherbatiy
Details
stacktrace (2.33 KB, text/plain)
2010-03-30 10:49 UTC, Jaromir Uhrik
Details
stacktrace (2.33 KB, text/plain)
2010-03-30 13:49 UTC, stefan79
Details
stacktrace (2.33 KB, text/plain)
2010-03-30 15:34 UTC, jasondonmoyer
Details
stacktrace (2.33 KB, text/plain)
2010-03-31 13:17 UTC, Alexandr Scherbatiy
Details
stacktrace (2.33 KB, text/plain)
2010-03-31 13:17 UTC, stefan79
Details
stacktrace (2.33 KB, text/plain)
2010-03-31 17:11 UTC, Michel Graciano
Details
stacktrace (2.33 KB, text/plain)
2010-04-01 12:06 UTC, Alexandr Scherbatiy
Details
stacktrace (2.33 KB, text/plain)
2010-04-01 13:09 UTC, misterm
Details
stacktrace (2.33 KB, text/plain)
2010-04-01 15:23 UTC, Tomas Mysik
Details
stacktrace (2.33 KB, text/plain)
2010-04-01 20:05 UTC, esmithbss
Details
stacktrace (2.33 KB, text/plain)
2010-04-02 09:03 UTC, Jaromir Uhrik
Details
stacktrace (2.33 KB, text/plain)
2010-04-02 12:57 UTC, Egor Ushakov
Details
stacktrace (2.33 KB, text/plain)
2010-04-02 13:19 UTC, Egor Ushakov
Details
stacktrace (2.33 KB, text/plain)
2010-04-02 13:41 UTC, abajja
Details
stacktrace (2.33 KB, text/plain)
2010-04-02 14:19 UTC, Egor Ushakov
Details
stacktrace (2.33 KB, text/plain)
2010-04-02 22:19 UTC, big_al
Details
stacktrace (2.33 KB, text/plain)
2010-04-05 22:55 UTC, alied
Details
stacktrace (2.33 KB, text/plain)
2010-04-05 22:55 UTC, alied
Details
stacktrace (2.33 KB, text/plain)
2010-04-05 22:56 UTC, alied
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jasondonmoyer 2010-03-24 14:25:19 UTC
Build: NetBeans IDE Dev (Build 201003240200)
VM: Java HotSpot(TM) 64-Bit Server VM, 16.0-b13, Java(TM) SE Runtime Environment, 1.6.0_18-b07
OS: Linux

User Comments:
jasondonmoyer: deleted a line of text in the java editor while a build was running in the background




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.editor.lib2.view.EditorBoxView.getViewIndexChecked(EditorBoxView.java:389)
   at org.netbeans.modules.editor.lib2.view.EditorView.getViewIndex(EditorView.java:372)
   at javax.swing.text.View.getToolTipText(View.java:1010)
   at javax.swing.text.View.getToolTipText(View.java:1016)
   at javax.swing.text.View.getToolTipText(View.java:1016)
   at javax.swing.plaf.basic.BasicTextUI.getToolTipText(BasicTextUI.java:1228)
Comment 1 jasondonmoyer 2010-03-24 14:25:24 UTC
Created attachment 95685 [details]
stacktrace
Comment 2 Ondrej Vrabec 2010-03-25 10:46:53 UTC
Created attachment 95778 [details]
stacktrace
Comment 3 Vitezslav Stejskal 2010-03-25 11:35:44 UTC
*** Bug 182664 has been marked as a duplicate of this bug. ***
Comment 4 Andrei Chistiakov 2010-03-25 13:49:58 UTC
Created attachment 95809 [details]
stacktrace

Debugged Mobile Application. Execution stopped at breakpoint and the exception was thrown
Comment 5 Exceptions Reporter 2010-03-26 09:47:18 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=166894
Comment 6 tnleeuw 2010-03-26 10:48:17 UTC
Created attachment 95924 [details]
stacktrace

Editing, moving cursor... (can't remember the exact last key pressed)
Comment 7 sreimers 2010-03-26 16:45:24 UTC
Created attachment 95984 [details]
stacktrace
Comment 8 Michel Graciano 2010-03-26 19:08:07 UTC
Created attachment 96003 [details]
stacktrace
Comment 9 Exceptions Reporter 2010-03-26 19:08:27 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=166894
Comment 10 host 2010-03-27 21:12:47 UTC
Created attachment 96074 [details]
stacktrace
Comment 11 host 2010-03-27 21:14:47 UTC
Created attachment 96076 [details]
stacktrace
Comment 12 esmithbss 2010-03-28 08:54:56 UTC
Created attachment 96091 [details]
stacktrace

Copied a section of code from a separate application to the clipboard.
Refocussed on NetBeans
Began scrolling up in the editor using the mouse wheel to locate the paste location.
Comment 13 esmithbss 2010-03-29 06:37:22 UTC
Created attachment 96125 [details]
stacktrace

Scrolling down in the editor window of a ruby (.rb) file using the mouse roller.
Comment 14 Exceptions Reporter 2010-03-29 06:37:35 UTC
This bug already has 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=166894
Comment 15 stefan79 2010-03-29 09:45:26 UTC
Created attachment 96150 [details]
stacktrace

Navigating in Java-File while "Checking for external changes".
Comment 16 host 2010-03-29 10:15:26 UTC
Created attachment 96155 [details]
stacktrace
Comment 17 Alexander Simon 2010-03-29 10:17:27 UTC
Created attachment 96156 [details]
stacktrace
Comment 18 misterm 2010-03-29 18:55:33 UTC
Created attachment 96266 [details]
stacktrace
Comment 19 misterm 2010-03-29 19:20:33 UTC
Created attachment 96269 [details]
stacktrace
Comment 20 Michel Graciano 2010-03-29 19:46:33 UTC
Created attachment 96275 [details]
stacktrace
Comment 21 swpalmer 2010-03-30 02:54:40 UTC
Created attachment 96292 [details]
stacktrace

Selected a few characters of Java source code and hit CTRL-C to copy it
Comment 22 Erno Mononen 2010-03-30 08:11:27 UTC
Dozens of Ruby and PHP unit tests are also failing due to this, so a timely fix would be appreciated..
Comment 23 Alexandr Scherbatiy 2010-03-30 10:27:42 UTC
Created attachment 96312 [details]
stacktrace
Comment 24 Jaromir Uhrik 2010-03-30 10:49:44 UTC
Created attachment 96314 [details]
stacktrace

Doubleclicked on the JButton in the JFrame form and the exception appeared...
Comment 25 stefan79 2010-03-30 13:49:44 UTC
Created attachment 96351 [details]
stacktrace
Comment 26 jasondonmoyer 2010-03-30 15:34:44 UTC
Created attachment 96367 [details]
stacktrace

pasting text in the java editor
Comment 27 Alexandr Scherbatiy 2010-03-31 13:17:16 UTC
Created attachment 96434 [details]
stacktrace
Comment 28 stefan79 2010-03-31 13:17:59 UTC
Created attachment 96435 [details]
stacktrace

Exception while Slowness-Detection
Comment 29 Michel Graciano 2010-03-31 17:11:02 UTC
Created attachment 96470 [details]
stacktrace
Comment 30 Alexandr Scherbatiy 2010-04-01 12:06:13 UTC
Created attachment 96521 [details]
stacktrace
Comment 31 misterm 2010-04-01 13:09:15 UTC
Created attachment 96528 [details]
stacktrace
Comment 32 Tomas Mysik 2010-04-01 15:23:17 UTC
Created attachment 96548 [details]
stacktrace

CTRL + click on a method (jumps to a PHP class)
Comment 33 esmithbss 2010-04-01 20:05:46 UTC
Created attachment 96556 [details]
stacktrace

Using the <Home> key to move to the front of the editable line within an editor window.
Comment 34 Jaromir Uhrik 2010-04-02 09:03:40 UTC
Created attachment 96572 [details]
stacktrace

Doubleclicked on a JTextfield in my JFrame and the exception appeared after the java src editor displayed.
Comment 35 Alexandr Scherbatiy 2010-04-02 09:24:34 UTC
Reproduced in NetBeans IDE Dev (Build 201004020200)
http://statistics.netbeans.org/analytics/exception.do?id=364783
Comment 36 Egor Ushakov 2010-04-02 12:57:42 UTC
Created attachment 96593 [details]
stacktrace
Comment 37 Egor Ushakov 2010-04-02 13:19:45 UTC
Created attachment 96596 [details]
stacktrace
Comment 38 abajja 2010-04-02 13:41:41 UTC
Created attachment 96604 [details]
stacktrace
Comment 39 Egor Ushakov 2010-04-02 14:19:42 UTC
Created attachment 96610 [details]
stacktrace
Comment 40 big_al 2010-04-02 22:19:54 UTC
Created attachment 96628 [details]
stacktrace

Switched from an XSD file to a Java Test Source file
Comment 41 Exceptions Reporter 2010-04-03 21:30:18 UTC
This bug already has 100 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=166894
Comment 42 alied 2010-04-05 21:39:31 UTC
Mea culpa:
yes, there were missing overridable methods.
Comment 43 alied 2010-04-05 22:55:28 UTC
Created attachment 96718 [details]
stacktrace

Addeed a new function and gave it format selecting the function body and pressing Shift+Alt+F
Comment 44 alied 2010-04-05 22:55:59 UTC
Created attachment 96719 [details]
stacktrace

when putting the mouse over a supposed error. Oddly, the eror was not actually an error (it was supposed to be a "The class is neither abstract nor implements inherited methods", give or take)
Comment 45 alied 2010-04-05 22:56:43 UTC
Created attachment 96720 [details]
stacktrace
Comment 46 Miloslav Metelka 2010-04-06 14:39:38 UTC
The problem is (children==null) on in EditorBoxView:

        return children.getViewIndexAtPoint(this, x, y, alloc);

This should only happen due to an inconsistency in view building which should already be fixed by issue #182504 that I've committed today. I've added a condition to integrity checks for both null-ness and emptiness of children in EBV in terms of #182504:

    @Override
    public String findIntegrityError() {
        if (children != null) {
            if (children.size() == 0) {
                return "children.size()==0";
            }
        } else {
            return "children==null";
        }
        return null;
    }

In order to distinguish pre/post-182504 case I've added a check:
http://hg.netbeans.org/jet-main/rev/a6ba839cbd1d
Comment 47 Quality Engineering 2010-04-07 04:44:41 UTC
Integrated into 'main-golden', will be available in build *201004070201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/a6ba839cbd1d
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #182672 - NullPointerException at org.netbeans.modules.editor.lib2.view.EditorBoxView.getViewIndexChecked - added check for non-null children of EditorBoxView.