Segfault in linux IDE

I tried downloading the prebuilt openmv-ide and when I run it on my ubunutu 16.04 machine I get:

2141 >./openmv-ide 
Segmentation fault (core dumped)

I then downloaded the source tree and got the firmware to build and flashed it. I was originally using gcc 4.9 and I got an error stating the CCM overflowed by 4 bytes. I installed gcc 5.3 and the firmware built fine.

I had to install libjpeg-dev and zlib1g-dev in order to get Pillow to install (so these should probably be added to the dependencies).

I was then able to run

python openmv-ide.py

and the IDE opened, and I could connect and run the hello world script.

I also noticed some spots on the image, which seem to correspond to spots on the sensor. What’s the recommended procedure for cleaning the sensor?

Sorry about the segfault with the IDE.

I’m seriously fast tracking getting the Qt IDE done. I had really hoped pyinstaller would not suck so hard…

As for cleaning the sensor, just use alcohol and a microfiber cloth.

Are you using a 32-bit machine ? Note the Linux IDE was packaged on a 64-bit machine.

This is running on a 64-bit machine:

2154 >uname -a
Linux dave-w520 4.4.0-24-generic #43-Ubuntu SMP Wed Jun 8 19:27:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

I ran it under gdb and got this output:

(gdb) run
Starting program: /home/dhylands/openmv_v1.5/openmv-ide 

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7625418 in __GI_raise (sig=11) at ../sysdeps/unix/sysv/linux/raise.c:54
54	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff7625418 in __GI_raise (sig=11) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00000000004047cc in ?? ()
#2  0x00000000004029fd in ?? ()
#3  0x00007ffff7610830 in __libc_start_main (main=0x401740, argc=1, argv=0x7fffffffe1a8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe198)
    at ../csu/libc-start.c:291
#4  0x000000000040176e in ?? ()
(gdb)

Running strace, I see this:

open("/home/dhylands/openmv_v1.5/openmv-ide", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=22543373, ...}) = 0
lseek(3, 19025920, SEEK_SET)            = 19025920
read(3, "\332\237\336\314\362N\371\316\334\204\255k\37\n\373\216z\33_V\252\35)\371\16\t\355#[\305#O"..., 3400) = 3400
read(3, "x\332\1k\25\224\352\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\1,\0\0\0Y\10"..., 4096) = 4096
read(3, "\343\234\377H\301\363\245\346>\203\225\370~\23\21V4\355\367gHw/\31I\266\10\7I\227\325\245"..., 4096) = 4096
close(3)                                = 0
stat("/tmp/_MEIN20W9x/logo.png", 0x7ffea421eac0) = -1 ENOENT (No such file or directory)
open("/tmp/_MEIN20W9x/logo.png", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
fstat(3, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0
write(3, "\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\1,\0\0\0Y\10\6\0\0\0\204\345\31"..., 4096) = 4096
fchmod(3, 0700)                         = 0
write(3, "\346>\203\225\370~\23\21V4\355\367gHw/\31I\266\10\7I\227\325\245\340\277r\222\343\233\262"..., 1387) = 1387
close(3)                                = 0
open("/home/dhylands/openmv_v1.5/openmv-ide", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=22543373, ...}) = 0
lseek(3, 19034112, SEEK_SET)            = 19034112
read(3, "\300\30RC\222]A0o\270\236d\367\200!\4\233\232\263D\332\271\236\370\23$\rF\243\17\v\375"..., 702) = 702
read(3, "x\332\355]mw\342\270\222\376\316\257\320\260\347\314\316\234\rI\200$\363\326\315]\222\220\16w\362v"..., 4096) = 4096
read(3, "x\3259\254w\226\37\275p\336Z~\324Byo\305@\372Ph\237\10\304\315Q\177\360\346r\347,"..., 4096) = 4096
close(3)                                = 0
stat("/tmp/_MEIN20W9x/openmv-ide.glade", 0x7ffea421eac0) = -1 ENOENT (No such file or directory)
open("/tmp/_MEIN20W9x/openmv-ide.glade", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
fstat(3, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0
write(3, "<?xml version=\"1.0\" encoding=\"UT"..., 77824) = 77824
fchmod(3, 0700)                         = 0
write(3, "\n              </packing>\n      "..., 1854) = 1854
close(3)                                = 0
open("/home/dhylands/openmv_v1.5/openmv-ide", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=22543373, ...}) = 0
lseek(3, 19038208, SEEK_SET)            = 19038208
read(3, "&qH\360\1\226'\301\246\327e\t}@\214RP\37\323\215\235\356\335\361uY\325\327\310ox\366"..., 2288) = 2288
read(3, "x\332\0\245@Z\277\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\3\204\0\0\1\340\10"..., 520192) = 520192
read(3, "\226\3030\270\367\246A\241z\21\2441\376\265\315\341Ml\2406\320gV)\315\302\205:\316\354w\r"..., 4096) = 4096
close(3)                                = 0
stat("/tmp/_MEIN20W9x/pinout.png", 0x7ffea421eac0) = -1 ENOENT (No such file or directory)
open("/tmp/_MEIN20W9x/pinout.png", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
fstat(3, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0
write(3, "\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\3\204\0\0\1\340\10\6\0\0\0\375\264\243"..., 520192) = 520192
fchmod(3, 0700)                         = 0
write(3, "CO\257\36\306\232j\355b`\225\251\323\342*\310\233\366\244UT\323|\355k\254\261\306\32+ \\"..., 3315) = 3315
close(3)                                = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f280927b9d0) = 19810
rt_sigaction(SIGINT, {0x4041d0, [INT], SA_RESTORER|SA_RESTART, 0x7f28088ca4a0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGKILL, {0x4041d0, [KILL], SA_RESTORER|SA_RESTART, 0x7f28088ca4a0}, 0x7ffea4220a20, 8) = -1 EINVAL (Invalid argument)
rt_sigaction(SIGTERM, {0x4041d0, [TERM], SA_RESTORER|SA_RESTART, 0x7f28088ca4a0}, {SIG_DFL, [], 0}, 8) = 0
wait4(-1, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGSEGV && WCOREDUMP(s)}], 0, NULL) = 19810
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_DUMPED, si_pid=19810, si_uid=35029, si_status=SIGSEGV, si_utime=20, si_stime=3} ---
rt_sigaction(SIGINT, {SIG_DFL, [INT], SA_RESTORER|SA_RESTART, 0x7f28088ca4a0}, {0x4041d0, [INT], SA_RESTORER|SA_RESTART, 0x7f28088ca4a0}, 8) = 0
rt_sigaction(SIGKILL, {SIG_DFL, [KILL], SA_RESTORER|SA_RESTART, 0x7f28088ca4a0}, 0x7ffea4220a20, 8) = -1 EINVAL (Invalid argument)
rt_sigaction(SIGTERM, {SIG_DFL, [TERM], SA_RESTORER|SA_RESTART, 0x7f28088ca4a0}, {0x4041d0, [TERM], SA_RESTORER|SA_RESTART, 0x7f28088ca4a0}, 8) = 0
tgkill(19807, 19807, SIGSEGV)           = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SI_TKILL, si_pid=19807, si_uid=35029} ---
+++ killed by SIGSEGV (core dumped) +++
Segmentation fault (core dumped)

I see the issue on Ubuntu-16.04 64-bit now, not sure how to fix it, I think it’s a PyInstaller issue, anyway we’re going to switch to Qt real soon.