From 74fea471ab4b41eafbf46d481ff1435bacec5dee Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Thu, 26 Jul 2018 16:42:35 -0400 Subject: [PATCH] make error message for failed startup more specific (#5537, #5442) --- app/src/processing/app/Base.java | 15 ++++++++++----- core/todo.txt | 5 +++-- todo.txt | 10 ++++++---- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index 98e70b35c..90695b108 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -123,10 +123,15 @@ public class Base { // https://github.com/processing/processing/issues/5537 if (Platform.isWindows()) { String mess = t.getMessage(); - if (mess.contains("Could not initialize class com.sun.jna.Native") || - mess.contains("NoClassDefFoundError: processing/core/PApplet")) { + String missing = null; + if (mess.contains("Could not initialize class com.sun.jna.Native")) { + missing = "jnidispatch.dll"; + } else if (mess.contains("NoClassDefFoundError: processing/core/PApplet")) { + missing = "core.jar"; + } + if (missing != null) { Messages.showError("Necessary files are missing", - "Files required by Processing appear to be missing.\n\n" + + "A file required by Processing (" + missing + ") is missing.\n\n" + "Make sure that you're not trying to run Processing from inside\n" + "the .zip file you downloaded, and check that Windows Defender\n" + "hasn't removed files from the Processing folder.\n\n" + @@ -134,8 +139,8 @@ public class Base { "It is neither, but Microsoft has ignored our pleas for help.)", t); } } - Messages.showTrace("It was not meant to be", - "A serious problem happened during startup. Please report:\n" + + Messages.showTrace("Unknown Problem", + "A serious error happened during startup. Please report:\n" + "http://github.com/processing/processing/issues/new", t, true); } } diff --git a/core/todo.txt b/core/todo.txt index 04686fd82..647ae15ba 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -19,8 +19,9 @@ _ https://github.com/processing/processing/issues/3011 jakub X Semi-transparent colors do not display properly in PGraphics X https://github.com/processing/processing/issues/5519 -_ PR from Jakub -_ https://github.com/processing/processing/pull/5522 +X Semi-transparent colors do not display properly in PGraphics +X https://github.com/processing/processing/issues/5519 +X https://github.com/processing/processing/pull/5522 gohai X Various ARM-related updates diff --git a/todo.txt b/todo.txt index b70609deb..c2939a0a9 100755 --- a/todo.txt +++ b/todo.txt @@ -25,7 +25,7 @@ o update to launch4j 3.11? o http://launch4j.sourceforge.net/changelog.html X update to Java 8u172 X show alternate error message on windows when JNA breaks or core.jar is missing -_ https://github.com/processing/processing/issues/5537 +X https://github.com/processing/processing/issues/5537 _ https://github.com/processing/processing/issues/4929 X https://github.com/processing/processing/issues/5442 _ https://www.microsoft.com/en-us/wdsi/filesubmission @@ -35,9 +35,6 @@ X update to Java 8u181 X https://github.com/processing/processing/pull/5586 X Contributed libraries/examples/etc that redirect to https are failing download X https://github.com/processing/processing/issues/5554 -_ Find in Reference disabled for various keywords (draw, for, if, catch, while) -_ https://github.com/processing/processing/issues/5562 -_ "Could not find a examples in the downloaded file" is a poorly worded message gohai @@ -114,6 +111,11 @@ _ Welcome screen doesn't size properly for HiDPI screens _ https://github.com/processing/processing/issues/4896 +_ Find in Reference disabled for various keywords (draw, for, if, catch, while) +_ https://github.com/processing/processing/issues/5562 +_ "Could not find a examples in the downloaded file" is a poorly worded message + + manager _ Manager fails to complete install of PythonMode when no windows open _ https://github.com/processing/processing/issues/5309