Bug 208931 - Error when changing text.
Error when changing text.
Status: RESOLVED FIXED
Product: editor
Classification: Unclassified
Component: CSL (API & infrastructure)
7.2
PC Windows 7
: P1 (vote)
: 7.2
Assigned To: Milutin Kristofic
issues@editor
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-28 06:56 UTC by KhArtNJava
Modified: 2012-10-24 16:04 UTC (History)
19 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
stacktrace (3.32 KB, text/plain)
2012-02-28 06:56 UTC, KhArtNJava
Details
stacktrace (3.38 KB, text/plain)
2012-02-28 15:34 UTC, Jiri Prox
Details
stacktrace (3.38 KB, text/plain)
2012-02-29 01:25 UTC, schkovich
Details
stacktrace (3.40 KB, text/plain)
2012-02-29 17:01 UTC, Martin Fousek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description KhArtNJava 2012-02-28 06:56:06 UTC
Created attachment 116166 [details]
stacktrace

NetBeans IDE Build 201202270400.

How to reproduce:
for example, piece of the php code:
print_r($_REQUEST['prods']);
Select with mouse some text, for example "prods". Type some text.

P.S. Today I applied the updates:

Git
     Git Client Library [0.9.0 -> 0.10.0] 
Java
     Java Declarative Hints [1.3.0.1.12 -> 1.3.0.1.13]
     Java Editor [2.40.0.9.1.1 -> 2.40.1.9.1.1]
     Java Hints [1.63.0.12.9.19.6.1 -> 1.63.0.13.9.19.6.1] 
PHP
     Editor Library [3.20.0.19.26 -> 3.20.1.19.26]

May be error in      Editor Library [3.20.0.19.26 -> 3.20.1.19.26] ?


java.lang.StringIndexOutOfBoundsException: String index out of range: 0
	at java.lang.String.charAt(String.java:695)
	at org.netbeans.modules.csl.core.CslEditorKit$GsfDefaultKeyTypedAction.replaceSelection(CslEditorKit.java:266)
	at org.netbeans.editor.BaseKit$DefaultKeyTypedAction$2.run(BaseKit.java:1160)
	at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:347)
	at org.netbeans.editor.BaseKit$DefaultKeyTypedAction.actionPerformed(BaseKit.java:1151)
	at org.netbeans.editor.ext.ExtKit$ExtDefaultKeyTypedAction.actionPerformed(ExtKit.java:1076)
	at org.netbeans.modules.csl.core.CslEditorKit$GsfDefaultKeyTypedAction.actionPerformed(CslEditorKit.java:234)
	at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:339)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1661)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2879)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2926)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2842)
	at java.awt.Component.processEvent(Component.java:6282)
	at java.awt.Container.processEvent(Container.java:2229)
	at java.awt.Component.dispatchEventImpl(Component.java:4861)
	at java.awt.Container.dispatchEventImpl(Container.java:2287)
	at java.awt.Component.dispatchEvent(Component.java:4687)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1890)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:752)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1017)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:889)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:717)
	at java.awt.Component.dispatchEventImpl(Component.java:4731)
	at java.awt.Container.dispatchEventImpl(Container.java:2287)
	at java.awt.Window.dispatchEventImpl(Window.java:2713)
	at java.awt.Component.dispatchEvent(Component.java:4687)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
	at java.awt.EventQueue.access$000(EventQueue.java:101)
	at java.awt.EventQueue$3.run(EventQueue.java:666)
	at java.awt.EventQueue$3.run(EventQueue.java:664)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.awt.EventQueue$4.run(EventQueue.java:680)
	at java.awt.EventQueue$4.run(EventQueue.java:678)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:162)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Comment 1 Ondrej Brejla 2012-02-28 09:05:26 UTC
No php class in stacktrace...reassigning to csl.
Comment 2 KhArtNJava 2012-02-28 10:30:21 UTC
Added exception number 562528
Comment 3 Jiri Prox 2012-02-28 15:34:40 UTC
Created attachment 116187 [details]
stacktrace

