diff --git a/app/src/processing/app/debug/Runner.java b/app/src/processing/app/debug/Runner.java index 315e9221f..7700e7b41 100644 --- a/app/src/processing/app/debug/Runner.java +++ b/app/src/processing/app/debug/Runner.java @@ -388,28 +388,25 @@ public class Runner implements MessageConsumer { Process p = exc.process(); //System.out.println(p); String[] errorStrings = PApplet.loadStrings(p.getErrorStream()); - String[] inputStrings = PApplet.loadStrings(p.getInputStream()); + /*String[] inputStrings =*/ PApplet.loadStrings(p.getInputStream()); //System.out.println("error:"); PApplet.println(errorStrings); //System.out.println("input:"); //PApplet.println(inputStrings); - - exc.printStackTrace(); - System.err.println("Could not run the sketch (Target VM failed to initialize)."); - System.err.println("Make sure that you haven't set the maximum available memory too high."); - System.err.println("For more information, read revisions.txt and Help -> Troubleshooting."); - - //System.err.println("Target VM failed to initialize:"); - - //System.err.println("msg is " + exc.getMessage()); - //exc.printStackTrace(); - //throw new Error("Target VM failed to initialize: " + - //exc.getMessage()); - //throw new Error(exc.getMessage()); -// Process p = exc.process(); -// String[] em = PApplet.loadStrings(p.getErrorStream()); -// PApplet.println(em); - //throw new RunnerException(exc.getMessage()); + + if (errorStrings != null && errorStrings.length > 1) { + if (errorStrings[0].indexOf("Invalid maximum heap size") != -1) { + Base.showWarning("Way Too High", + "Please lower the value for \u201Cmaximum available memory\u201D in the\n" + + "Preferences window. For more information, read Help \u2192 Troubleshooting.", + exc); + } + } else { + exc.printStackTrace(); + System.err.println("Could not run the sketch (Target VM failed to initialize)."); + System.err.println("Make sure that you haven't set the maximum available memory too high."); + System.err.println("For more information, read revisions.txt and Help \u2192 Troubleshooting."); + } editor.error("Could not run the sketch."); return null; } diff --git a/build/shared/revisions.txt b/build/shared/revisions.txt index 008a7ba7a..4e0a23bda 100644 --- a/build/shared/revisions.txt +++ b/build/shared/revisions.txt @@ -7,7 +7,7 @@ releases will be super crusty. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -ABOUT REV 0143 - 27 July 2008 +ABOUT REV 0143 - 28 July 2008 Now using ECJ (the Eclipse Compiler for Java) instead of Javac. The Eclipse compiler is more easily pluggable in the more basic ways @@ -26,6 +26,9 @@ that we'd like to use it. Also moving toward removing the requirement + "Target VM failed to initialize: VM initialization failed" now fixed. http://dev.processing.org/bugs/show_bug.cgi?id=796 ++ Added a proper error message for cases where "maximum available memory" + is set too high. + + A handful of fixes for the build scripts, submitted by helpful users. http://dev.processing.org/bugs/show_bug.cgi?id=851 http://dev.processing.org/bugs/show_bug.cgi?id=842 diff --git a/core/todo.txt b/core/todo.txt index 89755f021..f4f1c3bed 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -21,6 +21,7 @@ X though prolly the converted version of the .ttf? X add a fix so that negative angle values won't hork up arc() command X add resize() method to PImage +_ use gluErrorString() for glError() stuff _ incorporate changes from andres colubri into PGraphicsOpenGL diff --git a/todo.txt b/todo.txt index 4d27ed7f4..d306b6187 100644 --- a/todo.txt +++ b/todo.txt @@ -8,6 +8,7 @@ X http://dev.processing.org/bugs/show_bug.cgi?id=831 X also need to handle "unexpected type" error in that example X "Target VM failed to initialize: VM initialization failed" when trying to run X http://dev.processing.org/bugs/show_bug.cgi?id=796 +X add better error message for memory too high _ draw mode apps do not shut off the run button when finished