Start a new topic

Exeception in editor

[This topic is migrated from our old forums. The original author name has been removed]

I have noticed today some odd behavior in the editor today, where cut and paste operations would result in subsequent arrow keystrokes would cause whole lines to shift position. I was unable to determine a repeatable condition, but I did receive one logged exception. I noted a few times today when selecting a range of code and performing a Replace All did not replace all objects in the range - sometimes one on the last line was skipped. The exception below was caused when attempting to cut and paste a block of code: An internal error occurred in: javax.swing.undo.CannotUndoException The error may have affected the application state. Please notify vendor. Stack Trace: javax.swing.undo.CannotUndoException    at javax.swing.text.GapContent$InsertUndo.undo(GapContent.java:856)    at javax.swing.undo.CompoundEdit.undo(CompoundEdit.java:46)    at javax.swing.text.AbstractDocument$DefaultDocumentEvent.undo(AbstractDocument.java:2788)    at javax.swing.undo.CompoundEdit.undo(CompoundEdit.java:46)    at javax.swing.undo.CompoundEdit.undo(CompoundEdit.java:46)    at javax.swing.undo.UndoManager.undoTo(UndoManager.java:320)    at javax.swing.undo.UndoManager.undo(UndoManager.java:398)    at com.jidesoft.swing.DelayUndoManager.undo(Unknown Source)    at com.jidesoft.editor.SyntaxDocument.undo(Unknown Source)    at com.jidesoft.editor.CodeEditor.undo(Unknown Source)    at com.jidesoft.editor.action.InputHandler$zb_.actionPerformed(Unknown Source)    at com.jidesoft.editor.action.InputHandler.executeAction(Unknown Source)    at com.onseven.dbvis.f.A.B.ā(Z:2531)    at com.onseven.dbvis.f.A.B.Ă(Z:1986)    at com.onseven.dbvis.B.C.ā(Z:566)    at com.onseven.dbvis.B.C.ī(Z:3463)    at com.onseven.dbvis.B.C$6.execute(Z:2824)    at se.pureit.swing.R.F.actionPerformed(Z:2594)    at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1645)    at javax.swing.JComponent.processKeyBinding(JComponent.java:2859)    at javax.swing.JComponent.processKeyBindings(JComponent.java:2905)    at javax.swing.JComponent.processKeyEvent(JComponent.java:2822)    at com.jidesoft.editor.CodeEditor.processKeyEvent(Unknown Source)    at com.onseven.dbvis.f.A.B$A.processKeyEvent(Z:1328)    at java.awt.Component.processEvent(Component.java:6159)    at java.awt.Container.processEvent(Container.java:2083)    at java.awt.Component.dispatchEventImpl(Component.java:4744)    at java.awt.Container.dispatchEventImpl(Container.java:2141)    at java.awt.Component.dispatchEvent(Component.java:4572)    at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1856)    at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:722)    at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1000)    at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:865)    at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:686)    at java.awt.Component.dispatchEventImpl(Component.java:4616)    at java.awt.Container.dispatchEventImpl(Container.java:2141)    at java.awt.Window.dispatchEventImpl(Window.java:2489)    at java.awt.Component.dispatchEvent(Component.java:4572)    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:710)    at java.awt.EventQueue.access$400(EventQueue.java:82)    at java.awt.EventQueue$2.run(EventQueue.java:669)    at java.awt.EventQueue$2.run(EventQueue.java:667)    at java.security.AccessController.doPrivileged(Native Method)    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)    at java.awt.EventQueue$3.run(EventQueue.java:683)    at java.awt.EventQueue$3.run(EventQueue.java:681)    at java.security.AccessController.doPrivileged(Native Method)    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)    at java.awt.EventQueue.dispatchEvent(EventQueue.java:680)    at com.onseven.dbvis.N.A._.dispatchEvent(Z:483)    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) System Information: Product: DbVisualizer Pro 9.0.5 Build: #1924 (2013/03/05 13:16) Java VM: Java HotSpot(TM) 64-Bit Server VM Java Version: 1.6.0_43 Java Vendor: Apple Inc. OS Name: Mac OS X OS Arch: x86_64 OS Version: 10.8.3 Edited by: MattK on Mar 21, 2013 6:50 PM

