FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 380 : Explicit use of System.err causes strange behavior
Last modified: 2006-07-26 13:30
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status:
RESOLVED
Resolution:
INVALID -
Pr
i
ority:
P4
Severity:
normal
Platform
All
O
S:
All
Windows
Mac OS
Linux
Other
Reporter:
Eric
Assigned To:
fry
Attachment
Type
Created
Size
Actions
Description
: Opened: 2006-07-24 15:17
I was trying to debug and I put in explicit print calls to System.err.
Strange behavior ensued. My application is threaded. Some threads would
execute normally, but then others would stop in random places. The
Processing draw() method was never called.
I speculate that I was running into a race condition on System.err with
Processing and losing.
Eric
Additional Comment
#1 From fry 2006-07-25 05:08
do you mean that you're calling System.err.println() and having problems,
or that you're messing with the redirected variables from the editor
console class?
Additional Comment
#2 From Eric 2006-07-25 09:37
(In reply to
comment #1
)
>
>
>
> Additional
Comment #1
From
> fry
> 2006-07-25 05:08
>
> <!--
> addReplyLink(1); //-->[reply]
>
>
>
>
> do you mean that you're calling System.err.println() and having
problems,
> or that you're messing with the redirected variables from the editor
> console class?
>
>
I am using System.err.println() and having problems. I put them in setup().
Some would not print at all. If I had something like
println("hello Ben.");
System.err.println("I am hanging.");
println("hello Eric.");
then the console output would be
hello Ben.
hello Eric.
The draw() method never got called. The only way to kill the PApplet (Mac
OS X) was to quit Processing.
Additional Comment
#3 From fry 2006-07-25 10:32
can you attach a sketch that demonstrates the problem?
are you using java 1.5 on your mac?
Additional Comment
#4 From Eric 2006-07-26 13:29
(In reply to
comment #3
)
> can you attach a sketch that demonstrates the problem?
>
> are you using java 1.5 on your mac?
>
>
I can't attach one. I got it working again and now I can't seem to
replicate the problem. I know it was there and that deleting the System.err
calls eliminated the problem. I did not archive the sketch since it only
generated problems.
I am using java 1.5. At least that's what java -version tells me.