Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / IDE crashes (and unsaved work is lost) if JDK is absent when exporting APK

Author
Message
Dale Schultz
3
Years of Service
User Offline
Joined: 1st Nov 2021
Location: Maine, USA
Posted: 1st Nov 2021 18:29
I am using AppGameKit IDE 2021.10.19

I tried to export an APK and I get the message that the Java JDK was not found. OK fair enough. When one clicks the OK button though, AppGameKit terminates.


Do developers/moderators report bugs or should we file a crash bug report elsewhere?
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 1st Nov 2021 20:17 Edited at: 1st Nov 2021 20:19
if you haven't yet installed JDK, see here: https://forum.thegamecreators.com/thread/227903#msg2666789

Quote: "Do developers/moderators report bugs or should we file a crash bug report elsewhere?"

for potential bugs, we should search/discuss here on the forums as attempt to confirm the bug and/or look in the github issues.

ideally, the individual discovering the bug would report it as an issue on the github to ensure follow-up. i've added a few for others and/or sorted/separated some already posted (multiple issues under 1 ticket isn't helpful, for example), otherwise.

if you're offering that our work should be automatically saved before attempt to export (which, obviously, might fail), i'd definitely agree.
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 1st Nov 2021 21:28 Edited at: 1st Nov 2021 21:31
This was reported as fixed >> https://forum.thegamecreators.com/thread/227875#msg2666583

you need to install 2021.09.30a

Edit: Ignore me, I'm an Idiot!! That was Studio ... maybe related tho!
Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 2nd Nov 2021 00:57 Edited at: 2nd Nov 2021 01:04
Can conform this, even with the JDK installed it does not find it unless you set the PATH manually and will crash out if not found ... I thought this was fixed?

Quote: "1- Right click on "This PC" > right-click Properties > Advanced system settings > Environment Variables > select PATH then EDIT.

2- Add your jdk bin folder path to environment variables, it should look like this:

"C:\Program Files\Java\jdk-17.0.1\bin".""


Related: https://forum.thegamecreators.com/thread/227977
Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee
Dale Schultz
3
Years of Service
User Offline
Joined: 1st Nov 2021
Location: Maine, USA
Posted: 2nd Nov 2021 01:30 Edited at: 2nd Nov 2021 01:45
Thanks, yes the path setting prevented the error message and subsequent crash.
However, it produced an .aab file but no .apk file so I am now at least a step further.

Edit: update: OK all I had to do was select "Google apk" and it gave me the apk !
Many thanks!
Dale Schultz
3
Years of Service
User Offline
Joined: 1st Nov 2021
Location: Maine, USA
Posted: 2nd Nov 2021 01:43
Quote: "if you're offering that our work should be automatically saved before attempt to export (which, obviously, might fail), i'd definitely agree."


no, I was not suggesting that at all. That can have other nasty side effects....

The only reason I mention loss of work is because the potential loss of data should (rightly) elevate the severity of the issue.

The reason automatic saves can be problematic is because in any system where the user is not expecting changes to be saved, doing so presents unexpected behavior. The user may have just deleted some big chunk of code, not intending to save and test it by exporting! For functionality where a catastrophic crash is likely and can't be fixed for some reason, then a better approach is to check for dirty data at the start of the export and ask the user then to save if they care about the changes before getting too far.

In this case even though there is a system configuration issue, I regard it as a bug. I don't see it documented on GitHub (search for jarsigner produces no results) I would be happy to write it up, I grabbed a screen shot of the error message before fixing the path. (It seems so 1980s to be mucking with the path environment variable! )
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 2nd Nov 2021 02:19
Quote: "It seems so 1980s"

indeed. and, while studio finds JDK on its own (without issue since the last update?), Classic hasn't gotten there, yet.

the devs intend to remedy that but feel free to document it on the github.
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 2nd Nov 2021 02:44
Quote: "if you're offering that our work should be automatically saved before attempt to export "


Export already triggers an autosave before the dialog opens, even in the event of a crash no data is lost.
Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee
Dale Schultz
3
Years of Service
User Offline
Joined: 1st Nov 2021
Location: Maine, USA
Posted: 2nd Nov 2021 02:44
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 2nd Nov 2021 03:07 Edited at: 2nd Nov 2021 03:09
@DS all tagged up.
i believe they're considering/(should be adding, AFAIK) a manual jdk path dialog in the export, as well.

PTC wrote: "Export already triggers an autosave"

in the project folder or ??
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 2nd Nov 2021 03:57
Yes, the project saves on export just like it does for run, broadcast and compile, I tested HTML5 and Android, I assume IOS saves too but I refuse to click the button!!! lol



Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee
Dale Schultz
3
Years of Service
User Offline
Joined: 1st Nov 2021
Location: Maine, USA
Posted: 2nd Nov 2021 14:35
good to know that autosave is active. I thought it did not because when I was using the trial version (2017) I lost code when it crashed once.

Login to post a reply

Server time is: 2024-11-21 13:19:15
Your offset time is: 2024-11-21 13:19:15