Game (unity3d) with phidgets hangs on close

Supporting Visual Studio on Windows
Post Reply
seriousmedia

Re: Game (unity3d) with phidgets hangs on close

Post by seriousmedia »

If i don't register any event-handlers it still hangs.
The phidget interfaceKit object is a owned by a MonoBehaviour object in Unity (scripting in unity3d is handled in Mono).
janoonk

Re: Game (unity3d) with phidgets hangs on close

Post by janoonk »

We got the exact same problem. Unity hangs if you want to quit it.
Fortunately you can run your project multiple times without hanging/restarting.
dengfengsoft
Phidgetly
Posts: 23
Joined: Thu Feb 10, 2011 8:33 pm
Contact:

Re: Game (unity3d) with phidgets hangs on close

Post by dengfengsoft »

How about killing the process like the following method in C#:
void KillMe()
{
string proc=Process.GetCurrentProcess().ProcessName;
Process[] processes=Process.GetProcessesByName(proc);
for(int i=0;i<processes.Length;i++)
{
processes.Kill();
}
}
noisecrime
Fresh meat
Posts: 1
Joined: Mon May 21, 2012 12:15 pm
Contact:

Re: Game (unity3d) with phidgets hangs on close

Post by noisecrime »

Just got my phidgets Interfacekit 8/8/8 to work with sonar sensors in Unity and find I have exactly the same problem.

Everything works flawlessly with the hardware and Unity, except that once you have simply 'opened' a connection to the interface any subsequent attempt to quit Unity or built applications will cause them to hang indefinitely.

What will it take to get this resolved?

Very disappointed that an almost 2 year old thread about this bug has never been addressed with a solution.

I'm very fearful that phidgets will blame Unity and Unity will blame Phidgets with the end result that nothing will ever be resolved and thus making phidgets useless for use with Unity.

I'm more than willing to help in trying to debug this, but with the phidgets .NET dll being closed source and Unity likewise it will be very difficult to get debug information.

I did activate phidgets verbose logging, but it doesn't show any particular problems.

Please help.
User avatar
Patrick
Lead Developer
Posts: 3399
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Game (unity3d) with phidgets hangs on close

Post by Patrick »

Hi,

This bug has been fixed, as of today's release (2.1.8.20120606).

-Patrick
Serellyn
Fresh meat
Posts: 1
Joined: Sun Jun 16, 2013 6:41 am
Contact:

Re: Game (unity3d) with phidgets hangs on close

Post by Serellyn »

Not to burst anyone's bubble, but I'm having this problem yet again.
I'm working with the 1023 RFID Reader from Phidgets. When I try to exit the Unity3D IDE it hangs. Nothing else to do but kill the process.

My Phidgets21.NET.dll is on version 2.1.8.148
I could really use some help on fixing this problem.
fireant911
Fresh meat
Posts: 4
Joined: Wed Aug 28, 2013 10:34 am
Contact:

Re: Game (unity3d) with phidgets hangs on close

Post by fireant911 »

There is quite a bit of interest in using Phidgets and Unity together. After some great help from an expert (http://unity3dtrenches.blogspot.com/), I was finally able to get Phidgets and Unity to 'play' together; however, this issue that was reported is still very much in existence. Could someone at Phidgets look into this for a workable solution for this issue? Correcting this hanging problem can only benefit the sales of Phidgets devices.
Sincerely,
Daryl G
Lunan
Fresh meat
Posts: 1
Joined: Wed Nov 08, 2017 9:01 am
Contact:

Re: Game (unity3d) with phidgets hangs on close

Post by Lunan »

I just wanted to say that I still have this issue. I have done multiple tests, and all it takes for the problem to appear is to successfully connect to a phidget and then attempting to close that connection (whether with close() or by disposing of the object doesn't matter). I am using Phidget22, needing to activate the experimental .net in Unity (but I have no other problems).
The process simply hangs after every run, making it impossible to keep working after stopping it, and needing to have the unity process closed Ctr+Alt+Del style. It doesn't completely freeze up immidiately, but it is clearly running some infinite loop that eventually takes up all resources.
The partial solution offered here will likely work fine (haven't tried, because for reasons that have nothing to do with this it won't help me), but it can't be used in-editor (without killing the editor) and it can't be used mid-program, so please fix this.
dmelamed
Fresh meat
Posts: 1
Joined: Thu Aug 16, 2018 8:45 pm
Contact:

Re: Game (unity3d) with phidgets hangs on close

Post by dmelamed »

Hi there, in case anyone wonders; this issue is still present with all the latest hardware/software stack as of the date of this post (OSX, Mac Book Pro, latest Phidgets hardware/firmware). I can't find a way to terminate the application. It simply hangs. I'll try to switch to Windows to see if the issue will be resolved.
thylaxene
Phidgetsian
Posts: 13
Joined: Tue Sep 22, 2015 7:37 pm
Contact:

Re: Game (unity3d) with phidgets hangs on close

Post by thylaxene »

Has anyone got a work around for this problem? As I'm seeing it in Unity 2018.3 on macOS. Building a kiosk app that will be running constantly so might no be an issue but be nice to get some input from Phidgets?

Also looking at polling a node.js server in Unity and having javascript to the heavy lifting via the Phidget Server. Not ideal. But better then having the Editor hang every time I compile a script!

Cheers.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests