processing / processing4

Processing is a flexible software sketchbook and a language for learning how to code. Since 2001, Processing has promoted software literacy within the visual arts and visual literacy within technology. There are tens of thousands of students, artists, designers, researchers, and hobbyists who use Processing for learning and prototyping.
https://processing.org
Other
10 stars 1 forks source link

“An error occurred while starting the application” with 4.0a3 on Windows #156

Closed processing-bot closed 2 months ago

processing-bot commented 3 years ago

Created by: TechnicJelle

## Description

When I open processing-4.0a3 it shows an error message "An error occurred while starting the application."

Expected Behaviour

I'd expect it to start up just like processing-4.0a2, which does work normally.

Current Behaviour

An error message pops up saying "An error occurred while starting the application."

Untitled

Steps to Reproduce

  1. Download 4.0 alpha 3 (17 January 2021) Win 64 from https://processing.org/download/
  2. Unzip the file
  3. Launch processing.exe

Your Environment

If there's any more information I can provide, please tell me what and how

processing-bot commented 3 years ago

Created by: benfry

Couple things to check:

processing-bot commented 3 years ago

Created by: TechnicJelle

  1. core.jar is present in the folder at this location: processing-4.0a3\core\library\core.jar
  2. I have unpacked the files, and I am running them from inside a folder on my desktop.
    • Renaming my sketchbook did not solve the issue.
    • Deleting my preference file did also not solve the issue.
    • I have an M.2 NVMe drive, so I don't suspect "an exceptionally large sketchbook folder" is the problem. It's only 1.22 GB big, anyway.
    • I am using Windows Defender, but I haven't heard anything from it regarding Processing.
      launch4j.log
Version:    3.9
CmdLine:    C:\Users\TechnicJelle\Desktop\Processing\processing-4.0a3\processing.exe --l4j-debug
WOW64:      yes
Working dir:    C:\Users\TechnicJelle\Desktop\Processing\processing-4.0a3\.
Bundled JRE:    java
Check launcher: C:\Users\TechnicJelle\Desktop\Processing\processing-4.0a3\java\bin\javaw.exe (OK)
Heap -Xmx:  Requested 512 MB / 0%, Available: 7792 MB, Heap size: 512 MB
Add classpath:  lib\pde.jar
Add classpath:  core\library\core.jar
Add classpath:  lib\jna.jar
Add classpath:  lib\jna-platform.jar
Add classpath:  lib\antlr-4.7.2-complete.jar
Add classpath:  lib\ant.jar
Add classpath:  lib\ant-launcher.jar
Launcher:   C:\Users\TechnicJelle\Desktop\Processing\processing-4.0a3\java\bin\javaw.exe
Launcher args:  -Xmx512m -Djna.nosys=true -Dsun.java2d.uiScale.enabled=false -Djna.boot.library.path=lib -Djna.nounpack=true -Dsun.java2d.d3d=false -Dsun.java2d.ddoffscreen=false -Dsun.java2d.noddraw=true -classpath "lib;lib\pde.jar;core\library\core.jar;lib\jna.jar;lib\jna-platform.jar;lib\antlr-4.7.2-complete.jar;lib\ant.jar;lib\ant-launcher.jar" processing.app.Base
Args length:    354/32768 chars
Error msg:  An error occurred while starting the application.

Thank you for replying so fast! I hope this is useful information!

processing-bot commented 3 years ago

Created by: benfry

Try opening a command prompt, and cd to the Processing folder (the one with processing.exe in it). Then paste this in and hit return:

.\java\bin\java.exe -cp lib/pde.jar;core/library/core.jar;lib/jna.jar;lib/jna-platform.jar;lib/antlr-4.7.2-complete.jar;lib/ant.jar;lib/ant-launcher.jar -Djna.nosys=true -Dsun.java2d.uiScale.enabled=false -Djna.boot.library.path=lib -Djna.nounpack=true -Dsun.java2d.d3d=false -Dsun.java2d.ddoffscreen=false -Dsun.java2d.noddraw=true processing.app.Base

That'll manually start the software and may provide more clues about what's going on.

processing-bot commented 3 years ago

Created by: TechnicJelle

That did it! It started up nicely now! And my sketches work perfectly! I can't seem to get it to generate a new launch4j.log, though

processing-bot commented 3 years ago

Created by: benfry

Nuts; sounds like a problem with the launch4j wrapper.

processing-bot commented 3 years ago

Created by: benfry

Are you running the software from a folder/path that contains non-ASCII characters?

processing-bot commented 3 years ago

Created by: TechnicJelle

I'm running it from C:\Users\TechnicJelle\Desktop\Processing\processing-4.0a3\processing.exe, so I really don't think there are any non-ASCII character in there. I could try moving it to C:\processing-4.0a3\processing.exe to see if that helps?

processing-bot commented 3 years ago

Created by: benfry

Sure, worth a try… 

Oh, also try replacing .\java\bin\java.exe in that command above with just java (no dot in front, etc) and see what happens. Just in case the launcher is trying to use a different version of Java on your machine.

processing-bot commented 3 years ago

Created by: benfry

Nuts; ok… Sounds like the solution is to swap out launch4j for another launcher on Windows. We'll have to see how pervasive this is.

In the meantime, you can put the original line I shared into a .bat file so you have something to double-click to start things up.

processing-bot commented 3 years ago

Created by: TechnicJelle

Running it from C:\processing-4.0a3\processing.exe did not yield any different results.

C:\processing-4.0a3>java -cp lib/pde.jar;core/library/core.jar;lib/jna.jar;lib/jna-platform.jar;lib/antlr-4.7.2-complete.jar;lib/ant.jar;lib/ant-launcher.jar -Djna.nosys=true -Dsun.java2d.uiScale.enabled=false -Djna.boot.library.path=lib -Djna.nounpack=true -Dsun.java2d.d3d=false -Dsun.java2d.ddoffscreen=false -Dsun.java2d.noddraw=true processing.app.Base also launches Processing normally like it should.

processing-bot commented 3 years ago

Created by: cacheflowe

I got this startup error too and was about to report it. I had the same successful manual startup results with the bundled java.exe command noted above, but a failure with the system java command, as I have java version "1.8.0_251" as my default system Java version.

processing-bot commented 3 years ago

Created by: benfry

Oh… I have an idea. Try renaming the java folder in this release, and then copying the java folder from the alpha 2 release over instead. It might be the release number…

processing-bot commented 3 years ago

Created by: TechnicJelle

I hope this fix is easy

And in the meantime, I think I'll just stick with alpha 2. Or the stable version. Those both work perfectly fine still.

processing-bot commented 3 years ago

Created by: TechnicJelle

No luck... Still doesn't work

processing-bot commented 3 years ago

Created by: cacheflowe

No luck here either :(

processing-bot commented 3 years ago

Created by: benfry

Ok, it's the processing.exe file. You can copy processing.exe from alpha 2 and it'll work fine.

Which means that it was broken by… the updated splash screen image.

processing-bot commented 3 years ago

Created by: benfry

Nuts; thought that would be it—this newest Java release is 11.0.9.1 (has an extra digit at the end) so I thought that may have been the cause.

processing-bot commented 3 years ago

Created by: github-actions[bot]

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

processing-bot commented 3 years ago

Created by: benfry

New build (and replacement processing.exe file) posted at https://github.com/processing/processing4/releases/tag/processing-1272-4.0a3