Skip to content

Packet buffer is NULL #34

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

Open
Dagrol opened this issue Apr 22, 2017 · 15 comments
Open

Packet buffer is NULL #34

Dagrol opened this issue Apr 22, 2017 · 15 comments

Comments

@Dagrol
Copy link

Dagrol commented Apr 22, 2017

I am getting the following error on Ubuntu 14.04 while running the examples:

[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
.....
it continuously prints the above and eventually crashes. Am I missing something in the installation? since they worked fine on OSX.

--Edit--
Just to add, the Protonect binary seems to work fine in libfreenect2

@r9y9
Copy link
Owner

r9y9 commented Apr 22, 2017

Do you see the error with Protonect?

@Dagrol
Copy link
Author

Dagrol commented Apr 22, 2017

Nope. Protonect works fine. I get that error as soon as I run the examples and any other scripts I wrote which use pylibfreenect2 which were working fine on OSX. I am starting to wonder if it might be a graphics card issue? (I am running ubuntu 14.04 on a macbook pro with amd Radeon HD 8870M)

@r9y9
Copy link
Owner

r9y9 commented Apr 23, 2017

Um, it might be the issue related graphics, but I'm afraid that I don't have a workaround right now. It's worth trying to see which packet processor triggers this; OpenGLPacketPipeline, OpenCLPacketPipeline or CpuPacketPipeline to dig into the problem.

@Dagrol
Copy link
Author

Dagrol commented Apr 23, 2017

I am not 100% sure if it's a graphics card issue. It seems very odd that Protonect works but not this. I might be missing some configuration settings

@shams3049
Copy link

How did you resolve this issue? I am also getting recursively same error.

@lucas-subli
Copy link

Any Solutions ? I am having the same issue!

@lucas-subli
Copy link

lucas-subli commented Sep 21, 2017

./Protonect doesn't present any isssues
./Protonect cl DOES present the same error

Changing from OpenCL to OpenCV seem to have solved the issue

EDIT: As mentioned below by @r9y9 using

from pylibfreenect2 import OpenGLPacketPipeline
pipeline = OpenGLPacketPipeline()

instead of

from pylibfreenect2 import OpenCLPacketPipeline
pipeline = OpenCLPacketPipeline()

Seems to have solved the issue.
(CpuPacketPipeline() also works just fine)

@r9y9
Copy link
Owner

r9y9 commented Sep 22, 2017

@tokyokuma
Copy link

I am facing the same problem.
Protonect works normally.
Do you think the problem lies with the GPU?
My PC uses only CPU. Can not I use Kinect V 2 with pylibfreenect with CPU alone?
However,
from pylibfreenect 2 import CpuPacketPipeline
pipeline = CpuPacketPipeline ()
I guess that this is programmed to work with only the CPU

I do not know what to do

@r9y9
Copy link
Owner

r9y9 commented Jan 31, 2018

Well, since I don't have Kinect v2 anymore, it's hard to say what is the real cause of this. Could anybody confirm whether the issue comes from pylibfreenect2 or libfreenect2? According to the #34 (comment), there's something wrong with OpenCL. Does Protonect work even with OpenCL backend?

@tokyokuma
Copy link

tokyokuma commented Feb 2, 2018

I tried
$ ./Protonect gl It works normally
$ ./Protonect cl  It does not work properly, Packet buffer is NULL
$ ./Protonect cpu It works normally

OpenCL doesn't work, but the problem was solved.
I modified the example code(multiframe_listener.py) and tested it.
I made the order of OpenCL the last.

【before】
try:
from pylibfreenect2 import OpenCLPacketPipeline
pipeline = OpenCLPacketPipeline()
except:
try:
from pylibfreenect2 import OpenGLPacketPipeline
pipeline = OpenGLPacketPipeline()
except:
from pylibfreenect2 import CpuPacketPipeline
pipeline = CpuPacketPipeline()

【after】
try:
from pylibfreenect2 import OpenGLPacketPipeline
pipeline = OpenGLPacketPipeline()
except:
try:
from pylibfreenect2 import CpuPacketPipeline
pipeline = CpuPacketPipeline()
except:
from pylibfreenect2 import OpenCLPacketPipeline
pipeline = OpenCLPacketPipeline()

This code worked without problems!
Thank you for your help!

r9y9 added a commit that referenced this issue Feb 2, 2018
@r9y9
Copy link
Owner

r9y9 commented Feb 2, 2018

@tokyokuma Thank you very much! So there should be something wrong with OpenCL setup. I used OpenCL backend because it was the fastest backend for me, but I changed example code to use the OpenGL backend instead by default.

@leviresende
Copy link

I had the same issue, so I edited the parameters to:

depth_method to opengl
reg_method to cpu

After that, it is working well.

@JinXiangLai
Copy link

I had the same issue, so I edited the parameters to:

depth_method to opengl reg_method to cpu

After that, it is working well.

hi, but I still want to use opencl for registration, any idea?

@jiapei100
Copy link

$ ./bin/Protonect cuda brought me the same errors:

...
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
[Error] [DepthPacketStreamParser] Packet buffer is NULL
...

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

8 participants