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

Trace/breakpoint trap on Debian, Python 3.8, Zivid 2.1.0 #104

Open
mortlind opened this issue Nov 3, 2020 · 28 comments
Open

Trace/breakpoint trap on Debian, Python 3.8, Zivid 2.1.0 #104

mortlind opened this issue Nov 3, 2020 · 28 comments

Comments

@mortlind
Copy link

mortlind commented Nov 3, 2020

I am on Debian with Python 3.8, and can install 2.1.0 core and telicam driver fine, and pip install zivid succeeds. But any attempt at getting the camera results in Trace/breakpoint trap. E.g. the standard example fails:

import zivid
app = zivid.Application()
camera = app.connect_camera()

Even the emulated camera fails:

>>> camera = app.create_file_camera("ZividSampleData2/FileCameraZividOne.zfc")
Trace/breakpoint trap

Is there any easy fix for this?

@eskaur
Copy link
Member

eskaur commented Nov 3, 2020

Could you post a minimal but self-contained Python script that reproduces this error?

@mortlind
Copy link
Author

mortlind commented Nov 3, 2020

Could you post a minimal but self-contained Python script that reproduces this error?

I posted the first three lines from the standard example. That is sufficient for me to generate the error.

@eskaur
Copy link
Member

eskaur commented Nov 3, 2020

Ah, so to be clear, running either samples/sample_capture.py or samples/sample_capture_from_file.py fails with "Trace/breakpoint trap"?
Could you give me the output of python samples/sample_print_version_info.py (if it works)?

@mortlind
Copy link
Author

mortlind commented Nov 3, 2020

I confirm that sample_capture.py and sample_capture_from_file.py fail the same way with "Trace/breakpoint trap". Following is the version info:

ml@lib13:~/install/zivid/zivid-python$ python samples/sample_print_version_info.py 
Python: 3.8.6
zivid-python: 2.0.0.2.1.0
Zivid SDK: 2.1.0+d2007e12-1
ml@lib13:~/install/zivid/zivid-python$ 

A further piece of information: When trying to get an interface to the camera, i.e. immediately following the statement camera = app.connect_camera(), the camera fan revs up. Hence, I do believe that connecting to the camera works.

@eskaur
Copy link
Member

eskaur commented Nov 3, 2020

Thank you, that looks as it should.
What exact version of Debian are you running? I'd like to reproduce this problem myself.

lsb_release -a

@mortlind
Copy link
Author

mortlind commented Nov 3, 2020

ml@lib13:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux bullseye/sid
Release:        testing
Codename:       bullseye
ml@lib13:~$ 

@mortlind
Copy link
Author

mortlind commented Nov 3, 2020

And

ml@lib13:~$ uname -a
Linux lib13 5.9.0-1-amd64 #1 SMP Debian 5.9.1-1 (2020-10-17) x86_64 GNU/Linux

@eskaur
Copy link
Member

eskaur commented Nov 3, 2020

Ah that's pretty bleeding-edge. Have you also tried with the latest stable Debian by any chance? (Debian 10 / Buster)

@mortlind
Copy link
Author

mortlind commented Nov 3, 2020

I do not have a stable install around at the moment, but I will try out with a live install when I find the time.

@eskaur
Copy link
Member

eskaur commented Nov 3, 2020

I may be able to test with Debian 10 myself soon.
May take a bit because we don't have a test-setup ready, since we don't officially support Debian.

Tip: Ubuntu is the officially supported (and most tested) distro for Zivid.

@mortlind
Copy link
Author

mortlind commented Nov 3, 2020

I know that Ubuntu is the supported distribution. However, Debian is the free choice, and I will stretch a long way to get everything working on Debian :-)

The difference should be quite minor, so the errors may simply be due to implicit dependencies. If we discover, and express these in the installer, or just in the README, everything will be fine, I am sure ...

@eskaur
Copy link
Member

eskaur commented Nov 3, 2020

