Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Freeze in k4a_device_stop_cameras #95

Open
derivativerobmc opened this issue Nov 13, 2024 · 4 comments
Open

Freeze in k4a_device_stop_cameras #95

derivativerobmc opened this issue Nov 13, 2024 · 4 comments

Comments

@derivativerobmc
Copy link

derivativerobmc commented Nov 13, 2024

We have a user using TouchDesigner with a Femto Bolt camera and the k4a wrapper. They are having problems where the first time they open the program it will freeze, but if they open the program again it works correctly. This issue started happening suddenly on a machine that had previously been working.

The user submitted a memory dump during the freeze and all we can tell is that it is stuck inside the wrapper version of k4a_device_stop_cameras

They also gave us the console messages before it freezes:

[11/12 20:24:51.118106][info][12988][Pipeline.cpp:411] Try to stop pipeline!
[11/12 20:24:51.118247][info][12988][Pipeline.cpp:383] Try to stop streams!
[11/12 20:25:03.137591][warning][8108][ObException.cpp:5] Resource busy! You can try again later!
[11/12 20:25:03.140114][warning][8108][FemtoBoltUvcDevice.cpp:388] Execute failure! A libobsensor_exception has occurred!
         - where:388#libobsensor::FemtoBoltUvcDevice::initDepthProcessParam::<lambda_2ead263c27ab7fe23cbf81761e0b47a0>::operator ()
         - msg:Resource busy! You can try again later!
         - type:class libobsensor::wrong_api_call_sequence_exception
[11/12 20:25:03.140262][warning][8108][FemtoBoltUvcDevice.cpp:388] Get temperature failed.

The rest of the startup sequence is the same between the times when it works versus the times it freezes.

We are currently using SDK version 1.10.8, wrapper version 1.10.1 and the camera has firmware 1.0.9 Unfortunately we can't update the SDK at the moment because the newest version has dependencies that conflict with other modules that we are using.

We haven't been able to reproduce this issue in a development environment, so we are relying on an user to provide information right now.

Does this sound like anything you guys are aware of? Any ideas for how we could fix this or debug it further?

@zzuliys
Copy link
Collaborator

zzuliys commented Nov 15, 2024

We have a user using TouchDesigner with a Femto Bolt camera and the k4a wrapper. They are having problems where the first time they open the program it will freeze, but if they open the program again it works correctly. This issue started happening suddenly on a machine that had previously been working.

The user submitted a memory dump during the freeze and all we can tell is that it is stuck inside the wrapper version of k4a_device_stop_cameras

They also gave us the console messages before it freezes:

[11/12 20:24:51.118106][info][12988][Pipeline.cpp:411] Try to stop pipeline!
[11/12 20:24:51.118247][info][12988][Pipeline.cpp:383] Try to stop streams!
[11/12 20:25:03.137591][warning][8108][ObException.cpp:5] Resource busy! You can try again later!
[11/12 20:25:03.140114][warning][8108][FemtoBoltUvcDevice.cpp:388] Execute failure! A libobsensor_exception has occurred!
         - where:388#libobsensor::FemtoBoltUvcDevice::initDepthProcessParam::<lambda_2ead263c27ab7fe23cbf81761e0b47a0>::operator ()
         - msg:Resource busy! You can try again later!
         - type:class libobsensor::wrong_api_call_sequence_exception
[11/12 20:25:03.140262][warning][8108][FemtoBoltUvcDevice.cpp:388] Get temperature failed.

The rest of the startup sequence is the same between the times when it works versus the times it freezes.

We are currently using SDK version 1.10.8, wrapper version 1.10.1 and the camera has firmware 1.0.9 Unfortunately we can't update the SDK at the moment because the newest version has dependencies that conflict with other modules that we are using.

We haven't been able to reproduce this issue in a development environment, so we are relying on an user to provide information right now.

Does this sound like anything you guys are aware of? Any ideas for how we could fix this or debug it further?

At the first time, is it the user who voluntarily stops the camera causing the error, or is it the program that automatically stops the camera causing the error.

@derivativerobmc
Copy link
Author

From what I have been told, the user is not doing anything differently between the times when it works and the times when it fails. They are opening the same TouchDesigner project that is trying to connect to the Femto Bolt via the k4a wrapper library.

I don't know what is triggering the attempted shutdown of the camera yet: whether it is in the k4a wrapper or something higher up in TouchDesigner. This is the full log from start up if that helps.

