GRIP icon indicating copy to clipboard operation
GRIP copied to clipboard

Add Source (IP Camera on RasPi 3B+) crashed

Open cpeppler01 opened this issue 7 years ago • 1 comments
trafficstars

Please describe what actions we can take to reproduce the bug you found, including the error message.

Here is my environment. GRIP is running on a Windows 10 laptop. I was able to use GRIP with a static image, and follow through the initial tutorial provided (thank you).

For a live feed, I have a Raspberry Pi (Pi3 B+) with a standard Pi Camera (version 2.2?). Per instructions, I executed: sudo modprobe bcm2835-v4l2 and am able to see /dev/video0

I installed RPi_Cam_Web_Interface(https://elinux.org/RPi-Cam-Web-Interface), and tested it using a browser on the Windows 10 laptop. Worked great.

I then started GRIP on the Windows 10 laptop, and selected Add Source->IP Camera-> and entered the IP address of the webcam (http://raspi/webcam), and it crashed.

With this setup, I can see where the output of RPi-Cam-Web-Interface is an HTML page with a live webcam embedded in it, which may give GRIP indigestion. If that is the problem, what is your recommendation for pulling the webcam stream directly from the Pi as an IP Camera?

Here is the stack trace from GRIP:

Thread[JavaFX Application Thread,5,main] threw an exception

Stack Trace:

java.lang.IllegalStateException: Can not start while in state STARTING. Must be in one of states: NEW, FAILED, TERMINATED
	at edu.wpi.grip.core.util.service.AutoRestartingService.startAsync(AutoRestartingService.java:123)
	at edu.wpi.grip.core.util.service.AutoRestartingService.startAsync(AutoRestartingService.java:108)
	at edu.wpi.grip.core.sources.CameraSource.startAsync(CameraSource.java:270)
	at edu.wpi.grip.core.sources.CameraSource.startAsync(CameraSource.java:46)
	at edu.wpi.grip.ui.components.StartStoppableButton.lambda$new$1(StartStoppableButton.java:64)
	at com.sun.javafx.event.CompositeEventHandler$NormalEventFilterRecord.handleCapturingEvent(CompositeEventHandler.java:282)
	at com.sun.javafx.event.CompositeEventHandler.dispatchCapturingEvent(CompositeEventHandler.java:98)
	at com.sun.javafx.event.EventHandlerManager.dispatchCapturingEvent(EventHandlerManager.java:223)
	at com.sun.javafx.event.EventHandlerManager.dispatchCapturingEvent(EventHandlerManager.java:180)
	at com.sun.javafx.event.CompositeEventDispatcher.dispatchCapturingEvent(CompositeEventDispatcher.java:43)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:52)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
	at javafx.event.Event.fireEvent(Event.java:198)
	at javafx.scene.Scene$MouseHandler.process(Scene.java:3757)
	at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485)
	at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)
	at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:380)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:294)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$354(GlassViewEventHandler.java:416)
	at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:415)
	at com.sun.glass.ui.View.handleMouseEvent(View.java:555)
	at com.sun.glass.ui.View.notifyMouse(View.java:937)
	at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
	at java.lang.Thread.run(Thread.java:745)

System Info:

Property Name Property
GRIP Version v1.5.2
java.version 1.8.0_101
javafx.version 8.0.101
os.name Windows 10
os.version 10.0
os.arch amd64

cpeppler01 avatar Apr 29 '18 21:04 cpeppler01

With this setup, I can see where the output of RPi-Cam-Web-Interface is an HTML page with a live webcam embedded in it, which may give GRIP indigestion. If that is the problem, what is your recommendation for pulling the webcam stream directly from the Pi as an IP Camera?

You want to be using the address of the MJPEG stream, not the address of the webpage that it is being rendered within.

You can right click on the video feed and get the address of that stream specifically, that's what you want.

JLLeitschuh avatar May 01 '18 16:05 JLLeitschuh