GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Once you've used a gesture, Application.Quit() crashes unity. · Issue #200 · TouchScript/TouchScript

Once you've used a gesture, Application.Quit() crashes unity. #200

New issue
Copy link
New issue
Copy link
Closed
Closed
Once you've used a gesture, Application.Quit() crashes unity.#200
Copy link

Description

@oafkad
oafkad
opened on Jan 7, 2016
Issue body actions

Even if I create a simple scene that just has a single sprite object.

I create the sprite.
Add Transform Gesture.
Transformer Gesture.
Release Gesture.

On Release I tell it to run Application.Quit(). Crash to desktop.

This doesn't appear to be the case when I build to my Windows 10 machine. But on my touch table it's happening every time. Across all projects. If you close out before any TS gesture is sent everything closes gracefully.

Any ideas?

output_log.txt
2016-01-07_212300.zip

Also: Here is the >entire< body of scripts in the scene:

using UnityEngine;
using System.Collections;
using TouchScript.Gestures;

public class DestroyMe : MonoBehaviour {

    void OnEnable()
    {
        if (GetComponent<ReleaseGesture>())
        {
            GetComponent<ReleaseGesture>().Released += DestroyMe_Released;
        }
    }

    void OnDisable()
    {
        if (GetComponent<ReleaseGesture>())
        {
            GetComponent<ReleaseGesture>().Released -= DestroyMe_Released;
        }
    }

    private void DestroyMe_Released(object sender, System.EventArgs e)
    {
        Application.Quit();
    }
}

That's it. You can switch the gesture to any other gesture and the outcome should be the same :).

Activity

