Libfreenect2 USB connection failure - libusb

I have been trying to get the libfreenect2 library up and running on my Windows 10 machine and I have run into an issue that I can't get past. I have build the library and it's examples. The issues I have is when I go to run the "Protonect" example code. The output I get is listed below:
$ ./install/bin/Protonect.exe
Version: 0.2.0
Environment variables: LOGFILE=<protonect.log>
Usage: U:\Repositories\libfreenect2\build\install\bin\Protonect.exe [-gpu=<id>] [gl | cl | clkde | cuda | cudakde | cpu] [<device serial>]
[-noviewer] [-norgb | -nodepth] [-help] [-version]
[-frames <number of frames to process>]
To pause and unpause: pkill -USR1 Protonect
[Info] [Freenect2Impl] enumerating devices...
[Info] [Freenect2Impl] 8 usb devices connected
[Info] [Freenect2Impl] found valid Kinect v2 #12:2 with serial 003370163847
[Info] [Freenect2Impl] found 1 devices
Pipeline Not-Used
libusb_open returned: -99
BLAH BLAH BLAH
[Error] [Freenect2Impl] failed to open Kinect v2: #12:2 LIBUSB_ERROR_OTHER Other error
failure opening device!
Please ignore the "BLAH BLAH BLAH" I was using that as print statement debugging. I think I have traced the issue all the way down to this section of the core.c file libusb_open() function in libusb library:
r = usbi_backend->open(_dev_handle);
if (r < 0) {
usbi_dbg("open %d.%d returns %d", dev->bus_number, dev->device_address, r);
libusb_unref_device(dev);
usbi_mutex_destroy(&_dev_handle->lock);
free(_dev_handle);
return r;
}
I couldn't find anything on the error code -99 so that is where my debugging ended. From what I understand it seems that the example code can't open the USB device to the Kinect for some reason.
I have tested the Kinect with Kinect Studio using the windows SDK and that has no problem picking up the Kinect feeds. Has anyone run into this issue before and how did you solve it? Any suggestions for what the error code means or how I might fix the USB opening issue?

The problem ended up solving itself. Through a series of debugging attempts which you can see here:
https://github.com/OpenKinect/libfreenect2/issues/812#issuecomment-288143166
I ended up reinstalling usbdk 1.0.17 and magically everything worked again. Apparently there are some issues with with usbdk 1.0.17 which require it to be reinstalled to fix some of the issues. Idk why, but if anyone comes across this issue in the future, this way my fix.

Related

X_NUCLEO_IHM03A1 in Mbed Studio?

I want to use Mbed Studio for writing program for X_NUCLEO_IHM03A1 with NUCLEO-L476RG board using official library and example for 1 motor. Library as I understood supports only mbed os 2. In the same time Mbed Studio can work only with mbed os 5.
After compiling project my device rebooting with following message:
++ MbedOS Error Info ++
Error Status: 0x80010133 Code: 307 Module: 1 Error Message: Mutex: 0x20000578, Not allowed in ISR context
Location: 0x800E6DD
Error Value: 0x20000578
Current Thread: main Id: 0x20002018 Entry: 0x800B90D StackSize: 0x1000 StackMem: 0x200008E0 SP: 0x20001600
For more info, visit: https://mbed.com/s/error?error=0x80010133&tgt=NUCLEO_L476RG -- MbedOS Error Info -- = System will be rebooted due to a fatal error =
= Reboot count(=1) reached maximum, system will halt after rebooting
So, I thought maybe this are solutions:
1) to rewrite library somehow so it will work with MBED OS 5 (I am not sure what exactly have to be modified)
2) use mbed os 2 in Mbed Studio (not sure if it is possible)
X_NUCLEO_IHM03A1 library - https://os.mbed.com/teams/ST/code/X_NUCLEO_IHM03A1/
How to solve the problem so compiled in Mbed Studio project for X_NUCLEO_IHM03A1 could work?
Commenting the line __disable_irq(); solved the problem
Thank you Nils4526
in my case the function was in the PowerStep01.h file and looked like this:
void Powerstep01_Board_DisableIrq(void)
{
// __disable_irq();
}
I got the same error code that you have but with the expansion board IHM01A1 and the Nucleo board F411RE. I don't know if this will work for your board but I think it is worth a try. The names are different but besides that the code looks similar.
Using the bare metal profile works without any modification but this change works with OS5 as well.
In the file Components/L6474/L6474.h comment out the following line:
void L6474_DisableIrq(void)
{
// __disable_irq();
}
This function is called in the main file when reading or writing with SPI.
I don't know why it works since the Mbed API asks you to disable interrupts before using the SPI write function, but somehow removing this line that disables the interrupt makes it work.

OSX App doesn't start(Buid succeeded)

Problem: I am unable to launch my OSX app.
Software versions:
XCode Version 8.1 (8B62)
macOS Siera 10.12.1 (16B2657)
I've already tried:
I don't have any changes in my version control.
Also it works fine on my colleague's computer
I've already tried to clean, Also used deep clean
I've overloaded my mac twice
I've already removed derived data
But still unable to run OSX app. It just build successfully all the time and isn't going to launch my app.
I googled about it.
https://www.google.com/search?q=xcode+%22build+secceded%22&oq=xcode+%22build+secceded%22&aqs=chrome..69i57.12138j0j7&sourceid=chrome&ie=UTF-8#q=xcode+%22build+succeeded%22+%22App+doesn%27t+run%22
But haven't found something helpful.
Any suggestions? Probably I missed something... but I think it is a system bug. And I have to clean or relaunch something. But I've already tried all what I was able to guess.
Information from console:
/Users/UserName/Library/Developer/Xcode/DerivedData/AppName-awtljghmrbqhgebrvruwulpmysqx/Build/Products/Debug/App Name.app/Contents/MacOS/App Name signature not valid: -67030
proc 1042: load code signature error 4 for file "App Name"
AMFI: allowing exception handler for 'App Name' (2504) because the process is unsigned.
Got a connection, waiting for process information for launching or attaching.
error: Attach failed: "No such process".
error: attach failed.
1 +0.000000 sec [09c9/1503]: error: ::read ( 3, 0x700009325a40, 1024 ) => -1 err = Bad file descriptor (0x00000009)
Exiting.
PS
Any way. thanks for attention.

Xcode 7 - Cannot open document (storyboard file)