[This reply is migrated from our old forums. The original author name has been removed]

Re: Exeception in editor
Second occurrence - seems to be tied to multiple cut and paste operations.
[This reply is migrated from our old forums.]

Re: Exeception in editor
Hi Matt, Can you provide an example where this always happen, or describe in more detail what you do when you see it happen? Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: Exeception in editor
As I said, I have not come up with a reproducible pattern yet, only that it occurred when my workflow involved many search and replace operations and cut and paste operations. I posted the exception above because it is the only useful data I can provide at this point, and it occurred twice. The only additional detail I can provide is that I notice that when selecting a range of code and performing an operation on it, the editor becomes "unstable" after - whole lines of text move around with simple single keystrokes - and a restart is needed to resume normal editor behavior. However I have not been able to establish a pattern that puts the editor into this state. It is a recent issue, had not seen it prior to 9.0.4, but also not immediately after upgrading to 9.0.5. There are also frequent Java updates being pushed by Oracle, but I have not installed any of them this week. I will try to determine a reproducible pattern, but hopefully something can be found in the exception I provided above.
[This reply is migrated from our old forums. The original author name has been removed]

Re: Exeception in editor
I may be seeing a pattern. While not always reproducible, I notice that sometimes if I select a block of code, then use find and replace from Ctrl+h and check Selected Text, only one replacement is made when I choose replace All. When this occurs, the editor begins to exhibit the behavior of moving lines of text around randomly in response to single key-presses, even when there is no text selected. In case it helps in testing, the replacements I am making are object names suffixes beginning with an underscore.
[This reply is migrated from our old forums.]

Re: Exeception in editor
Hi Matt, Thanks for the additional info. Which version do you use? We included a fix for other problems related to Find/Replace All in 9.0.5. Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: Exeception in editor
Product: DbVisualizer Pro 9.0.5 Build: #1924 (2013/03/05 13:16) Java VM: Java HotSpot(TM) 64-Bit Server VM Java Version: 1.6.0_43 Java Vendor: Apple Inc. OS Name: Mac OS X OS Arch: x86_64 OS Version: 10.8.3
[This reply is migrated from our old forums.]

Re: Exeception in editor
Hi Matt, I've looked at this again and I have found some oddities with Replace All itself but nothing that makes the editor behave as you describe afterwards. When you say "select a block of code", do you mean a regular select or a "column select" (a rectangular area via Alt Select)? Roughly how large is the script you're working with (number of lines and columns)? Roughly how many occurrences are there within the selection? Just to make sure I get it, with "object names suffixes beginning with an underscore", do you mean you change "_myschema" in text like "select * from _myschema.myobject" to something else? An explicit example would be good. Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: Exeception in editor
> When you say "select a block of code", do you mean a regular select or a "column select" Regular select > Roughly how large is the script you're working with (number of lines and columns)? 30 lines > Roughly how many occurrences are there within the selection? 5 - 6 > Just to make sure I get it, with "object names suffixes beginning with an underscore", do you mean you change "_myschema" in text like "select * from _myschema.myobject" to something else? An explicit example would be good. For example, I would be changing all terms like "table_a" to "table_b".
[This reply is migrated from our old forums.]

Re: Exeception in editor
Hi Matt, Sorry, still no luck reproducing this. Are you editing a file you have loaded into the editor, or just statements that you have typed into the editor? If it's a file, does it have some non-default encoding? Can you email the file to support at dbvis dot com? Anything going on when this happens, e.g. are you very close to using all available memory, do you have some query running in the background? Anything other than just editing the script? Is there anything special with your Mac OS X configuration? We will soon release 9.0.6 which will include a new version of the editor. None of the changes seem to be related to this, but with some luck it may fix it? Best Regards, Hans