We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexSuggestions & BugsSoftware Bugs › 089 - still undo bugs ...
Page Index Toggle Pages: 1
089 - still undo bugs ... (Read 1354 times)
089 - still undo bugs ...
May 9th, 2005, 3:16pm
 
there are still undo-bugs:

have two tabs, type something (multiple lines) in the first (main) tab,
switch to the second, type something,
switch back to first tab and start undoing.
the first line gets undone ok, then it starts duplication the code ...
i had a case where i couldn't select or edit the top of the code anymore.

save and reopen rescued the project ..

F

from the case where i could only recover by save-reopen:
( not sure when the out of memory error occured, but there should have been enough mem available anyway ..? )
Code:

java.lang.OutOfMemoryError
javax.swing.text.BadLocationException: Length must be positive
at javax.swing.text.AbstractDocument.getText(AbstractDocument.java:810)
at processing.app.syntax.JEditTextArea.getText(JEditTextArea.java:916)
at processing.app.syntax.JEditTextArea.getLineText(JEditTextArea.java:944)
at processing.app.syntax.JEditTextArea.xToOffset(JEditTextArea.java:621)
at processing.app.syntax.InputHandler$prev_line.actionPerformed(InputHandler.java:940)
at processing.app.syntax.InputHandler.executeAction(InputHandler.java:286)
at processing.app.syntax.DefaultInputHandler.keyPressed(DefaultInputHandler.java:210)
at processing.app.syntax.JEditTextArea.processKeyEvent(JEditTextArea.java:1630)
at java.awt.Component.processEvent(Component.java:4975)
at java.awt.Container.processEvent(Container.java:1613)
at java.awt.Component.dispatchEventImpl(Component.java:3681)
at java.awt.Container.dispatchEventImpl(Container.java:1671)
at java.awt.Component.dispatchEvent(Component.java:3543)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1713)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:627)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:831)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:741)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:592)
at java.awt.Component.dispatchEventImpl(Component.java:3572)
at java.awt.Container.dispatchEventImpl(Container.java:1671)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3543)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
Re: 089 - still undo bugs ...
Reply #1 - May 9th, 2005, 5:26pm
 
got this one again (no out-of-memory this time):
Code:

javax.swing.text.BadLocationException: Length must be positive


i'm currently moving lot's of code around in one project and the exception seems to happen when i scroll to the top of the document after some copy-paste-save-run-undo-... moves. sorry this is so fuzzy, i did not really pay attetion in which order i did things before the exception was raised.

F

<< --- update --- >>

this time a reopen does not recover from the bug. i still have too much whitespace which i can't select-delete-edit at the beginning (top) of every tab's code.
Re: 089 - still undo bugs ...
Reply #2 - May 9th, 2005, 5:46pm
 
ok, here's some code to reproduce (parts) of the bug:

Code:

{TAB 1}
int[] ints;

void setup()
{
size( 100,100);
ints = new int[10];
}

void draw()
{
for (int i=0; i<100; i++)
{
ints[i]++; // raise exception here
}
}

Code:

{TAB 2}
/*
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
*/


to reproduce the bug:
- cut (command-x) half the comment from tab 2
- run the sketch, raises exception
- go to tab 2
- undo the cutting

this will not only raise the exception mentioned earlier it as well will give you the strange insertion bug (lost linendings, code duplication).

( i'm not able to reproduce the scroll misbehaviour .. but i think it's tied to the unpredictable length of the via undo wrongly re-inserted code )

F
Re: 089 - still undo bugs ...
Reply #3 - May 10th, 2005, 3:27am
 
fixed for 90.
Page Index Toggle Pages: 1