FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 1332 : Creating a new tab and deleting it causes errors when Run is pressed
Last modified: 2009-10-18 11:11
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status:
RESOLVED
Resolution:
FIXED -
Pr
i
ority:
P1
Severity:
normal
Platform
All
O
S:
All
Windows
Mac OS
Linux
Other
Reporter:
Victoras
Assigned To:
Victoras
Attachment
Type
Created
Size
Actions
Patch to resolve the Bug
patch
2009-09-18 23:37
344 bytes
Description
: Opened: 2009-09-18 22:42
I am working on Processing 1.0.6 found the following bug:
This happens when you work on a Sketch with multiple Tabs (files).
The procedure to replicate the bug is the following:
[1] Add a new Tab (File) with a filename starting with a letter prior of the already existing
ones.
For example, if you have the following three tabs: "Main", "Second", "Third" you have to
add a Tab with a filename starting with a letter between 'M' and 'T' or before 'M'. So try to
add "Nine".
[2] Delete the Tab you just inserted.
You will notice that the Sketch does not compile, with the following error: Duplicate nested
type <name of your last Tab>.
This happens every time you delete a Tab which is between another ones, either it had
written anything in it, either not.
You have to restart Processing, in order to get it working.
This happens on a Mac, I don't have any Linux or Windows PC to test it elsewhere.
Additional Comment
#1 From Victoras 2009-09-18 23:37
edit
]
Patch to resolve the Bug
To apply the patch:
cd processing/app/src/processing/app/
patch < Sketch.patch
Additional Comment
#2 From Victoras 2009-09-18 23:40
(From update of
edit
])
><html><body><pre style="word-wrap: break-word; white-space: pre-wrap;">--- Sketch.java 2009-09-19 01:32:33.000000000 -0500
>+++ Sketch.new.java 2009-09-19 01:32:27.000000000 -0500
>@@ -594,7 +594,8 @@
> for (int j = i; j < codeCount-1; j++) {
> code[j] = code[j+1];
> }
>- codeCount--;
>+ code = (SketchCode[]) PApplet.shorten(code); //
BUG #1332
Fixed by Victor Mateevitsi
>+ codeCount--;
> return;
> }
> }
Additional Comment
#3 From fry 2009-09-19 11:17
Thanks much for looking into it, I'll get that patched for the next
release. 1.0.8 should be coming soon.
Additional Comment
#4 From fry 2009-10-18 11:11
applied, along with a related fix, for 1.0.8.