Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Dan on July 08, 2017, 07:23:15 PM

Title: Application Quit
Post by: Dan on July 08, 2017, 07:23:15 PM

Having problems with Application Quit. I may be setting it up wrong. This is what I did:


1. FSM on Empty Game Object.


2. Listener State: Get Key Down; Key Escape; Send Event Application Quit. (Used the System Event for Application Quit transition)


3. Quit the Game State: Action - Application Quit.


Testing in the editor, it fires without a problem when I hit the ESC key. When I play test it, it crashes every time. Any ideas? Wrong setup?



Title: Re: Application Quit
Post by: djaydino on July 09, 2017, 12:26:14 AM
Hi,
When you change the event with a self made transition it should work.

The System Event  'Application Quit' you need to use if you want to do something when the game is stopped.
For example saving progress when the Application is stopped.

Title: Re: Application Quit
Post by: Dan on July 09, 2017, 12:39:45 AM
Hello,

I changed to a self made transition but the problem is still there. I attached a screenshot from the crash dump. Something about not having appropriate access to a virtual address.
Title: Re: Application Quit
Post by: djaydino on July 09, 2017, 12:41:27 AM
Hi,
Can you show how your States are set up and what Actions are in it.
Title: Re: Application Quit
Post by: Dan on July 09, 2017, 12:46:47 AM
Sure, screenshots attached with states one and two.
Title: Re: Application Quit
Post by: djaydino on July 09, 2017, 12:57:23 AM
Hi,
The ThirdPersonController Prefab, does this come from an asset?
Can you make a backup of your project and then remove the ThirdPersonController gameobject and make a built to test if it crashes then.
Title: Re: Application Quit
Post by: Dan on July 09, 2017, 01:04:27 AM
Sure no problem. I don't have much in the scene yet, just getting started. The ThirdPersonController is from the Standard Assets, Ethan character. I removed the ThirdPersonController from the Hieracrchy, did a new build and the same result.
Title: Re: Application Quit
Post by: djaydino on July 09, 2017, 01:14:18 AM
Hi, I will try to repo the issue
Title: Re: Application Quit
Post by: Dan on July 09, 2017, 01:17:05 AM
Here's the really odd thing. I did the same thing the other day on a different project, using ESC key to exit the game. It is setup the same way, only using system transition. I just ran the scene on that and it works fine. Same version of Unity, the only difference is I'm version control on the project that keeps crashing when I hit ESC. I'm wondering if that is causing a problem.
Title: Re: Application Quit
Post by: djaydino on July 09, 2017, 01:27:11 AM
Hi,
The issue might indeed be caused by the version control,

did you try to make a build on a different location not connect to version control.

i tried here (but without version control) and it works fine (Windows 8.1 Unity 5.5.4f1 Playmaker 1.8.4)
Title: Re: Application Quit
Post by: Dan on July 09, 2017, 01:53:53 AM
Ok, so I created a new project with the same imported assets and had exactly the same problem. The new project did not have version control.

However, with some testing I did find the culprit. Under the Standalone Player Options, the Display Resolution Dialog dropdown must show Disabled. So as long as I don't want to enable that for players then I should be good to go. It would be nice to learn why that happens and get it resolved. Thanks for your help, I greatly appreciate it.
Title: Re: Application Quit
Post by: Dan on July 09, 2017, 01:58:57 AM
I think it may be because if Display Resolution Dialog was enabled, then you hit ESC to exit configuration. Perhaps that is the conflict.
Title: Re: Application Quit
Post by: djaydino on July 09, 2017, 02:39:22 AM
Hi,
I tried both enabled and disabled, it seems to work fine here.

Maybe you can send a copy of your project is i can test here.
if you do, do not include the playmaker folder and Plugins/playmaker.

What version you are using (unity/os/playmaker)?
Title: Re: Application Quit
Post by: Dan on July 09, 2017, 03:03:49 AM
I don't know how to do the export you're asking for. When I click Export Package it just freezes up for half a minute then nothing. I will have to read up on how to do it.

Win 10
playMaker: Unity5.4.PlayMaker.1.8.4.f5 (this is the entire file name)
Unity 5.6.1f1

The playMaker file name shows the Unity version, followed by the playMaker version. It is designed to work with Unity 5.4 but I think it's the latest.
Title: Re: Application Quit
Post by: Dan on July 09, 2017, 03:42:26 AM
So I'm thinking the problem is the Unity version. I created a project in Unity 5.4.5f1 (64-bit), and everything works great. No crashes when hitting escape in the enabled mode, or with re-sizable windows. Looks like the lesson for me here is to only use the Unity version listed on the playMaker file. Unfortunately playMaker is already two versions behind the current one, and 2017.1 is launching soon.
Title: Re: Application Quit
Post by: Dan on July 09, 2017, 04:32:18 AM
I've had all the fun I can handle for one night. I started over with Unity 5.4.5f1, so it matches the playMaker version. I installed one more thing, Asset Hunter 2. Did a build and right away it crashed.
Title: Re: Application Quit
Post by: djaydino on July 09, 2017, 09:52:09 AM
Hi,
Ouch.
I have posted on their forum if the asset is compatible with playmaker.
There might be issues removing needed parts.

I will test on Unity 5.6.1f1 in the next few days.
I'm using mobile data at the moment  to go online  :-\
There are some technical troubles on (a cable broke somewhere or something) my internet connection.
Title: Re: Application Quit
Post by: Dan on July 09, 2017, 01:23:11 PM
Ok, sounds good. All I did was install Asset Hunter 2, and did not remove files. I'm thinking it is probably not related to the crash.

With playMaker, when it has the Unity version in the file, does that mean it will only work with that version? Or does it mean it was only tested with that version?
Title: Re: Application Quit
Post by: djaydino on July 09, 2017, 11:19:15 PM
Hi,
As far as i know Playmaker 1.8.4.f5 should be compatible with U5.6 thats why i will test on it later on when my internet connection is ok again.
Title: Re: Application Quit
Post by: Dan on July 10, 2017, 01:17:41 AM
Oh ok, thanks for doing that. I was mostly trying to understand the naming convention on the files. Wasn't sure if it would be best to only run the version of Unity associated with the latest release of playMaker. Right now it's really not a big deal but I'm getting closer to starting a large project and want to make sure I'm handling updates correctly as we move forward.