Next
  1. oafkad commented on Jan 7, 2016

    @oafkad
    oafkad
    on Jan 7, 2016
    Author
    More actions

    Additional observation. If you release both fingers (from resizing via transformer) simultaneously, there will be no crash. If you release one, then the other, there will be a crash.

  2. valyard commented on Jan 9, 2016

    @valyard
    valyard
    on Jan 9, 2016
    Contributor
    More actions

    What OS does the touch table use?
    The log says

    [TouchScript] Initialized Windows 7 touch input.

  3. valyard
    added a commit that references this issue on Jan 9, 2016

    Merged Windows touch crash fix from 0cc4f07 (issue #200).

    8f78dd4
  4. valyard commented on Jan 9, 2016

    @valyard
    valyard
    on Jan 9, 2016
    Contributor
    More actions

    It seems that I forgot to merge a fix for this to 7.0 branch.
    Can you try your project with the latest https://github.com/TouchScript/TouchScript/tree/develop branch?

  5. oafkad commented on Jan 9, 2016

    @oafkad
    oafkad
    on Jan 9, 2016
    Author
    More actions

    Alright. I won't be near the table until Monday but I'll give that a shot. It's windows 7 embedded for what it's worth.

  6. oafkad commented on Jan 12, 2016

    @oafkad
    oafkad
    on Jan 12, 2016
    Author
    More actions

    Update on this issue.
    5.3.0 crashes still.
    BUT
    5.3.1p1 does not!

    So for my purposes the problem is fixed. As it works with the latest unity (on Windows 7 and 10).

  7. valyard commented on Jan 18, 2016

    @valyard
    valyard
    on Jan 18, 2016
    Contributor
    More actions

    For me 5.3.1x crashes if I build a 32bit app. Are you building a 32bit app? 64bit don't crash on 5.2.2 nor on 5.3.1x.

  8. oafkad commented on Jan 19, 2016

    @oafkad
    oafkad
    on Jan 19, 2016
    Author
    More actions

    Yeah building in 32, which I didn't actually notice until you mentioned it. Unfortunately I can't really downgrade at work to test it in 64 bit. But regardless, with the latest unity (the p build) it doesn't crash in 32 either.

  9. valyard commented on Jan 19, 2016

    @valyard
    valyard
    on Jan 19, 2016
    Contributor
    More actions

    Hm. It does crash for me in 32bit.

  10. oafkad commented on Jan 19, 2016

    @oafkad
    oafkad
    on Jan 19, 2016
    Author
    More actions

    Very peculiar. Yeah, I've double checked. My output is x86 (not the x86_64). So unless the engine is overwriting it somewhere else during build that I'm unaware it should be 32 bit.

  11. madhuatlink commented on Jan 20, 2016

    @madhuatlink
    madhuatlink
    on Jan 20, 2016
    More actions

    We had a similar issue after upgrading to Unity 5. Application.Quit() crashed on the Touch screen. I don't think it has anything to do with Touchscript.

    http://stackoverflow.com/questions/34068406/unity-5-2-1-build-crash-on-application-quit-with-windows-touch

  12. oafkad commented on Jan 20, 2016

    @oafkad
    oafkad
    on Jan 20, 2016
    Author
    More actions

    @madhuatlink Upon removing TS from all 5 of our projects the crash stopped happening. It's entirely possible that it wasn't TS but:

    A) Removing it fixed the crash.
    B) The changes made above stopped it even with TS for us.

    Again though, I'm open to it being entirely coincidence. Correlation != Causation, but it's a fairly consistent outcome in my neck of the woods at least. That isn't to say folks shouldn't look elsewhere though.

  13. valyard commented on Jan 20, 2016

    @valyard
    valyard
    on Jan 20, 2016
    Contributor
    More actions

    I have an empty project with nothing but TouchScript crashing on me.
    But I'm fairly certain that it's not TouchScript q: I blame Windows!

  14. oafkad commented on Jan 20, 2016

    @oafkad
    oafkad
    on Jan 20, 2016
    Author
    More actions

    @valyard What OS are you running on? Because since I got your changes I can't replicate my crashes anymore at work or at home.

    I'm using the latest 10 in both places (well more updated at home because work requires an IT for updates).

    I even updated my package at home with your latest on the front page (that has the 199 and 200 changes) and still my personal project is completely rock solid up from crashing almost 100% of the time on editor close.

    Oh weird...asterisks make it italic. Gonna remove those, feels a bit too energetic.

  15. valyard commented on Mar 5, 2016

    @valyard
    valyard
    on Mar 5, 2016
    Contributor
    More actions

    I'm investigating this and figured out that there are two types of crashes:

    1. App has stopped working dialog.
    2. Crash folder appears near the exe file.

    (2) is less intrusive and lets the app to be restarted, (1) shows crash in the face.
    What crash types are you guys getting?

  16. 11 remaining items

  17. valyard commented on Jul 28, 2016

    @valyard
    valyard
    on Jul 28, 2016
    Contributor
    More actions

    @jonkeee can you try this build?
    https://www.dropbox.com/s/z79svc15916en9e/touchscript.windows.zip?dl=0

  18. jonkeee commented on Jul 28, 2016

    @jonkeee
    jonkeee
    on Jul 28, 2016
    More actions

    Thx for the reply!
    Now the APP is not crashing anymore after shutdown.
    But now the Touchscript is not working in Player. (32bit and 64bit)
    No Interaction and no TouchVisuals visible.
    But Touch is working in Editor..

    see ouput.log
    DllNotFoundException: D:/01-Projekte/New Unity Project/build/test3_Data/Plugins/WindowsTouch.dll
    at (wrapper managed-to-native) TouchScript.InputSources.InputHandlers.WindowsTouchHandler:SetScreenParams (int,int,single,single,single,single)
    at TouchScript.InputSources.InputHandlers.WindowsTouchHandler.initScaling () [0x00000] in :0
    at TouchScript.InputSources.InputHandlers.WindowsTouchHandler..ctor (TouchScript.Tags tags, System.Func4 beginTouch, System.Action2 moveTouch, System.Action1 endTouch, System.Action1 cancelTouch) [0x00000] in :0
    at TouchScript.InputSources.InputHandlers.Windows7TouchHandler..ctor (TouchScript.Tags tags, System.Func4 beginTouch, System.Action2 moveTouch, System.Action1 endTouch, System.Action1 cancelTouch) [0x00000] in :0
    at TouchScript.InputSources.StandardInput.enableWindows7Touch () [0x00000] in :0
    at TouchScript.InputSources.StandardInput.OnEnable () [0x00000] in :0

  19. valyard commented on Jul 28, 2016

    @valyard
    valyard
    on Jul 28, 2016
    Contributor
    More actions

    @jonkeee: I don't know why WindowsTouch.dll is not being copied. Can you see if you have it in the project and copy it to build/test3_Data/Plugins/?

  20. jonkeee commented on Jul 28, 2016

    @jonkeee
    jonkeee
    on Jul 28, 2016
    More actions

    The Dll exists under this folder.
    I tried to copy it to the Folder Managed/ but still same error?!

  21. valyard commented on Aug 6, 2016

    @valyard
    valyard
    on Aug 6, 2016
    Contributor
    More actions

    I just built your test project with the test TouchScript package in Win10 working under Parallels on OSX. The dll is being copied fine. Can you provide more details?
    2016-08-06_07-15-22

  22. jonkeee commented on Aug 9, 2016

    @jonkeee
    jonkeee
    on Aug 9, 2016
    More actions

    The Dll is copied fine in WIN7 to. Also touch is working. But if i Close the Application, i get the error. "Player is not working anymore"
    Can you send the testbuild?

  23. valyard commented on Aug 9, 2016

    @valyard
    valyard
    on Aug 9, 2016
    Contributor
    More actions

    Seems to be Windows 7 issue.
    Report from other users:

    The touchscreen does not work for me with Windows 7 Unity 5.4 (latest release) and an IIyama T2735MSC screen. Your previous versions worked just fine. The boxes won't move or receive any touch. The old version sometimes crashes, and sometimes not. Haven't really figured out a correlation yet.

    Although nmax from the forum (http://touchprefab.com/viewtopic.php?f=1&t=24473) reports that it works fine on Windows 7 with 5.3.4.

    This is damn inconsistent and I don't have any touch device on win7... Need a dev with Win7 and a touch screen capable of debugging stuff.

  24. jonkeee commented on Aug 9, 2016

    @jonkeee
    jonkeee
    on Aug 9, 2016
    More actions

    With this testproject I get no Touches in Player.
    Also no crash at App Quit.

    WIN7
    Unity 5.3.4
    No Touchdevice connected

    Still this error in log:
    Fallback handler could not load library C:/Users/Tim/Downloads/p/build/test_Data/Mono/libC:/Users/Tim/Downloads/p/build/test_Data/Plugins/WindowsTouch.dll
    DllNotFoundException: C:/Users/Tim/Downloads/p/build/test_Data/Plugins/WindowsTouch.dll
    at (wrapper managed-to-native) TouchScript.InputSources.InputHandlers.WindowsTouchHandler:SetScreenParams (int,int,single,single,single,single)
    at TouchScript.InputSources.InputHandlers.WindowsTouchHandler.initScaling () [0x00000] in :0
    at TouchScript.InputSources.InputHandlers.WindowsTouchHandler..ctor (TouchScript.Tags tags, System.Func4 beginTouch, System.Action2 moveTouch, System.Action1 endTouch, System.Action1 cancelTouch) [0x00000] in :0
    at TouchScript.InputSources.InputHandlers.Windows7TouchHandler..ctor (TouchScript.Tags tags, System.Func4 beginTouch, System.Action2 moveTouch, System.Action1 endTouch, System.Action1 cancelTouch) [0x00000] in :0
    at TouchScript.InputSources.StandardInput.enableWindows7Touch () [0x00000] in :0
    at TouchScript.InputSources.StandardInput.OnEnable () [0x00000] in :0

  25. jonkeee commented on Aug 16, 2016

    @jonkeee
    jonkeee
    on Aug 16, 2016
    More actions

    Even with new version 8.2 the app crashes after quit.
    Is it needed to connect a multitouch device?
    Do i have to switch to WIN10 to fix the problem?

  26. valyard commented on Aug 18, 2016

    @valyard
    valyard
    on Aug 18, 2016
    Contributor
    More actions

    8.2 doesn't include this change since it's not working for everyone...

  27. jonkeee commented on Aug 18, 2016

    @jonkeee
    jonkeee
    on Aug 18, 2016
    More actions

    Ok so I tried it on 3 different Machines.
    2x PCs WIN7 5.3.4 & 5.4 and 1PC WIN10 5.3.4 & 5.4
    Game works as expected but crashes after Quit with an Access Violation Error on all machines ... also the example Projects. Don't know what's wrong with my machines :-(

    For this Project I have to skip Touchscript unfortunatly. Hopefully it works for my next Project.

  28. Wim-Alligence commented on Nov 9, 2016

    @Wim-Alligence
    Wim-Alligence
    on Nov 9, 2016
    More actions

    When I disable "Standard Input" I don't have the exit error... (using TUIO input)

  29. valyard commented on Nov 10, 2016

    @valyard
    valyard
    on Nov 10, 2016
    Contributor
    More actions

    You don't need StandardInput if you only use TUIO.
    But disabling StandardInput indeed should properly unsubscribe from Windows Touch handling hooks.
    I merged native handling for Windows Touch in develop recently. In my tests I don't see ay crashes: https://github.com/TouchScript/TouchScript/releases/tag/9.0alpha1

  30. valyard commented on Dec 8, 2016

    @valyard
    valyard
    on Dec 8, 2016
    Contributor
    More actions

    I was pointed out that the resulting DLLs depended on VC++ redistributable.
    I resolved this dependency and published a new build: https://github.com/TouchScript/TouchScript/releases/tag/9.0alpha2
    I would really appreciate if you guys tried running it.

  31. valyard
    closed this as completedon Jan 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.