Asked
Resolved Resolved by amin!

Ezbpi Server Camera Error

I realized that I am not able to flip the Raspberry Pi's camera, I get the following error message?

Error Camera.SetCaptureImage: AForge.Imaging.UnsupportedImageFormatException: Source pixel format is not supported by the filter. bei AForge.Imaging.Filters.BaseTransformationFilter.CheckSourceFormat(PixelFormat pixelFormat) bei AForge.Imaging.Filters.BaseTransformationFilter.Apply(BitmapData imageData) bei AForge.Imaging.Filters.BaseTransformationFilter.Apply(Bitmap image) bei EZ_B.Camera.x5wORRJh49(Object )


Related Hardware Raspberry Pi
Related Control Camera Device

ARC Pro

Upgrade to ARC Pro

ARC Pro is your gateway to a community of like-minded robot enthusiasts and professionals, all united by a passion for advanced robot programming.

#9  

Raspberry EZBPi Version: 2019.7.22.1 Verbose logging is: False Serial port is: /dev/serial0 EZB: TCP Started on port 23 EZ-B Server started on TCP Port: 23 Camera: TCP Started on port 24 Camera Server started on TCP Port: 24 Press ESC to quit Camera: TCP Connection from: 192.168.178.61 Camera: TCP Connection from: 192.168.178.61 mmal: mmal_port_enable: vc.ril.camera:ctr:0(0xb14d0720) already enabled Camera disconnected on tty:1 *** Error in `mono': double free or corruption (out): 0xac016098 *** Stacktrace:

at <0xffffffff> at (wrapper managed-to-native) MMALSharp.Native.MMALUtil.mmal_port_pool_destro y (MMALSharp.Native.MMAL_PORT_T*,MMALSharp.Native.MMAL_POOL_T*) <0x0003b> at MMALSharp.Ports.PortBase.DestroyPortPool () <0x00043> at MMALSharp.MMALComponentBase.CleanPortPools () <0x001c3> at MMALSharp.MMALConnectionImpl.Destroy () <0x0002b> at MMALSharp.MMALConnectionImpl.Dispose () <0x00043> at MMALSharp.Components.MMALDownstreamComponent.ClosePipelineConnections () <0 x00133> at MMALSharp.Components.MMALDownstreamComponent.Dispose () <0x00043> at EZBPi.EZBProgram._CAMServer_OnConnection (System.Net.Sockets.TcpClient,Syst em.Net.Sockets.NetworkStream,int) <0x0073f> at EZBPi.TCPServer.handleClientScriptCommand (object) <0x000cb> at System.Threading.ThreadHelper.ThreadStart_Context (object) <0x0010f> at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionCo ntext,System.Threading.ContextCallback,object,bool) <0x001bf> at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,Sy stem.Threading.ContextCallback,object,bool) <0x0002b> at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,Sy stem.Threading.ContextCallback,object) <0x0005b> at System.Threading.ThreadHelper.ThreadStart (object) <0x00047> at (wrapper runtime-invoke) .runtime_invoke_void__this___object (objec t,intptr,intptr,intptr) <0x000df>

Native stacktrace:

Debug info from gdb:

[New LWP 1235] [New LWP 1236] [New LWP 1237] [New LWP 1238] [New LWP 1239] [New LWP 1240] [New LWP 1241] [New LWP 1242] [New LWP 1243] [New LWP 1244] [New LWP 1245] [New LWP 1246] [New LWP 1247] [New LWP 1248] [New LWP 1249] [New LWP 1252] [New LWP 1255] [New LWP 1258] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1". 0xb6e8d3c0 in read () at ../sysdeps/unix/syscall-template.S:84 84 ../sysdeps/unix/syscall-template.S: Datei oder Verzeichnis nicht gefunden. Id Target Id Frame

  • 1 Thread 0xb6fb4000 (LWP 1234) "Main" 0xb6e8d3c0 in read () at ../sysdeps/unix/syscall-template.S:84 2 Thread 0xb63ff470 (LWP 1235) "SGen worker" 0xb6e8994c in __pthread_cond_wait (cond=0x3258f0, mutex=0x3258bc) at pthread_cond_wait.c:186 3 Thread 0xb6abb470 (LWP 1236) "Finalizer" 0xb6e8c014 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=1, futex_word=0x31d8c0) at ../sysdeps/unix/sysv/linux/futex-internal.h:205 4 Thread 0xb40cf470 (LWP 1237) "TCP Server for " 0xb6e8d6a0 in accept () at ../sysdeps/unix/syscall-template.S:84 5 Thread 0xb3dff470 (LWP 1238) "TCP Server for " 0xb6e8d6a0 in accept () at ../sysdeps/unix/syscall-template.S:84 6 Thread 0xb3cff470 (LWP 1239) "Timer-Scheduler" 0xb6e89ce8 in __pthread_cond_timedwait (cond=0x1a30930, mutex=0x1a30914, abstime=0xb3cfe35c) at pthread_cond_timedwait.c:198 7 Thread 0xb3fcf470 (LWP 1240) "Timer-Scheduler" 0xb6e89ce8 in __pthread_cond_timedwait (cond=0x3260c0, mutex=0x3260a8, abstime=0xb3fced54) at pthread_cond_timedwait.c:198 8 Thread 0xb3bff470 (LWP 1241) "Threadpool work" 0xb6e89ce8 in __pthread_cond_timedwait (cond=0xb3e0c848, mutex=0xb3e0c878, abstime=0xb3bfed60) at pthread_cond_timedwait.c:198 9 Thread 0xb3aff470 (LWP 1242) "Threadpool work" 0xb6e89ce8 in __pthread_cond_timedwait (cond=0xb3e0c848, mutex=0xb3e0c878, abstime=0xb3afed60) at pthread_cond_timedwait.c:198 10 Thread 0xb39ff470 (LWP 1243) "TCP Server for " 0xb6e8e4cc in __waitpid (pid=1259, stat_loc=0xb39fd918, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29 11 Thread 0xb3771470 (LWP 1244) "VCHIQ completio" 0xb6e0780c in ioctl () at ../sysdeps/unix/syscall-template.S:84 12 Thread 0xb2f71470 (LWP 1245) "HDispmanx Notif" 0xb6e8c014 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=1, futex_word=0xb388f6e8 ) at ../sysdeps/unix/sysv/linux/futex-internal.h:205 13 Thread 0xb2771470 (LWP 1246) "HTV Notify" 0xb6e8c014 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=1, futex_word=0xb388e864 ) at ../sysdeps/unix/sysv/linux/futex-internal.h:205 14 Thread 0xb1f71470 (LWP 1247) "HCEC Notify" 0xb6e8c014 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=1, futex_word=0xb388f5ec ) at ../sysdeps/unix/sysv/linux/futex-internal.h:205 15 Thread 0xb11ff470 (LWP 1248) "vc.ril.camera" 0xb6e8c014 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=1, futex_word=0xb14ea038) at ../sysdeps/unix/sysv/linux/futex-internal.h:205 16 Thread 0xb09ff470 (LWP 1249) "vc.camera_info" 0xb6e8c014 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=1, futex_word=0xb14e4b78) at ../sysdeps/unix/sysv/linux/futex-internal.h:205 17 Thread 0xae9ff470 (LWP 1252) "vc.ril.video_sp" 0xb6e8c014 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=1, futex_word=0xaf3b25a8) at ../sysdeps/unix/sysv/linux/futex-internal.h:205 18 Thread 0xad1ff470 (LWP 1255) "vc.ril.image_en" 0xb6e8c014 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=1, futex_word=0xaf3ba908) at ../sysdeps/unix/sysv/linux/futex-internal.h:205 19 Thread 0xac1ff470 (LWP 1258) "Threadpool work" 0xb6e89ce8 in __pthread_cond_timedwait (cond=0xb3e0c848, mutex=0xb3e0c878, abstime=0xac1fed60) at pthread_cond_timedwait.c:198

Thread 19 (Thread 0xac1ff470 (LWP 1258)): #0 0xb6e89ce8 in __pthread_cond_timedwait (cond=0xb3e0c848, mutex=0xb3e0c878, abstime=0xac1fed60) at pthread_cond_timedwait.c:198 #1 0x001918c0 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 18 (Thread 0xad1ff470 (LWP 1255)): #0 0xb6e8c014 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=1, futex_word=0xaf3ba908) at ../sysdeps/unix/sysv/linux/futex-internal.h:205 #1 do_futex_wait (sem=sem@entry=0xaf3ba908, abstime=0x0) at sem_waitcommon.c:115 #2 0xb6e8c158 in __new_sem_wait_slow (sem=0xaf3ba908, abstime=0x0) at sem_waitcommon.c:282 #3 0xb13579bc in mmal_component_action_thread_func () from /opt/vc/lib/libmmal_core.so #4 0xb383ccc4 in vcos_thread_entry (arg=0xaf3ba820) at /home/dc4/projects/staging/userland/interface/vcos/pthreads/vcos_pthreads.c:144 #5 0xb6e82fc4 in start_thread (arg=0xad1ff470) at pthread_create.c:335 #6 0xb6e0ebc8 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76 from /lib/arm-linux-gnueabihf/libc.so.6 Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 17 (Thread 0xae9ff470 (LWP 1252)): #0 0xb6e8c014 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=1, futex_word=0xaf3b25a8) at ../sysdeps/unix/sysv/linux/futex-internal.h:205 #1 do_futex_wait (sem=sem@entry=0xaf3b25a8, abstime=0x0) at sem_waitcommon.c:115 #2 0xb6e8c158 in __new_sem_wait_slow (sem=0xaf3b25a8, abstime=0x0) at sem_waitcommon.c:282 #3 0xb135795c in mmal_component_action_thread_func () from /opt/vc/lib/libmmal_core.so #4 0xb383ccc4 in vcos_thread_entry (arg=0xaf3b24c0) at /home/dc4/projects/staging/userland/interface/vcos/pthreads/vcos_pthreads.c:144 #5 0xb6e82fc4 in start_thread (arg=0xae9ff470) at pthread_create.c:335 #6 0xb6e0ebc8 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76 from /lib/arm-linux-gnueabihf/libc.so.6 Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 16 (Thread 0xb09ff470 (LWP 1249)): #0 0xb6e8c014 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=1, futex_word=0xb14e4b78) at ../sysdeps/unix/sysv/linux/futex-internal.h:205 #1 do_futex_wait (sem=sem@entry=0xb14e4b78, abstime=0x0) at sem_waitcommon.c:115 #2 0xb6e8c158 in __new_sem_wait_slow (sem=0xb14e4b78, abstime=0x0) at sem_waitcommon.c:282 #3 0xb135795c in mmal_component_action_thread_func () from /opt/vc/lib/libmmal_core.so #4 0xb383ccc4 in vcos_thread_entry (arg=0xb14e4a90) at /home/dc4/projects/staging/userland/interface/vcos/pthreads/vcos_pthreads.c:144 #5 0xb6e82fc4 in start_thread (arg=0xb09ff470) at pthread_create.c:335 #6 0xb6e0ebc8 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76 from /lib/arm-linux-gnueabihf/libc.so.6 Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 15 (Thread 0xb11ff470 (LWP 1248)): #0 0xb6e8c014 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=1, futex_word=0xb14ea038) at ../sysdeps/unix/sysv/linux/futex-internal.h:205 #1 do_futex_wait (sem=sem@entry=0xb14ea038, abstime=0x0) at sem_waitcommon.c:115 #2 0xb6e8c158 in __new_sem_wait_slow (sem=0xb14ea038, abstime=0x0) at sem_waitcommon.c:282 #3 0xb135795c in mmal_component_action_thread_func () from /opt/vc/lib/libmmal_core.so #4 0xb383ccc4 in vcos_thread_entry (arg=0xb14e9f50) at /home/dc4/projects/staging/userland/interface/vcos/pthreads/vcos_pthreads.c:144 #5 0xb6e82fc4 in start_thread (arg=0xb11ff470) at pthread_create.c:335 #6 0xb6e0ebc8 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76 from /lib/arm-linux-gnueabihf/libc.so.6 Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 14 (Thread 0xb1f71470 (LWP 1247)): #0 0xb6e8c014 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=1, futex_word=0xb388f5ec ) at ../sysdeps/unix/sysv/linux/futex-internal.h:205 #1 do_futex_wait (sem=sem@entry=0xb388f5ec , abstime=0x0) at sem_waitcommon.c:115 #2 0xb6e8c158 in __new_sem_wait_slow (sem=0xb388f5ec , abstime=0x0) at sem_waitcommon.c:282 #3 0xb3875c44 in cecservice_notify_func () from /opt/vc/lib/libbcm_host.so #4 0xb383ccc4 in vcos_thread_entry (arg=0xb388f600 ) at /home/dc4/projects/staging/userland/interface/vcos/pthreads/vcos_pthreads.c:144 #5 0xb6e82fc4 in start_thread (arg=0xb1f71470) at pthread_create.c:335 #6 0xb6e0ebc8 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76 from /lib/arm-linux-gnueabihf/libc.so.6 Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 13 (Thread 0xb2771470 (LWP 1246)): #0 0xb6e8c014 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=1, futex_word=0xb388e864 ) at ../sysdeps/unix/sysv/linux/futex-internal.h:205 #1 do_futex_wait (sem=sem@entry=0xb388e864 , abstime=0x0) at sem_waitcommon.c:115 #2 0xb6e8c158 in __new_sem_wait_slow (sem=0xb388e864 , abstime=0x0) at sem_waitcommon.c:282 #3 0xb3875084 in tvservice_notify_func () from /opt/vc/lib/libbcm_host.so #4 0xb383ccc4 in vcos_thread_entry (arg=0xb388e878 ) at /home/dc4/projects/staging/userland/interface/vcos/pthreads/vcos_pthreads.c:144 #5 0xb6e82fc4 in start_thread (arg=0xb2771470) at pthread_create.c:335 #6 0xb6e0ebc8 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76 from /lib/arm-linux-gnueabihf/libc.so.6 Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 12 (Thread 0xb2f71470 (LWP 1245)): #0 0xb6e8c014 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=1, futex_word=0xb388f6e8 ) at ../sysdeps/unix/sysv/linux/futex-internal.h:205 #1 do_futex_wait (sem=sem@entry=0xb388f6e8 , abstime=0x0) at sem_waitcommon.c:115 #2 0xb6e8c158 in __new_sem_wait_slow (sem=0xb388f6e8 , abstime=0x0) at sem_waitcommon.c:282 #3 0xb3879150 in dispmanx_notify_func () from /opt/vc/lib/libbcm_host.so #4 0xb383ccc4 in vcos_thread_entry (arg=0xb3890428 ) at /home/dc4/projects/staging/userland/interface/vcos/pthreads/vcos_pthreads.c:144 #5 0xb6e82fc4 in start_thread (arg=0xb2f71470) at pthread_create.c:335 #6 0xb6e0ebc8 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76 from /lib/arm-linux-gnueabihf/libc.so.6 Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 11 (Thread 0xb3771470 (LWP 1244)): #0 0xb6e0780c in ioctl () at ../sysdeps/unix/syscall-template.S:84 #1 0xb3856010 in completion_thread () from /opt/vc/lib/libvchiq_arm.so #2 0xb383ccc4 in vcos_thread_entry (arg=0xb3869318 ) at /home/dc4/projects/staging/userland/interface/vcos/pthreads/vcos_pthreads.c:144 #3 0xb6e82fc4 in start_thread (arg=0xb3771470) at pthread_create.c:335 #4 0xb6e0ebc8 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76 from /lib/arm-linux-gnueabihf/libc.so.6 Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 10 (Thread 0xb39ff470 (LWP 1243)): #0 0xb6e8e4cc in __waitpid (pid=1259, stat_loc=0xb39fd918, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29 #1 0x000bbb44 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 9 (Thread 0xb3aff470 (LWP 1242)): #0 0xb6e89ce8 in __pthread_cond_timedwait (cond=0xb3e0c848, mutex=0xb3e0c878, abstime=0xb3afed60) at pthread_cond_timedwait.c:198 #1 0x001918c0 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 8 (Thread 0xb3bff470 (LWP 1241)): #0 0xb6e89ce8 in __pthread_cond_timedwait (cond=0xb3e0c848, mutex=0xb3e0c878, abstime=0xb3bfed60) at pthread_cond_timedwait.c:198 #1 0x001918c0 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 7 (Thread 0xb3fcf470 (LWP 1240)): #0 0xb6e89ce8 in __pthread_cond_timedwait (cond=0x3260c0, mutex=0x3260a8, abstime=0xb3fced54) at pthread_cond_timedwait.c:198 #1 0x002488f4 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 6 (Thread 0xb3cff470 (LWP 1239)): #0 0xb6e89ce8 in __pthread_cond_timedwait (cond=0x1a30930, mutex=0x1a30914, abstime=0xb3cfe35c) at pthread_cond_timedwait.c:198 #1 0x0021caf8 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 5 (Thread 0xb3dff470 (LWP 1238)): #0 0xb6e8d6a0 in accept () at ../sysdeps/unix/syscall-template.S:84 #1 0x0022e1c0 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 4 (Thread 0xb40cf470 (LWP 1237)): #0 0xb6e8d6a0 in accept () at ../sysdeps/unix/syscall-template.S:84 #1 0x0022e1c0 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 3 (Thread 0xb6abb470 (LWP 1236)): #0 0xb6e8c014 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=1, futex_word=0x31d8c0) at ../sysdeps/unix/sysv/linux/futex-internal.h:205 #1 do_futex_wait (sem=sem@entry=0x31d8c0, abstime=0x0) at sem_waitcommon.c:115 #2 0xb6e8c158 in __new_sem_wait_slow (sem=0x31d8c0, abstime=0x0) at sem_waitcommon.c:282 #3 0x001ac174 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 2 (Thread 0xb63ff470 (LWP 1235)): #0 0xb6e8994c in __pthread_cond_wait (cond=0x3258f0, mutex=0x3258bc) at pthread_cond_wait.c:186 #1 0x002158e8 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 1 (Thread 0xb6fb4000 (LWP 1234)): #0 0xb6e8d3c0 in read () at ../sysdeps/unix/syscall-template.S:84 #1 0x0021f17c in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?)

================================================================= Got a SIGABRT while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application.

Abgebrochen

#10  

After I get this message it works OK...and stays stable!

Raspberry EZBPi Version: 2019.7.22.1 Verbose logging is: False Serial port is: /dev/serial0 EZB: TCP Started on port 23 EZ-B Server started on TCP Port: 23 Camera: TCP Started on port 24 Camera Server started on TCP Port: 24 Press ESC to quit Camera: TCP Connection from: 192.168.178.61 Camera: TCP Connection from: 192.168.178.61 mmal: mmal_port_enable: vc.ril.camera:ctr:0(0xb14e26c0) already enabled Camera disconnected on tty:1 Camera disconnected on tty:0 Camera: TCP Connection from: 192.168.178.61

PRO
Canada
#11  

From the logs it looks like there are two connections from ARC to EZBPi camera server are being made. (Two Camera: TCP Connection from: 192.168.178.61 log records). Do you know why this might be? Are you by any chance running two ARCs or have two camera controls added to the project?

#12  

The thing that happens is the following... If I try and connect for the first time it refuses to connect because of a timeout, then if I connect again...same thing. It seems to try tty:1 and tty:0  So if I connect for the third time, and keep connecting fast, it works! It is not totally stable though, it stays put for maybe 15min and then drops out most of the times!

But one thing I should mention is, the Pi Zero is also having the Vision Bonnet as a hat, and the camera runs thru the Vision Bonnet! I was able to use it with other applications just like the ordinary Raspberry Pi Camera, but this could also be something to keep in mind!

Did you try the Camera on a Pi Zero? I will do some further testing on the Raspberry Pi 3, just to check for stability and performance!

PRO
Canada
#13  

Thanks for the explanation and the effort:). I don't have an Pi Zero but I will try to reproduce this issue on mine and see if there's anything to improve in the code. My guess is that the lower processing capacity of Zero is causing the instability issues and you shouldn't have problems like that with Pi 3.

#14  

Thanks for taking a closer look, my robot cannot fit a Raspberry Pi 3 into its head, so I am kind of depending to get this going on a Pi Zero! Maybe someone could also give the EZBPi Server a try on the Pi Zero, just to confirm the issue?

I will mark this as solved for now, but it would be very cool if we would get a EZBPi Server that runs stable on the Pi Zero... If possible!:)

#15   — Edited

So after experiencing more crashes, I went back to check my wiring... And it seems that I just wanted to be too smart, trying to power the Pi Zero with the Vision Bonnets GPIOs!

If I am using the Micro USB slot, which is meant for powering the Pi, everything works fine!

I am still having trouble to get the connection established, but when the camera is connected, the server is running stable! So it seems like the Pi Zero has enough power to send the camera stream without crashing!:)

PRO
Canada
#16  

Neat! Saves me some debugging time;)