[11/12 20:24:48.255018][info][12996][Context.cpp:68] Context created with config: default config!
[11/12 20:24:48.255207][info][12996][Context.cpp:73] Work directory=C:\Users\chrig\Documents\MfK\TD\Bubbles, SDK version=v1.10.8-20240604-d1671a341
[11/12 20:24:48.255285][info][12996][MfPal.cpp:103] createObPal: create WinPal!
[11/12 20:24:48.306779][info][12996][DeviceManager.cpp:15] Current found device(s): (1)
[11/12 20:24:48.306842][info][12996][DeviceManager.cpp:24]      - Name: Femto Bolt, PID: 0x066b, SN/ID: CL8R24100AB, Connection: USB3.1
[11/12 20:24:48.310268][info][12996][Context.cpp:84] Context destroyed
[11/12 20:24:48.310846][info][12996][Context.cpp:68] Context created with config: default config!
[11/12 20:24:48.310889][info][12996][Context.cpp:73] Work directory=C:\Users\chrig\Documents\MfK\TD\Bubbles, SDK version=v1.10.8-20240604-d1671a341
[11/12 20:24:48.310936][info][12996][MfPal.cpp:103] createObPal: create WinPal!
[11/12 20:24:48.328519][info][12996][DeviceManager.cpp:15] Current found device(s): (1)
[11/12 20:24:48.328582][info][12996][DeviceManager.cpp:24]      - Name: Femto Bolt, PID: 0x066b, SN/ID: CL8R24100AB, Connection: USB3.1
[11/12 20:24:48.331689][info][12996][Context.cpp:84] Context destroyed
[11/12 20:24:48.332117][info][12996][Context.cpp:68] Context created with config: default config!
[11/12 20:24:48.332161][info][12996][Context.cpp:73] Work directory=C:\Users\chrig\Documents\MfK\TD\Bubbles, SDK version=v1.10.8-20240604-d1671a341
[11/12 20:24:48.332221][info][12996][MfPal.cpp:103] createObPal: create WinPal!
[11/12 20:24:48.349680][info][12996][DeviceManager.cpp:15] Current found device(s): (1)
[11/12 20:24:48.349738][info][12996][DeviceManager.cpp:24]      - Name: Femto Bolt, PID: 0x066b, SN/ID: CL8R24100AB, Connection: USB3.1
[11/12 20:24:48.350007][info][12996][FemtoBoltUvcDevice.cpp:23] FemtoBoltUvcDevice init ...
[11/12 20:24:48.350295][info][12996][FemtoBoltUvcDevice.cpp:121] Create command start!
[11/12 20:24:48.350345][info][12996][MfPal.cpp:290] Create MSDEConverterDevice uvc device.
[11/12 20:24:48.365222][info][12996][MSDEConverterDevice.cpp:726] Succeed to load depth engine plugin
[11/12 20:24:49.133780][info][12996][AbstractDevice.cpp:117]    - Firmware version: 1.0.9
[11/12 20:24:49.133875][info][12996][FemtoBoltUvcDevice.cpp:280] Create command done!
[11/12 20:24:49.133916][info][12996][FemtoBoltUvcDevice.cpp:401] init sensor map start!
[11/12 20:24:49.133990][info][12996][FemtoBoltUvcDevice.cpp:428] init sensor map done!
[11/12 20:24:49.135133][info][12996][FemtoBoltUvcDevice.cpp:284] Init depth process param start!
[11/12 20:24:49.487514][info][12996][MSDEConverterDevice.cpp:777] got nvram data succeed.
[11/12 20:24:50.133278][info][12996][FemtoBoltUvcDevice.cpp:358] setNvramDataStreamStopFunc succeed
[11/12 20:24:50.133841][info][12996][FemtoBoltUvcDevice.cpp:397] Init depth process param done!
[11/12 20:24:50.136005][info][12996][FemtoBoltUvcDevice.cpp:38] FemtoBoltUvcDevice init done!
[11/12 20:24:50.136103][info][12996][DeviceManager.cpp:150] Device created successfully! Name: Femto Bolt, PID: 0x066b, SN/ID: CL8R24100AB
[11/12 20:24:50.137526][info][12996][Pipeline.cpp:47] Pipeline created with device: {name: Femto Bolt, sn: CL8R24100AB}, @0x1C5B6BB6410
[11/12 20:24:50.144012][info][12996][Pipeline.cpp:707] config is nullptr,return default calibration param!
[11/12 20:24:50.493355][info][12988][FemtoBoltUvcDevice.cpp:528] Depth sensor has been created!
[11/12 20:24:50.494026][info][12988][VideoSensor.cpp:384] Query stream profile! size= 14, SensorType=OB_SENSOR_DEPTH
[11/12 20:24:50.494617][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 640, height: 576, fps: 15}
[11/12 20:24:50.495736][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 1024, height: 1024, fps: 15}
[11/12 20:24:50.496785][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 1024, height: 1024, fps: 5}
[11/12 20:24:50.497854][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 640, height: 576, fps: 30}
[11/12 20:24:50.498904][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 320, height: 288, fps: 30}
[11/12 20:24:50.500046][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 640, height: 576, fps: 25}
[11/12 20:24:50.501571][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 320, height: 288, fps: 25}
[11/12 20:24:50.502656][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 320, height: 288, fps: 15}
[11/12 20:24:50.503757][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 640, height: 576, fps: 5}
[11/12 20:24:50.504570][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 320, height: 288, fps: 5}
[11/12 20:24:50.506388][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 512, height: 512, fps: 30}
[11/12 20:24:50.507290][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 512, height: 512, fps: 25}
[11/12 20:24:50.508230][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 512, height: 512, fps: 15}
[11/12 20:24:50.509098][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 512, height: 512, fps: 5}
[11/12 20:24:50.510192][info][12988][FemtoBoltUvcDevice.cpp:617] Ir sensor has been created!
[11/12 20:24:50.510892][info][12988][VideoSensor.cpp:384] Query stream profile! size= 14, SensorType=OB_SENSOR_IR
[11/12 20:24:50.511955][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_IR, format: OB_FORMAT_Y16, width: 640, height: 576, fps: 15}
[11/12 20:24:50.512959][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_IR, format: OB_FORMAT_Y16, width: 1024, height: 1024, fps: 15}
[11/12 20:24:50.513848][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_IR, format: OB_FORMAT_Y16, width: 1024, height: 1024, fps: 5}
[11/12 20:24:50.514777][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_IR, format: OB_FORMAT_Y16, width: 640, height: 576, fps: 30}
[11/12 20:24:50.515644][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_IR, format: OB_FORMAT_Y16, width: 320, height: 288, fps: 30}
[11/12 20:24:50.516574][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_IR, format: OB_FORMAT_Y16, width: 640, height: 576, fps: 25}
[11/12 20:24:50.517814][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_IR, format: OB_FORMAT_Y16, width: 320, height: 288, fps: 25}
[11/12 20:24:50.518667][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_IR, format: OB_FORMAT_Y16, width: 320, height: 288, fps: 15}
[11/12 20:24:50.519749][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_IR, format: OB_FORMAT_Y16, width: 640, height: 576, fps: 5}
[11/12 20:24:50.521169][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_IR, format: OB_FORMAT_Y16, width: 320, height: 288, fps: 5}
[11/12 20:24:50.523037][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_IR, format: OB_FORMAT_Y16, width: 512, height: 512, fps: 30}
[11/12 20:24:50.523911][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_IR, format: OB_FORMAT_Y16, width: 512, height: 512, fps: 25}
[11/12 20:24:50.524722][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_IR, format: OB_FORMAT_Y16, width: 512, height: 512, fps: 15}
[11/12 20:24:50.525552][info][12988][VideoSensor.cpp:386]  - {type: OB_STREAM_IR, format: OB_FORMAT_Y16, width: 512, height: 512, fps: 5}
[11/12 20:24:50.526446][info][12988][Pipeline.cpp:188] Check and set config start!
[11/12 20:24:50.527300][info][12988][Pipeline.cpp:223] Check and set config done!
[11/12 20:24:50.529399][info][12988][Pipeline.cpp:288] Try to start streams!
[11/12 20:24:50.529539][info][12988][VideoSensor.cpp:646] start OB_SENSOR_DEPTH stream with profile: {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 640, height: 576, fps: 30}, Backend Format: OB_FORMAT_Y16
[11/12 20:24:50.530344][info][12988][MSDEConverterDevice.cpp:549] Start real profile,width:7680 height:434
[11/12 20:24:50.539729][info][11780][MSDEConverterDevice.cpp:67] Depth engine got nvram data size:490328
[11/12 20:24:50.539850][info][11780][MSDEConverterDevice.cpp:94] use dynlib load depthengine lib......
[11/12 20:24:50.636569][info][11780][MSDEConverterDevice.cpp:105] Depth engine init succeed!
[11/12 20:24:50.937321][info][12988][VideoSensor.cpp:646] start OB_SENSOR_IR stream with profile: {type: OB_STREAM_IR, format: OB_FORMAT_Y16, width: 640, height: 576, fps: 30}, Backend Format: OB_FORMAT_Y16
[11/12 20:24:50.937534][info][12988][Pipeline.cpp:301] Start streams done!
[11/12 20:24:50.938604][info][12988][Pipeline.cpp:277] Pipeline start done!
[11/12 20:24:51.118106][info][12988][Pipeline.cpp:411] Try to stop pipeline!
[11/12 20:24:51.118247][info][12988][Pipeline.cpp:383] Try to stop streams!
[11/12 20:25:03.137591][warning][8108][ObException.cpp:5] Resource busy! You can try again later!
[11/12 20:25:03.140114][warning][8108][FemtoBoltUvcDevice.cpp:388] Execute failure! A libobsensor_exception has occurred!
         - where:388#libobsensor::FemtoBoltUvcDevice::initDepthProcessParam::<lambda_2ead263c27ab7fe23cbf81761e0b47a0>::operator ()
         - msg:Resource busy! You can try again later!
         - type:class libobsensor::wrong_api_call_sequence_exception
[11/12 20:25:03.140262][warning][8108][FemtoBoltUvcDevice.cpp:388] Get temperature failed.

@gu-ma
Copy link

gu-ma commented Nov 20, 2024

Hi, if it could help the problem started occurring the day this update was installed. So both are definitely linked:

https://support.microsoft.com/en-us/topic/october-22-2024-kb5044380-os-builds-22621-4391-and-22631-4391-preview-9a8db86a-815d-470a-be95-1aa2ad1feb05

@gu-ma
Copy link

gu-ma commented Nov 21, 2024

Any hints on what could be the problem @zzuliys maybe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants