Skip to content

Fix for bug 950: NPE at/near Compiler.java:407 during compilation #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 11, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions app/src/processing/app/debug/Compiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -401,10 +401,8 @@ private void execAsynchronously(List commandList) throws RunnerException {
boolean compiling = true;
while (compiling) {
try {
if (in.thread != null)
in.thread.join();
if (err.thread != null)
err.thread.join();
in.join();
err.join();
result = process.waitFor();
//System.out.println("result is " + result);
compiling = false;
Expand Down
11 changes: 9 additions & 2 deletions app/src/processing/app/debug/MessageSiphon.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,15 @@ public void run() {
}
}


// Wait until the MessageSiphon thread is complete.
public void join() throws java.lang.InterruptedException {
// Grab a temp copy in case another thread nulls the "thread"
// member variable
Thread t = thread;
if (t != null) t.join();
}

public Thread getThread() {
return thread;
}
}
}
6 changes: 2 additions & 4 deletions app/src/processing/app/debug/Sizer.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,8 @@ public long computeSize() throws RunnerException {

while(running) {
try {
if (in.thread != null)
in.thread.join();
if (err.thread != null)
err.thread.join();
in.join();
err.join();
r = process.waitFor();
running = false;
} catch (InterruptedException intExc) { }
Expand Down