I am using a Raspberry Pi 400 with a Bosch BME688 sensor to collect data to pass to the BME Ai studio for training. I used the pi3g github library to collect data. When running the examples everything works fine but when using the bmerawdata.py it results in a segmentation fault. I've already done what is suggested in the issue for the segmentation fault and i fixed the constants in the library that changed from the 1.0.x version to the 2.2.0.0 of the bsec library.
The first issue that i encountered was that executing the bmerawdata.py under sudo would give me different results from the execution without sudo. After removing the bme68x library and reinstalling it it seems like the super user execution and the normal user execution produce the same result. But after a couple of cycles the program now crashes with a segmentation fault.
If anyone could help that'd be appreciated
Related
I'm currently trying to follow this tutorial for my class. https://pyscience.wordpress.com/2014/11/16/volume-rendering-with-python-and-vtk/ I followed the instructions and my code matches up, but when I try to run it I get the following error.
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 154 (GLX)
Minor opcode of failed request: 3 (X_GLXCreateContext)
Value in failed request: 0x0
Serial number of failed request: 15
Current serial number in output stream: 20
I've looked through other posts that have similar messages and they don't seem to be quite the same. Oh I'm also running Ubuntu 16.04 on a virtual machine. Please let me know of any suggestions you might have or any additional information you'd need to help resolve this issue.
As suggested by Antimony I uploaded my code to github, here
https://github.com/alam38/lab6
I believe the relevant section is section involving the mapper. As you can see from the commented section I switched from vtk's vtkVolumeRayCastMapper to vtk's smartmapper as a suggestion from my teacher in the case that the issue stemmed from the mapper placing too much strain on my computer. The other similar questions all seem to point towards an issue with nvidia's drivers, but I updated my drivers and there's still an issue. That still didn't solve it and I'm not sure what else I could try.
running gazebo on a VM doesn't go with 3d graphic driver,
but you could try these:
1) in VirtualBox go to settings - display - video - enable acceleration
2) on VirtualBox install:
sudo apt remove libcheese-gtk23
sudo apt install xserver-xorg-core
then restart your VM OS
I suggest you set-up dual boot
I'm getting a segfault ("Illegal operation (core dumped)") for a python program that I've run every week without fault for ages. I'm also running Ubuntu on Nitrous. I recall dealing with these yonks ago when coding in C, and I haven't had to deal with them very much recently.
Importing the library urllib3 seems to be causing the problem. Does anyone know a fix?
Also, can someone advise or link to the best workflow for diagnosing these problems in future?
Thanks!
"Illegal operation"
This usually means that you are running code compiled for a more capable processor (e.g. Haswell) on a less capable one (e.g. Ivy Bridge).
Importing the library urllib3 seems to be causing the problem.
On my Ubuntu machine, import urllib3 loads libssl.so.1.0.0, libcrypto.so.1.0.0 and _ssl.x86_64-linux-gnu.so. These crypto libraries are very likely to be compiled with AVX, AVX2, etc. instructions which your processor may not support.
best workflow for diagnosing these problems
Your first step should be to find out which instruction is causing the SIGILL. To do so, run:
gdb python
(gdb) run
>>> import urllib3 # do whatever is necessary to reproduce SIGILL
(gdb) x/i $pc
(gdb) info sym $pc
The last two commands above should give you the instruction that is causing the SIGILL, and the library in which that instruction is used. Once you know what that instruction is, you can verify that your processor doesn't support it, and contact the distributor of the "guilty" library to get a different compilation (one without using instructions that are not supported by your CPU).
I'm working on a variscite board with a yocto distribution and python 2.7.3.
I get sometimes a Bus error message from the python interpreter.
My program runs normally at least some hours or days before the error ocours.
But when I get it once, I get it directly when I try to restart my program.
I have to reboot before the system works again.
My program uses only a serial port, a bit usb communication and some tcp sockets.
I can switch to another hardware and get the same problems.
I also used the python selftest with
python -c "from test import testall"
And I get errors for these two tests
test_getattr (test.test_builtin.BuiltinTest) ... ERROR test_nameprep
(test.test_codecs.NameprepTest) ... ERROR
And the selftest stops always at
test_callback_register_double (ctypes.test.test_callbacks.SampleCallbacksTestCase) ... Segmentation
fault
But when the systems runs some hours the selftests stops earlier at
ctypes.macholib.dyld
Bus error
I checked the RAM with memtester, it seems to be okay.
How I can find the cause for the problems?
Bus errors are generally caused by applications trying to access memory that hardware cannot physically address. In your case there is a segmentation fault which may cause dereferencing a bad pointer or something similar which leads to accessing a memory address which physically is not addressable. I'd start by root causing the segmentation fault first as the bus error is the secondary symptom.
A year later I found the indirect cause for the problems.
I wrote a crc16 module which used:
from ctypes import c_ushort
...
value = c_ushort(crcValue >>8 ) ...
In case of a BUS-Error this was the problematic part.
I don't assume that the c_ushort() function itself causes the problem, it's only the function which shows that there is something broken.
The problem gone after upgrading the system to Linux version 3.14.38-6QP+g8740b9f (test#Yocto) (gcc version 4.9.2 (GCC) )
With the help of Making Things See I wrote a few programs on Processing for the Kinect. More recently I followed the instructions here for working with the Kinect in vPython. Now the old Processing programs won't run. I get errors when I try to run them. One throws
Null Point Exception: null array
(referring to kinect.depthMap())
Another gives
`SimpleOpenNI Version 0.27
A fatal error has been detected by the Java Runtime Environment:
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x60051f35, pid=6924, tid=5692
JRE version: 6.0_37-b06
Java VM: Java HotSpot(TM) Client VM (20.12-b01 mixed mode windows-x86 )
Problematic frame:
C [OpenNI.dll+0x11f35]
An error report file with more information is saved as:
C:\Program Files (x86)\processing-2.0.1\hs_err_pid6924.log
If you would like to submit a bug report, please visit:
http://java.sun.com/webapps/bugreport/crash.jsp
The crash happened outside the Java Virtual Machine in native code.
See problematic frame for where to report the bug.
Could not run the sketch (Target VM failed to initialize).
For more information, read revisions.txt and Help ? Troubleshooting.
I suspect that when I installed Kinect SDK it somehow messed up the drivers I installed for the Kinect to work with Processing. I reinstalled OpenNINITE. What must one do to toggle back and forth between using Processing and Python with the Kinect? (Processing version is 32-bit 2.0.1. Python is 2.7.5)
I reinstalled NITE and then updated the SimpleOpenNi library in Processing. Several of the commands have changed in the new version of the SimpleOpenNI library - e.g. there is no SKEL_PROFILE_ALL parameter - but once I modified my code in Processing, my programs worked and I can also use the kinect in Python.
I have written a python code by using OpenCV library to detect a motion. If a motion occurs, it takes a snapshot of the moving object. However my problem is this: If I execute the program on my PC (Ubuntu 12.04) everything's OK.
But when I execute the program on my BeagleBone which has Angstrom Linux running and an Us Robotics webcam device attached to it, after a while it gives the following error:
libv4l2: error dequeuing buf: No such device
VIDIOC_DQBUF: No such device
How can I solve this problem?
Regards
edit: I installed ubuntu 12.04 to my BeagleBone and everything is OK with it too. It seems like my problem is related to Angstrom image. Maybe a driver or a library (libv4l2?) problem? Any ideas?
I was seeing this error with Ubuntu also when the board was powered through the USB cable. When I powered the board with a 5V supply, the problem went away.
I experienced the same problem. I even changed my board because of this error. But when I resorted back to my older power supply, it was gone. As simple as that.