I recently updated to Xcode 7 and as usual something has to go wrong. Its really a shame because I was looking forward to the new features in Xcode 7.
I am faced with a an error which I cannot seem to fix. Every time I try and build the project I get the following error:
I thought there was something wrong with my project, so I made a new Single View application and I still get the same error.
I have tried the following things but none of them has worked for me:
Restart Xcode (Didn't work).
Clean and rebuild project (Didn't work).
Restart Mac (Didn't work).
Reinstall Xcode 7 from the Mac App Store (Didn't work).
Installed Xcode 7 on a different Mac (Still got the same issue, even with a new Xcode project).
I tried the solution in this Stack Overflow question: https://stackoverflow.com/a/31614717/1598906 - But alas it did not work.
Finally, I tried the following Terminal command with no avail: $ sudo killall -9 ibtoold
Is anyone else having this issue with Xcode 7.0? And if so, have you managed to come with any other solutions? I have tried everything I can think of and nothing works.
Lastly, below is a copy of the error Log:
2015-09-18 21:09:28.416 ibtoold[1598:39510] [MT] IBPlatformTool: ***
Failed to launch tool with description
System content
1x for IBCocoaTouchFramework-EightAndLater w/ default fidelity: Failed
to find or create execution context for description
System content
1x for IBCocoaTouchFramework-EightAndLater w/ default fidelity: Failed
to find a suitable device for the type SimDeviceType :
com.apple.dt.Xcode.IBSimDeviceType.iPad-1x with runtime SimRuntime :
9.0 (13A340) - com.apple.CoreSimulator.SimRuntime.iOS-9-0 (Failure reason: Failed to create SimDeviceSet at path
/Users/daniel/Library/Developer/Xcode/UserData/IB Support/Simulator
Devices. You'll want to check the logs in ~/Library/Logs/CoreSimulator
to see why creating the SimDeviceSet failed.) 2015-09-18 21:09:38.290
ibtoold[1598:39510] [MT] IBPlatformTool: Wrote failed marshalling
request diagnostics to path:
/var/folders/lx/kkhv57fd2ll7rhdt0bwfpkb00000gn/T/IB-agent-diagnostics_2015-09-18_21-09-28_418000
/* com.apple.ibtool.errors */ /Users/daniel/Desktop/DS
APPS/BT/BloodyTest/BloodyTest/Base.lproj/LaunchScreen.storyboard:
error: Could not open document
Recovery Suggestion: Failed to connect with the iOS agent. Please file a bug report at bugreport.apple.com and attach a zip file of the
diagnostics located at
"/var/folders/lx/kkhv57fd2ll7rhdt0bwfpkb00000gn/T/IB-agent-diagnostics_2015-09-18_21-09-28_418000".
Underlying Errors:
Description: Failed to find or create execution context for description
System content 1x for IBCocoaTouchFramework-EightAndLater w/ default
fidelity
Underlying Errors:
Description: Failed to find a suitable device for the type SimDeviceType : com.apple.dt.Xcode.IBSimDeviceType.iPad-1x with
runtime SimRuntime : 9.0 (13A340) -
com.apple.CoreSimulator.SimRuntime.iOS-9-0
Failure Reason: Failed to create SimDeviceSet at path /Users/daniel/Library/Developer/Xcode/UserData/IB Support/Simulator
Devices. You'll want to check the logs in ~/Library/Logs/CoreSimulator
to see why creating the SimDeviceSet failed.
Thanks for your time, Dan.
Well thanks to the community for all there help..... not.
In the end I got it working by simply upgrading to OS X El Capitan and Xcode 7.0.1.
One thing I would point out though, is that when I was looking through the Xcode app files, some of them were corrupted and when I updated to Xcode 7.0.1 this issue was not fixed. So before installing OS X El Capitan, I deleted the following:
Xcode 7.0.1 app
Library/Developer folder
Macintosh HD/Library/Developer folder
I then installed OS X El Capitan and then installed Xcode 7.0.1 and now everything works fine.
I hope this helps anyone else who is experiencing the same issue.

Flash Builder - Platform conversion failed error during release build

This is a very annoying problem while generating release build files. Here is the steps I did while building:
Select Project > Export Release Build
Select Signed Native Installer
Import certificate
Click Next.
I always got the following error:
https://forums.adobe.com/servlet/JiveServlet/showImage/2-6524012-651585/build_error.png
Platform conversion failed. Process exited with error 5. Output was
"[ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2
text="Unhandled exception Error: EndUpdateResource: Windows Error #5"
errorID=0]
I have the following setup:
OS: Windows 8.1
System type: 64-bit
Flash Builder Version: 4.6 Premium
Installed FB: FlashBuilder_4_6_LS10.exe
Please help. This is giving me a lot of headaches for a couple of days now.
Additionally, here's the stack trace:
java.io.IOException: Platform conversion failed. Process exited with
error 5. Output was "[ErrorEvent type="error" bubbles=false
cancelable=false eventPhase=2 text="Unhandled exception Error:
EndUpdateResource: Windows Error #5" errorID=0] " at
com.adobe.air.nai.NativePackager.conversionFail(NativePackager.java:222)
at
com.adobe.air.nai.NativePackager.invokePlatformConversion(NativePackager.java:203)
at
com.adobe.air.nai.NativePackager.createPackage(NativePackager.java:92)
at
com.adobe.flexbuilder.multisdk.apollo.export.AIRNativeInstallerPackager.create(AIRNativeI
nstallerPackager.java:129) at
com.adobe.flexbuilder.exportimport.releaseversion.ExportReleaseVersionManager.doExport(Ex
portReleaseVersionManager.java:586) at
com.adobe.flexbuilder.exportimport.releaseversion.ui.ExportReleaseVersionWizard$1.run(Exp
ortReleaseVersionWizard.java:208)
I also suspect this is because of the following settings:
Eclipse.ini
https://forums.adobe.com/servlet/JiveServlet/showImage/2-6525217-651726/eclipse.png
...
-startup plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher_library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502.jar
...
Notice that the plugin used is not intended for x64 processors.
#ActionScript3030 is correct, for anyone finding this later on, if you re-link your Library Paths (even if they look correct) this should rectify your issue.
The issue is caused by the links not being able to resolve to their GUID counterparts in your AppData/Local folder. This happens quite commonly when you create a new user profile and try to copy over your old user profiles information.
I already figured this out. I created a virtual machine with windows 7 32bit operating system and I'm happy now :)
If you initially created your project on a different system then try to compile it in another system, the class source and swc paths may not match. These paths could be there but not being implemented in code, so you will not get any run time errors while debugging, but it will give you the error 5 during compilation.
Solution:
Remove the idle paths not directly in use in your code. You can identify them by simply checking the path.
Found the same issue when trying to use Microsoft Essential Security on my Windows 7 x32. When i uinstall it - problem gone. So try to check your firewall settings if stucking the same problem.
Just to add an alternative solution (I'm on an x64 Windows and want to keep build exported for x64), in my case the error popped up when building the project with the AIR SDK defined in the app.xml (an older one, 3.9) and went away when I explicitly used a newer SDK (19).
(Disclaimer: I used the command line adt tool from the SDK to build, not Flash Builder).
A little late, but might possibly help someone.
I had the same error recently with FlashDevelop. Figured out that the my path was too long. When I renamed some long folder and file names, the error disappeared.
Try to disable UAC on Windows 8. Change it to "Never notify". The problem

Titanium build error

Just trying to run a test app created in titanium and getting following errors:
/usr/lib/node_modules/titanium/node_modules/longjohn/dist/longjohn.js:185
throw e;
^
TypeError: Cannot read property '0' of undefined
at exports.validate (/home/inscripts/.titanium/mobilesdk/linux/3.1.3.GA/android/cli/commands/_build.js:296:70)
at exports.validatePlatformOptions (/home/inscripts/.titanium/mobilesdk/linux/3.1.3.GA/node_modules/titanium-sdk/lib/titanium.js:443:51)
at exports.validate (/home/inscripts/.titanium/mobilesdk/linux/3.1.3.GA/cli/commands/build.js:112:9)
at callCommandValidate (/usr/lib/node_modules/titanium/lib/cli.js:846:19)
at /usr/lib/node_modules/titanium/node_modules/async/lib/async.js:551:21
at /usr/lib/node_modules/titanium/node_modules/async/lib/async.js:227:13
at iterate (/usr/lib/node_modules/titanium/node_modules/async/lib/async.js:134:13)
at /usr/lib/node_modules/titanium/node_modules/async/lib/async.js:145:25
at /usr/lib/node_modules/titanium/node_modules/async/lib/async.js:229:17
at /usr/lib/node_modules/titanium/node_modules/async/lib/async.js:556:34
---------------------------------------------
at exports.execFile (child_process.js:701:9)
at exports.exec (child_process.js:588:18)
at async.series.cached (/home/inscripts/.titanium/mobilesdk/linux/3.1.3.GA/node_modules/node-appc/lib/android.js:86:4)
at /home/inscripts/.titanium/mobilesdk/linux/3.1.3.GA/node_modules/async/lib/async.js:486:21
at /home/inscripts/.titanium/mobilesdk/linux/3.1.3.GA/node_modules/async/lib/async.js:185:13
at iterate (/home/inscripts/.titanium/mobilesdk/linux/3.1.3.GA/node_modules/async/lib/async.js:108:13)
at /home/inscripts/.titanium/mobilesdk/linux/3.1.3.GA/node_modules/async/lib/async.js:119:25
at /home/inscripts/.titanium/mobilesdk/linux/3.1.3.GA/node_modules/async/lib/async.js:187:17
[ERROR] Application Installer abnormal process termination. Process exit value was 8
Need some help.
You are using Titanium SDK 3.1.3.GA which does not support Android SDK Tools 22.6, nor does it support 64-bit Java. You should update Titanium SDK to newest version.
I was facing the same problem.
and i tried following solution and that did work.
try to update Node.js to the latest version and that should work.
older version of Node.js was generating this error on my machine. when i updated it to a newer version it worked for me.
for reference you can refer following link
https://developer.appcelerator.com/question/150324/error-in-longjohnjs-when-creating-titanium-project
have look into this, may it'll help you.