SIOOBE when replacing selection
Comment 4 Exceptions Reporter 2012-02-28 15:34:46 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=185367
Comment 5 Milutin Kristofic 2012-02-28 15:38:48 UTC
Quickfix:

http://hg.netbeans.org/jet-main/rev/9a0cfa963dad
Comment 6 KhArtNJava 2012-02-28 16:41:28 UTC
Will these changes apply to the IDE nightly Build
20120228xxxx?
Comment 7 schkovich 2012-02-29 01:25:43 UTC
Created attachment 116198 [details]
stacktrace

Replacing name of parameter after code completion of method
Comment 8 Exceptions Reporter 2012-02-29 01:25:54 UTC
This bug already has 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=185367
Comment 9 Martin Fousek 2012-02-29 17:01:09 UTC
Created attachment 116215 [details]
stacktrace
Comment 10 Exceptions Reporter 2012-03-01 07:19:09 UTC
This bug already has 50 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=185367
Comment 11 Quality Engineering 2012-03-01 11:00:31 UTC
Integrated into 'main-golden', will be available in build *201203010400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/9a0cfa963dad
User: Milutin Kristofic <mkristofic@netbeans.org>
Log: #208931 - Error when changing text
Comment 12 jucrouzet 2012-03-01 12:18:25 UTC
Still cannot see *201203010400* in the nightly list.
Is there any planning ?

Thanks
Comment 13 KhArtNJava 2012-03-01 13:55:41 UTC
201203010400 - OK, no exceptions on text replacement in php files.
Comment 14 jucrouzet 2012-03-12 01:41:10 UTC
Great, it's OK under a PHP file.
Still the same problem under an HTML file :


java.lang.StringIndexOutOfBoundsException: String index out of range: 0
	at java.lang.String.charAt(String.java:695)
	at org.netbeans.modules.html.editor.api.HtmlKit$HtmlDefaultKeyTypedAction.replaceSelection(HtmlKit.java:462)
	at org.netbeans.editor.BaseKit$DefaultKeyTypedAction$2.run(BaseKit.java:1160)
	at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:347)
	at org.netbeans.editor.BaseKit$DefaultKeyTypedAction.actionPerformed(BaseKit.java:1151)
	at org.netbeans.editor.ext.ExtKit$ExtDefaultKeyTypedAction.actionPerformed(ExtKit.java:1076)
	at org.netbeans.modules.html.editor.api.HtmlKit$HtmlDefaultKeyTypedAction.actionPerformed(HtmlKit.java:427)
	at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:339)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1661)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2879)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2926)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2842)
	at java.awt.Component.processEvent(Component.java:6282)
	at java.awt.Container.processEvent(Container.java:2229)
	at java.awt.Component.dispatchEventImpl(Component.java:4861)
	at java.awt.Container.dispatchEventImpl(Container.java:2287)
	at java.awt.Component.dispatchEvent(Component.java:4687)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1890)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:752)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1017)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:889)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:717)
	at java.awt.Component.dispatchEventImpl(Component.java:4731)
	at java.awt.Container.dispatchEventImpl(Container.java:2287)
	at java.awt.Window.dispatchEventImpl(Window.java:2713)
	at java.awt.Component.dispatchEvent(Component.java:4687)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
	at java.awt.EventQueue.access$000(EventQueue.java:101)
	at java.awt.EventQueue$3.run(EventQueue.java:666)
	at java.awt.EventQueue$3.run(EventQueue.java:664)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.awt.EventQueue$4.run(EventQueue.java:680)
	at java.awt.EventQueue$4.run(EventQueue.java:678)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:158)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Comment 15 Milutin Kristofic 2012-03-12 12:29:46 UTC
Thank you for information.

Htmlkit is a problem of html editor, since they copy paste code from csl. I send them a patch for it in Bug #209019.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo