Processing does not find device

I have a problem with a LEAP Motion controller not responding. And I dont think it is the controller, because it worked fine the other day - I think it is Processing somehow losing track of ports and devices, somewhat like when an Arduino suddenly appears on a different COM port number after unpugging and replugging.

I am running the examples sketch LM_1_Basics as-is, and it worked fine the other day. No reason to show any code. I am on a WIndows 10 machine.

Presently, the controller is not sending any data and is apparantly simply not being found, even though the LEAP Motion Control Panel shows it working and the Visual Diagnostics show my hand just fine. There is no error messages in the console, just a note on which LEAP Motoin library version I am using. I have tried a little debugging, but there is simply no connection to the sensor through Processing. I have restarted the sketch, Processing, the computer - no luck. The sensor works, and the code is unchanged, so it must be something to do with Processing’s access to the system.

How can I test, from a Processing sketch, which devices are connected to what ports on the PC? Or what else can I do to get things working again?

There are a few posts asking similar questions specifically about the LEAP (e.g. this :, but as I said, I don’t think that is where the issue originates.

update: I just plugged in another LEAP controller. It worked fine in Processing - once. I exited the script, unplugged the LEAP, tried the first which still didn’t connect, and then the new which now also didn’t connect . Fishy…

Best regards
Erik Lund


I always include this in code to check ports:


@glv Thanks - I have tried that now, but I don’t get any USB-connected devices, the list is empty. But I was looking for that kind of command.

But I have discovered something else: That I can get both LEAPs to connect IF and only if I start the sketch before plugging the controller in. I can then unplug and replug them, and each time the sketch will get data and show my hand. If the controller is plugged in when I start the sketch, no connection is made, not even if I unplug and replug - neither controller will register. That goes too if I make a change in the sketch and restart it with the controller plugged in.

So at least now I can start teaching tomorrow and not look like an utter fool to my students. But it seems, to me, a somewhat strange and impractical behaviour. I don’t know if other USB-devices behaves in this way. I wouldn’t exactly call this work-around a “solution”, but since these are my first posts in here, if I should mark the topic as “Closed” or “Solved”, please let me know

I have also noticed, on one occasion while hacking around on this issue, that the Controller suddenly stopped registering, like mentioned in the linked post in the OP. Could be related, I think…

1 Like

Update: I look like an utter fool. Things are working intermittently only - most of my students cannot get a signal through, and when the controller “times out” and stops working, I have to restart the PC and HOPE - and restart again, until the devices miraculously starts talking again. What the F*** is happening here?

I wonder if the first (or any) answers in this thread is related?


You didn’t provide enough information but from what I gather, your LEAP thread ran to completion and closed. This can occur if you declare and initialize your listener and controller variables in a function and the variables go out of scope when the function is executed. This causes Garbage Collector to dispose both controller and listener at what might seemingly appear as random (non reproductable) moments. To fix this issue, create a singleton for the controller and listener - this can boil down to simply defining a static controller and listener variables in some class. This way the listener and controller objects will never go out of scope and get disposed by the GC.

If this is the issue, I don’t know how to fix it though (May need to change the library for that?).

I actually have a Leap Motion laying around but I haven’t really used the thing for years. I’ll give it a go soon to see how and if it works with Processing. I’m on Windows 10 and Linux Mint 19.

I’m not sure if this is helpful. Maybe just to compare driver versions etc I guess. I’ve only tested it briefly, just to see if it works (I only have one Leap Motion though).

In short:

On Windows 10 I could only get the “Basics” example to work.
On Linux Mint 19, all three examples that come with the library worked.

I could stop and start the examples without needing to unplug / plug back in the Leap Motion.

Some more details:

Windows 10 Pro v 2004, 64-bit
Leap Motion driver downloaded:

I only extracted and installed: Leap_Motion_Installer_v4-2020-release-updates_public_win_x64_4.1.0+52211_ah1889.exe from the archive.

And as said, I could only get the “Basics” example to work. I didn’t try it on the Windows machine much, just started and stopped it a couple of times for a few minutes.

(Maybe I’ll see in a day or two if it still works…)

The console output is the same in both OS’es (for the Basics example):

Leap Motion Library v2.3.1.6 - Leap Motion SDK v2.3.1+31549 -
translate(), or this particular variation of it, is not available with this renderer.

On the Linux machine I ran the “Basics” example for about 30 minutes at the longest, without issurs (I read somewhere it stopped after a while? Not sure how long “a while” is though).

1 Like

@raron - thx, your mention of the discrepancy between actual sdk version and the one listed in console output put me on track to something that might turn out to solve the issue - at least, just now things seems to be working as they should. I was running, I think, version 2.3.1 as the console said, and have downloaded and installed version 3.2.1. At the moment all examples are running smoothly (nothing happens on the canvas in example 2, but that is by design - the output in console shows the sketch is working - for me, at least). The issue seems to be about a change in a Windows update a few years back, where “imaging devices” such as LEAP was moved to “Cameras”. Why things apparently worked for me last year anyway I don’t now. Probably pure luck.

Version 4 of the software no longer have APIs for java or other languages, it says, so I went for an earlier version. Finding that version took me a good while - LEAP has merged with Ultrahaptics and the website is new and not that friendly. The URL to that page is here, however, you probably need to register as a developer to get there. I haven’t really tested whether the newest one would work anyway, it didn’t at first try so I just uninstalled it again.

1 Like

@laererlund Nice! The link you found works better on Windows 10 for me too.

The first I tried, (the new version 4.1.0), only the “LM_1_Basics” example worked. Gesture and camera image examples didn’t work. Except in Linux, probably from the older driver. I found the drivers here.

But now all examples work in Windows 10 as well. So far at least. Just FYI.

(I also noticed the new website is very fancy and equally useless, or at least very difficult to navigate).

If you are looking to ue the older V2 software on Windows 10 then you will need to apply this manual hotfix to get it working. As it says on the forum post this compatibility issue arose in the Fall Creators Update when Microsoft made some changes to how they handled imaging devices effectively breaking our software, this hotfix resolves that issue.

Thank you for your feedback on our corporate website, it is designed to look nice :slight_smile:, but we have separate sites for developer content that may be more useful to you. Following on from the merger of Ultrahaptics and Leap Motion there is a lot of information in several different places, however we are in the process of making this up to date and more readily accessible! I would recommend having a look around our Leap Motion Developer site which has a lot of good resources and also links to our online help center, and our developer forum, where you can find answers as well. I hope this helps!

1 Like