Ubuntu is certainly free, at least in the no-cost sense.
Anyway, I would like for this to work on Debian (even if we don't "officially" support it), so I'm keen to investigate further.

@mortlind
Copy link
Author

mortlind commented Nov 3, 2020

Ubuntu is free as "free beer" ... for now, and probably forever. But Debian is free as in "free mind". I do agree, however, that this latter part, relating to such things as freedom, liberty, and democracy, seems to matter less and less in the global tech-oligarchy we increasingly find ourselves :-(

@eskaur
Copy link
Member

eskaur commented Nov 3, 2020

Moving on... :D
Does any of the core Zivid functionality work on your machine? Like Zivid Studio, CLI-tools or compiling+running C++ samples? Just want to make sure the issue lies with zivid-python.

@mortlind
Copy link
Author

mortlind commented Nov 3, 2020

ZividStudio starts up, but crashes with the same error while trying to connect to the camera. Thus, this is not a zivid-python or Python 3.8 issue.
I have not tried any C++-application. Do you think that is worthwhile at this stage?

@eskaur
Copy link
Member

eskaur commented Nov 3, 2020

Ah that is good to know. I thought this was a zivid-python issue.
No, if you've confirmed that Zivid Studio crashes with the same error then you don't need to try the C++ samples.

@eskaur
Copy link
Member

eskaur commented Nov 3, 2020

Have you tried both the Ubuntu 16.04 and the Ubuntu 18.04 debs? There are some differences in which libstdc++ they link to and such, so trying the other one may help.

@nedrebo
Copy link
Contributor

nedrebo commented Nov 3, 2020

Usually, you would get better exceptions if OpenCL support is missing, but can you post the output of clinfo?

We dump logs to ~/.cache/Zivid/API/Log. Can you wipe that directory and run the reproducer once more and then upload the log file that appeared in ~/.cache/Zivid/API/Log/?

@mortlind
Copy link
Author

mortlind commented Nov 3, 2020

Here are the Zivid API log and the output of clinfo.
Zivid-1604413281724-114233.log
clinfo.txt

@mortlind
Copy link
Author

mortlind commented Nov 3, 2020

@eskaur

Have you tried both the Ubuntu 16.04 and the Ubuntu 18.04 debs? There are some differences in which libstdc++ they link to and such, so trying the other one may help.

Good point! I have only tried the 18.04-debs. I will immediately try the 16.04-debs.

@mortlind
Copy link
Author

mortlind commented Nov 3, 2020

@eskaur

Have you tried both the Ubuntu 16.04 and the Ubuntu 18.04 debs? There are some differences in which libstdc++ they link to and such, so trying the other one may help.

I tested ZividStudio with 16.04 v.2.1.0. Same error :-(

@eskaur
Copy link
Member

eskaur commented Nov 3, 2020

Oh well, thanks for checking.

@eskaur
Copy link
Member

eskaur commented Nov 3, 2020

The log you posted was from using the 16.04 debs, right? Could I also get the logs from the crash when running with 18.04 debs?

@mortlind
Copy link
Author

mortlind commented Nov 3, 2020

The log you posted was from using the 16.04 debs, right? Could I also get the logs from the crash when running with 18.04 debs?

I believe the logs I uploaded was with 18.04. I will upload new logs tomorrow for both versions, and with definite knowledge.

@mortlind
Copy link
Author

mortlind commented Nov 4, 2020

@eskaur Today I tested with a live version of Debian stable, but was unable to find the package intel-opencl-icd there. It is apparently only in unstable. Without it, as I understand, the option is mesa-opencl-icd which only gives me OpenCL v. 1.1; the intel-specialized implementation gives me v. 2.1.

I just generated the logs particular for 16.04 and 18.04. They were obtained by running sample_capture_from_file.py on my Debian testing-system with intel-opencl-icd and OpenCL v. 2.1:
Zivid-2.1.0-16.04.log
Zivid-2.1.0-18.04.log

@eskaur
Copy link
Member

eskaur commented Nov 5, 2020

Thank you, I'll check out those logs.

Are you able to install these Intel drivers on your stable Debian?: https://zivid.atlassian.net/wiki/spaces/ZKB/pages/530842161/Intel+CPU+with+integrated+GPU
These drivers are at least know to work on Ubuntu.

@mortlind
Copy link
Author

mortlind commented Nov 5, 2020

I will try, but I bet that it will require upgrading to more libraries from the Debian unstable release.

@mortlind
Copy link
Author

@eskaur Postponed but not forgotten ... Please do tell me, if you test this yourself :-)

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

No branches or pull requests

3 participants