Open djturbo opened 10 years ago
Hi,
Thank you for the report.
Can you please clarify what Webcam Capture API version are you using?
Hi, Thanks for your reply. I've trying with 0.3.9 version and 0.3.10-RC6 too. Yesterday later i tryed on Windows 7 and work find. The cam work fine on Mac Mavericks, for example on Skype.
Thanks very much.
Can you please try it again with 0.3.10-RC6 and perform stack trace dump from all Java threads? Please include stack traces in this ticket - this will help us to understand what the problem is and what threads are blocking.
Hi, How can I perform a stack trace dump from all javathreads?
I suggest using jstack
(it's part of JDK) but you can choose another method :)
https://www.google.fr/search?q=threads+dump+java+mac+osx
If you are running your application in IDE (e.g. Eclipse or Netbeans) make sure to dump your application (!) threads stack traces and not IDE.
Hello here the dump:
HERMES-2:~ francisco$ sudo jstack -F 2352
Attaching to process ID 2352, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.0-b57
Deadlock Detection:
No deadlocks found.
Thread 79623: (state = BLOCKED)
- java.lang.Thread.sleep(long) @bci=0 (Interpreted frame)
- com.github.sarxos.webcam.WebcamLock$LockUpdater.run() @bci=24, line=60 (Interpreted frame)
Thread 60619: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame)
- java.util.concurrent.SynchronousQueue$TransferQueue.awaitFulfill(java.util.concurrent.SynchronousQueue$TransferQueue$QNode, java.lang.Object, boolean, long) @bci=138, line=762 (Interpreted frame)
- java.util.concurrent.SynchronousQueue$TransferQueue.transfer(java.lang.Object, boolean, long) @bci=148, line=695 (Interpreted frame)
- java.util.concurrent.SynchronousQueue.put(java.lang.Object) @bci=19, line=877 (Interpreted frame)
- com.github.sarxos.webcam.WebcamProcessor$AtomicProcessor.process(com.github.sarxos.webcam.WebcamTask) @bci=5, line=53 (Interpreted frame)
- com.github.sarxos.webcam.WebcamProcessor.process(com.github.sarxos.webcam.WebcamTask) @bci=37, line=122 (Interpreted frame)
- com.github.sarxos.webcam.WebcamTask.process() @bci=29, line=38 (Interpreted frame)
- com.github.sarxos.webcam.ds.buildin.WebcamDefaultDriver$GetDevicesTask.getDevices(com.github.sarxos.webcam.ds.buildin.natives.OpenIMAJGrabber) @bci=6, line=80 (Interpreted frame)
- com.github.sarxos.webcam.ds.buildin.WebcamDefaultDriver.getDevices() @bci=53, line=125 (Interpreted frame)
- com.github.sarxos.webcam.WebcamDiscoveryService.scan() @bci=8, line=155 (Interpreted frame)
- com.github.sarxos.webcam.WebcamDiscoveryService.run() @bci=89, line=264 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=744 (Interpreted frame)
Thread 77851: (state = IN_NATIVE)
- com.github.sarxos.webcam.ds.buildin.natives.OpenIMAJGrabber.getVideoDevices() @bci=0 (Interpreted frame)
- com.github.sarxos.webcam.ds.buildin.WebcamDefaultDevice.open() @bci=78, line=247 (Interpreted frame)
- com.github.sarxos.webcam.ds.cgt.WebcamOpenTask.handle() @bci=55, line=38 (Interpreted frame)
- com.github.sarxos.webcam.WebcamProcessor$AtomicProcessor.run() @bci=14, line=66 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=95, line=1142 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=744 (Interpreted frame)
Thread 54799: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2039 (Compiled frame)
- java.util.concurrent.ArrayBlockingQueue.take() @bci=20, line=403 (Interpreted frame)
- com.jolbox.bonecp.PoolWatchThread.run() @bci=93, line=75 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=95, line=1142 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=744 (Interpreted frame)
Thread 15119: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2039 (Compiled frame)
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=100, line=1088 (Interpreted frame)
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=1, line=809 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Compiled frame)
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=744 (Interpreted frame)
Thread 75527: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2039 (Compiled frame)
- java.util.concurrent.ArrayBlockingQueue.take() @bci=20, line=403 (Interpreted frame)
- com.jolbox.bonecp.PoolWatchThread.run() @bci=93, line=75 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=95, line=1142 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=744 (Interpreted frame)
Thread 31543: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2039 (Compiled frame)
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=100, line=1088 (Interpreted frame)
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=1, line=809 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Compiled frame)
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=744 (Interpreted frame)
Thread 59923: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2039 (Compiled frame)
- java.util.concurrent.ArrayBlockingQueue.take() @bci=20, line=403 (Interpreted frame)
- com.jolbox.bonecp.PoolWatchThread.run() @bci=93, line=75 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=95, line=1142 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=744 (Interpreted frame)
Thread 59403: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long) @bci=20, line=215 (Interpreted frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) @bci=78, line=2078 (Interpreted frame)
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=124, line=1093 (Interpreted frame)
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=1, line=809 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Compiled frame)
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=744 (Interpreted frame)
Thread 32527: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Compiled frame; information may be imprecise)
- java.lang.ref.ReferenceQueue.remove(long) @bci=44, line=142 (Compiled frame)
- java.lang.ref.ReferenceQueue.remove() @bci=2, line=158 (Compiled frame)
- com.google.common.base.internal.Finalizer.run() @bci=5, line=125 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=744 (Interpreted frame)
Thread 70659: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2039 (Compiled frame)
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=24, line=1081 (Interpreted frame)
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=1, line=809 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=744 (Interpreted frame)
Thread 58375: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.ref.ReferenceQueue.remove(long) @bci=44, line=142 (Compiled frame)
- java.lang.ref.ReferenceQueue.remove() @bci=2, line=158 (Compiled frame)
- com.sun.webkit.Disposer.run() @bci=3, line=68 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=744 (Interpreted frame)
Thread 57363: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Compiled frame; information may be imprecise)
- java.lang.ref.ReferenceQueue.remove(long) @bci=44, line=142 (Compiled frame)
- com.mysql.jdbc.AbandonedConnectionCleanupThread.run() @bci=16, line=40 (Interpreted frame)
Thread 51219: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Compiled frame; information may be imprecise)
- java.lang.ref.ReferenceQueue.remove(long) @bci=44, line=142 (Compiled frame)
- java.lang.ref.ReferenceQueue.remove() @bci=2, line=158 (Compiled frame)
- com.sun.javafx.font.Disposer.run() @bci=3, line=93 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=744 (Interpreted frame)
Thread 50951: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Interpreted frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt() @bci=1, line=836 (Interpreted frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(int) @bci=72, line=997 (Interpreted frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(int) @bci=24, line=1304 (Interpreted frame)
- java.util.concurrent.CountDownLatch.await() @bci=5, line=231 (Interpreted frame)
- com.sun.javafx.application.LauncherImpl.launchApplication1(java.lang.Class, java.lang.Class, java.lang.String[]) @bci=404, line=848 (Interpreted frame)
- com.sun.javafx.application.LauncherImpl.access$000(java.lang.Class, java.lang.Class, java.lang.String[]) @bci=3, line=56 (Interpreted frame)
- com.sun.javafx.application.LauncherImpl$1.run() @bci=12, line=158 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=744 (Interpreted frame)
Thread 37123: (state = IN_NATIVE)
Thread 3335: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame)
- java.util.concurrent.SynchronousQueue$TransferQueue.awaitFulfill(java.util.concurrent.SynchronousQueue$TransferQueue$QNode, java.lang.Object, boolean, long) @bci=138, line=762 (Interpreted frame)
- java.util.concurrent.SynchronousQueue$TransferQueue.transfer(java.lang.Object, boolean, long) @bci=148, line=695 (Interpreted frame)
- java.util.concurrent.SynchronousQueue.take() @bci=7, line=924 (Interpreted frame)
- com.github.sarxos.webcam.WebcamProcessor$AtomicProcessor.process(com.github.sarxos.webcam.WebcamTask) @bci=12, line=55 (Interpreted frame)
- com.github.sarxos.webcam.WebcamProcessor.process(com.github.sarxos.webcam.WebcamTask) @bci=37, line=122 (Interpreted frame)
- com.github.sarxos.webcam.WebcamTask.process() @bci=29, line=38 (Interpreted frame)
- com.github.sarxos.webcam.ds.cgt.WebcamOpenTask.open() @bci=1, line=20 (Interpreted frame)
- com.github.sarxos.webcam.Webcam.open(boolean) @bci=77, line=189 (Interpreted frame)
- com.github.sarxos.webcam.Webcam.open() @bci=2, line=149 (Interpreted frame)
- es.mascreacion.MSControl.client.controller.VideoCaptureController$2.handle(javafx.concurrent.WorkerStateEvent) @bci=71, line=188 (Interpreted frame)
- es.mascreacion.MSControl.client.controller.VideoCaptureController$2.handle(javafx.event.Event) @bci=5, line=179 (Interpreted frame)
- com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(javafx.event.Event) @bci=51, line=86 (Compiled frame)
- com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(javafx.event.EventType, javafx.event.Event) @bci=29, line=238 (Compiled frame)
- com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(javafx.event.Event) @bci=8, line=191 (Compiled frame)
- com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(javafx.event.Event, javafx.event.EventDispatchChain) @bci=29, line=58 (Compiled frame)
- com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(javafx.event.Event) @bci=69, line=114 (Compiled frame)
- com.sun.javafx.event.EventUtil.fireEventImpl(javafx.event.EventDispatchChain, javafx.event.EventTarget, javafx.event.Event) @bci=10, line=74 (Compiled frame)
- com.sun.javafx.event.EventUtil.fireEvent(javafx.event.EventTarget, javafx.event.Event) @bci=46, line=54 (Compiled frame)
- javafx.event.Event.fireEvent(javafx.event.EventTarget, javafx.event.Event) @bci=30, line=203 (Compiled frame)
- javafx.concurrent.EventHelper.fireEvent(javafx.event.Event) @bci=5, line=219 (Interpreted frame)
- javafx.concurrent.Task.fireEvent(javafx.event.Event) @bci=9, line=1357 (Interpreted frame)
- javafx.concurrent.Task.setState(javafx.concurrent.Worker$State) @bci=207, line=720 (Interpreted frame)
- javafx.concurrent.Task$TaskCallable$2.run() @bci=24, line=1438 (Interpreted frame)
- com.sun.javafx.application.PlatformImpl$6$1.run() @bci=7, line=297 (Compiled frame)
- com.sun.javafx.application.PlatformImpl$6$1.run() @bci=1, line=294 (Compiled frame)
- java.security.AccessController.doPrivileged(java.security.PrivilegedAction, java.security.AccessControlContext) @bci=0 (Compiled frame)
- com.sun.javafx.application.PlatformImpl$6.run() @bci=12, line=294 (Compiled frame)
- com.sun.glass.ui.InvokeLaterDispatcher$Future.run() @bci=4, line=95 (Compiled frame)
Thread 27395: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Compiled frame; information may be imprecise)
- java.lang.Object.wait() @bci=2, line=502 (Compiled frame)
- com.sun.glass.ui.InvokeLaterDispatcher.run() @bci=112, line=126 (Interpreted frame)
Thread 23299: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2039 (Compiled frame)
- java.util.concurrent.LinkedBlockingQueue.take() @bci=29, line=442 (Compiled frame)
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Compiled frame)
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame)
- com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run() @bci=8, line=129 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=744 (Interpreted frame)
Thread 19715: (state = BLOCKED)
Thread 14595: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Compiled frame; information may be imprecise)
- java.lang.ref.ReferenceQueue.remove(long) @bci=44, line=142 (Compiled frame)
- java.lang.ref.ReferenceQueue.remove() @bci=2, line=158 (Compiled frame)
- java.lang.ref.Finalizer$FinalizerThread.run() @bci=16, line=189 (Interpreted frame)
Thread 14083: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Compiled frame; information may be imprecise)
- java.lang.Object.wait() @bci=2, line=502 (Compiled frame)
- java.lang.ref.Reference$ReferenceHandler.run() @bci=36, line=157 (Interpreted frame)
Thread 6403: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Interpreted frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt() @bci=1, line=836 (Interpreted frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(int) @bci=72, line=997 (Interpreted frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(int) @bci=24, line=1304 (Interpreted frame)
- java.util.concurrent.CountDownLatch.await() @bci=5, line=231 (Interpreted frame)
- com.sun.javafx.application.LauncherImpl.launchApplication(java.lang.Class, java.lang.Class, java.lang.String[]) @bci=154, line=177 (Interpreted frame)
- com.sun.javafx.application.LauncherImpl.launchApplication(java.lang.Class, java.lang.String[]) @bci=5, line=118 (Interpreted frame)
- javafx.application.Application.launch(java.lang.String[]) @bci=135, line=241 (Interpreted frame)
- es.mascreacion.MSControl.client.SimpleRestApp.main(java.lang.String[]) @bci=1, line=73 (Interpreted frame)
- sun.reflect.NativeMethodAccessorImpl.invoke0(java.lang.reflect.Method, java.lang.Object, java.lang.Object[]) @bci=0 (Interpreted frame)
- sun.reflect.NativeMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=87, line=57 (Interpreted frame)
- sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=6, line=43 (Interpreted frame)
- java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) @bci=56, line=483 (Interpreted frame)
- com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(java.lang.String, java.lang.String, java.lang.String[]) @bci=147, line=367 (Interpreted frame)
- sun.reflect.NativeMethodAccessorImpl.invoke0(java.lang.reflect.Method, java.lang.Object, java.lang.Object[]) @bci=0 (Interpreted frame)
- sun.reflect.NativeMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=87, line=57 (Interpreted frame)
- sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=6, line=43 (Interpreted frame)
- java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) @bci=56, line=483 (Interpreted frame)
- com.sun.javafx.application.LauncherImpl.launchApplication(java.lang.String, java.lang.String, java.lang.String[]) @bci=381, line=300 (Interpreted frame)
- sun.reflect.NativeMethodAccessorImpl.invoke0(java.lang.reflect.Method, java.lang.Object, java.lang.Object[]) @bci=0 (Interpreted frame)
- sun.reflect.NativeMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=87, line=57 (Interpreted frame)
- sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=6, line=43 (Interpreted frame)
- java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) @bci=56, line=483 (Interpreted frame)
- sun.launcher.LauncherHelper$FXHelper.main(java.lang.String[]) @bci=52, line=767 (Interpreted frame)
Hi,
Thank you for the details. This information was very helpful.
Can you please check with this JAR? I made a small change in the code and hope it will fix your issue.
Thanks very much for your reply and your magnific work. I'm tring the new jar but give an error:
21:00:04.215 [Thread-5] INFO com.github.sarxos.webcam.Webcam - WebcamDefaultDriver capture driver will be used
21:00:04.218 [webcam-discovery-service] DEBUG c.g.s.w.d.b.WebcamDefaultDriver - Searching devices
com.github.sarxos.webcam.WebcamException: java.util.concurrent.ExecutionException: com.github.sarxos.webcam.WebcamException: Cannot execute task
at com.github.sarxos.webcam.WebcamDiscoveryService.getWebcams(WebcamDiscoveryService.java:123)
at com.github.sarxos.webcam.Webcam.getWebcams(Webcam.java:705)
at com.github.sarxos.webcam.Webcam.getWebcams(Webcam.java:678)
at com.github.sarxos.webcam.Webcam.getWebcams(Webcam.java:658)
at es.mascreacion.MSControl.client.controller.VideoCaptureController$1.call(VideoCaptureController.java:174)
at es.mascreacion.MSControl.client.controller.VideoCaptureController$1.call(VideoCaptureController.java:1)
at javafx.concurrent.Task$TaskCallable.call(Task.java:1426)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.util.concurrent.ExecutionException: com.github.sarxos.webcam.WebcamException: Cannot execute task
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at com.github.sarxos.webcam.WebcamDiscoveryService.getWebcams(WebcamDiscoveryService.java:115)
... 8 more
Caused by: com.github.sarxos.webcam.WebcamException: Cannot execute task
at com.github.sarxos.webcam.WebcamProcessor$AtomicProcessor.process(WebcamProcessor.java:62)
at com.github.sarxos.webcam.WebcamProcessor.process(WebcamProcessor.java:130)
at com.github.sarxos.webcam.WebcamTask.process(WebcamTask.java:38)
at com.github.sarxos.webcam.ds.buildin.WebcamDefaultDriver$WebcamNewGrabberTask.newGrabber(WebcamDefaultDriver.java:46)
at com.github.sarxos.webcam.ds.buildin.WebcamDefaultDriver.getDevices(WebcamDefaultDriver.java:118)
at com.github.sarxos.webcam.WebcamDiscoveryService$WebcamsDiscovery.call(WebcamDiscoveryService.java:36)
at com.github.sarxos.webcam.WebcamDiscoveryService$WebcamsDiscovery.call(WebcamDiscoveryService.java:26)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
... 1 more
Caused by: java.lang.NoClassDefFoundError: org/bridj/cpp/CPPObject
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:455)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:367)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.github.sarxos.webcam.ds.buildin.WebcamDefaultDriver$WebcamNewGrabberTask.handle(WebcamDefaultDriver.java:56)
at com.github.sarxos.webcam.WebcamProcessor$AtomicProcessor.run(WebcamProcessor.java:71)
... 3 more
Caused by: java.lang.ClassNotFoundException: org.bridj.cpp.CPPObject
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 17 more
You are missing BridJ JAR in application classpath. Make sure to add it in the same way as you did with Webcam Capture JAR. BridJ can be found in Maven Central (outdated) or in official ZIP (newest snapshot, in libs
subdirectory):
Please include other JARs from libs
too (i.e. SLF4J).
Good Morning, I've just tried and this is the output stack thread:
Attaching to process ID 3658, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.0-b57
Deadlock Detection:
No deadlocks found.
Thread 51215: (state = BLOCKED)
- java.lang.Thread.sleep(long) @bci=0 (Interpreted frame)
- com.github.sarxos.webcam.WebcamLock$LockUpdater.run() @bci=24, line=60 (Interpreted frame)
Thread 52239: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Interpreted frame)
- java.util.concurrent.SynchronousQueue$TransferQueue.awaitFulfill(java.util.concurrent.SynchronousQueue$TransferQueue$QNode, java.lang.Object, boolean, long) @bci=138, line=762 (Interpreted frame)
- java.util.concurrent.SynchronousQueue$TransferQueue.transfer(java.lang.Object, boolean, long) @bci=148, line=695 (Interpreted frame)
- java.util.concurrent.SynchronousQueue.put(java.lang.Object) @bci=19, line=877 (Interpreted frame)
- com.github.sarxos.webcam.WebcamProcessor$AtomicProcessor.process(com.github.sarxos.webcam.WebcamTask) @bci=5, line=58 (Interpreted frame)
- com.github.sarxos.webcam.WebcamProcessor.process(com.github.sarxos.webcam.WebcamTask) @bci=51, line=130 (Interpreted frame)
- com.github.sarxos.webcam.WebcamTask.process() @bci=29, line=38 (Interpreted frame)
- com.github.sarxos.webcam.ds.buildin.WebcamDefaultDriver$GetDevicesTask.getDevices(com.github.sarxos.webcam.ds.buildin.natives.OpenIMAJGrabber) @bci=6, line=80 (Interpreted frame)
- com.github.sarxos.webcam.ds.buildin.WebcamDefaultDriver.getDevices() @bci=53, line=125 (Interpreted frame)
- com.github.sarxos.webcam.WebcamDiscoveryService.scan() @bci=8, line=155 (Interpreted frame)
- com.github.sarxos.webcam.WebcamDiscoveryService.run() @bci=67, line=261 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=744 (Interpreted frame)
Thread 53251: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.ref.ReferenceQueue.remove(long) @bci=44, line=142 (Interpreted frame)
- java.lang.ref.ReferenceQueue.remove() @bci=2, line=158 (Interpreted frame)
- com.sun.javafx.font.Disposer.run() @bci=3, line=93 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=744 (Interpreted frame)
Thread 52739: (state = IN_NATIVE)
- com.github.sarxos.webcam.ds.buildin.natives.OpenIMAJGrabber.startSession(int, int, double, org.bridj.Pointer) @bci=0 (Interpreted frame)
- com.github.sarxos.webcam.ds.buildin.WebcamDefaultDevice.open() @bci=102, line=240 (Interpreted frame)
- com.github.sarxos.webcam.ds.cgt.WebcamOpenTask.handle() @bci=55, line=38 (Interpreted frame)
- com.github.sarxos.webcam.WebcamProcessor$AtomicProcessor.run() @bci=14, line=71 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=95, line=1142 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=744 (Interpreted frame)
Thread 51715: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Interpreted frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt() @bci=1, line=836 (Interpreted frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(int) @bci=72, line=997 (Interpreted frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(int) @bci=24, line=1304 (Interpreted frame)
- java.util.concurrent.CountDownLatch.await() @bci=5, line=231 (Interpreted frame)
- com.sun.javafx.application.LauncherImpl.launchApplication1(java.lang.Class, java.lang.Class, java.lang.String[]) @bci=404, line=848 (Interpreted frame)
- com.sun.javafx.application.LauncherImpl.access$000(java.lang.Class, java.lang.Class, java.lang.String[]) @bci=3, line=56 (Interpreted frame)
- com.sun.javafx.application.LauncherImpl$1.run() @bci=12, line=158 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=744 (Interpreted frame)
Thread 37379: (state = IN_NATIVE)
Thread 3335: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Interpreted frame)
- java.util.concurrent.SynchronousQueue$TransferQueue.awaitFulfill(java.util.concurrent.SynchronousQueue$TransferQueue$QNode, java.lang.Object, boolean, long) @bci=138, line=762 (Interpreted frame)
- java.util.concurrent.SynchronousQueue$TransferQueue.transfer(java.lang.Object, boolean, long) @bci=148, line=695 (Interpreted frame)
- java.util.concurrent.SynchronousQueue.take() @bci=7, line=924 (Interpreted frame)
- com.github.sarxos.webcam.WebcamProcessor$AtomicProcessor.process(com.github.sarxos.webcam.WebcamTask) @bci=12, line=60 (Interpreted frame)
- com.github.sarxos.webcam.WebcamProcessor.process(com.github.sarxos.webcam.WebcamTask) @bci=51, line=130 (Interpreted frame)
- com.github.sarxos.webcam.WebcamTask.process() @bci=29, line=38 (Interpreted frame)
- com.github.sarxos.webcam.ds.cgt.WebcamOpenTask.open() @bci=1, line=20 (Interpreted frame)
- com.github.sarxos.webcam.Webcam.open(boolean) @bci=77, line=189 (Interpreted frame)
- com.github.sarxos.webcam.Webcam.open() @bci=2, line=149 (Interpreted frame)
- es.mascreacion.MSControl.client.controller.VideoCaptureController$2.handle(javafx.concurrent.WorkerStateEvent) @bci=70, line=188 (Interpreted frame)
- es.mascreacion.MSControl.client.controller.VideoCaptureController$2.handle(javafx.event.Event) @bci=5, line=1 (Interpreted frame)
- com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(javafx.event.Event) @bci=51, line=86 (Interpreted frame)
- com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(javafx.event.EventType, javafx.event.Event) @bci=29, line=238 (Interpreted frame)
- com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(javafx.event.Event) @bci=8, line=191 (Interpreted frame)
- com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(javafx.event.Event, javafx.event.EventDispatchChain) @bci=29, line=58 (Interpreted frame)
- com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(javafx.event.Event) @bci=69, line=114 (Interpreted frame)
- com.sun.javafx.event.EventUtil.fireEventImpl(javafx.event.EventDispatchChain, javafx.event.EventTarget, javafx.event.Event) @bci=10, line=74 (Interpreted frame)
- com.sun.javafx.event.EventUtil.fireEvent(javafx.event.EventTarget, javafx.event.Event) @bci=46, line=54 (Interpreted frame)
- javafx.event.Event.fireEvent(javafx.event.EventTarget, javafx.event.Event) @bci=30, line=203 (Interpreted frame)
- javafx.concurrent.EventHelper.fireEvent(javafx.event.Event) @bci=5, line=219 (Interpreted frame)
- javafx.concurrent.Task.fireEvent(javafx.event.Event) @bci=9, line=1357 (Interpreted frame)
- javafx.concurrent.Task.setState(javafx.concurrent.Worker$State) @bci=207, line=720 (Interpreted frame)
- javafx.concurrent.Task$TaskCallable$2.run() @bci=24, line=1438 (Interpreted frame)
- com.sun.javafx.application.PlatformImpl$6$1.run() @bci=7, line=297 (Interpreted frame)
- com.sun.javafx.application.PlatformImpl$6$1.run() @bci=1, line=294 (Interpreted frame)
- java.security.AccessController.doPrivileged(java.security.PrivilegedAction, java.security.AccessControlContext) @bci=0 (Interpreted frame)
- com.sun.javafx.application.PlatformImpl$6.run() @bci=12, line=294 (Interpreted frame)
- com.sun.glass.ui.InvokeLaterDispatcher$Future.run() @bci=4, line=95 (Interpreted frame)
Thread 27395: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.Object.wait() @bci=2, line=502 (Interpreted frame)
- com.sun.glass.ui.InvokeLaterDispatcher.run() @bci=112, line=126 (Interpreted frame)
Thread 23299: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Interpreted frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2039 (Interpreted frame)
- java.util.concurrent.LinkedBlockingQueue.take() @bci=29, line=442 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame)
- com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run() @bci=8, line=129 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=744 (Interpreted frame)
Thread 19715: (state = BLOCKED)
Thread 14595: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.ref.ReferenceQueue.remove(long) @bci=44, line=142 (Compiled frame)
- java.lang.ref.ReferenceQueue.remove() @bci=2, line=158 (Compiled frame)
- java.lang.ref.Finalizer$FinalizerThread.run() @bci=16, line=189 (Interpreted frame)
Thread 14083: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.lang.Object.wait() @bci=2, line=502 (Interpreted frame)
- java.lang.ref.Reference$ReferenceHandler.run() @bci=36, line=157 (Interpreted frame)
Thread 6403: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Interpreted frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt() @bci=1, line=836 (Interpreted frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(int) @bci=72, line=997 (Interpreted frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(int) @bci=24, line=1304 (Interpreted frame)
- java.util.concurrent.CountDownLatch.await() @bci=5, line=231 (Interpreted frame)
- com.sun.javafx.application.LauncherImpl.launchApplication(java.lang.Class, java.lang.Class, java.lang.String[]) @bci=154, line=177 (Interpreted frame)
- com.sun.javafx.application.LauncherImpl.launchApplication(java.lang.Class, java.lang.String[]) @bci=5, line=118 (Interpreted frame)
- javafx.application.Application.launch(java.lang.String[]) @bci=135, line=241 (Interpreted frame)
- es.mascreacion.MSControl.client.controller.TestWebcam.main(java.lang.String[]) @bci=1, line=23 (Interpreted frame)
- sun.reflect.NativeMethodAccessorImpl.invoke0(java.lang.reflect.Method, java.lang.Object, java.lang.Object[]) @bci=0 (Interpreted frame)
- sun.reflect.NativeMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=87, line=57 (Interpreted frame)
- sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=6, line=43 (Interpreted frame)
- java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) @bci=56, line=483 (Interpreted frame)
- com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(java.lang.String, java.lang.String, java.lang.String[]) @bci=147, line=367 (Interpreted frame)
- com.sun.javafx.application.LauncherImpl.launchApplication(java.lang.String, java.lang.String, java.lang.String[]) @bci=409, line=305 (Interpreted frame)
- sun.reflect.NativeMethodAccessorImpl.invoke0(java.lang.reflect.Method, java.lang.Object, java.lang.Object[]) @bci=0 (Interpreted frame)
- sun.reflect.NativeMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=87, line=57 (Interpreted frame)
- sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=6, line=43 (Interpreted frame)
- java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) @bci=56, line=483 (Interpreted frame)
- sun.launcher.LauncherHelper$FXHelper.main(java.lang.String[]) @bci=52, line=767 (Interpreted frame)
from de output log:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/francisco/.m2/repository/ch/qos/logback/logback-classic/1.0.6/logback-classic-1.0.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/francisco/.m2/repository/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
08:38:25,844 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
08:38:25,844 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
08:38:25,844 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/Users/francisco/Documents/Proyectos/MSControl/MSControl-client/target/classes/logback.xml]
08:38:25,875 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
08:38:25,876 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Setting ReconfigureOnChangeFilter scanning period to 30 seconds
08:38:25,876 |-INFO in ReconfigureOnChangeFilter{invocationCounter=0} - Will scan for changes in [[/Users/francisco/Documents/Proyectos/MSControl/MSControl-client/target/classes/logback.xml]] every 30 seconds.
08:38:25,876 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Adding ReconfigureOnChangeFilter as a turbo filter
08:38:25,880 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
08:38:25,883 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
08:38:25,944 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - This appender no longer admits a layout as a sub-component, set an encoder instead.
08:38:25,944 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - To ensure compatibility, wrapping your layout in LayoutWrappingEncoder.
08:38:25,944 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - See also http://logback.qos.ch/codes.html#layoutInsteadOfEncoder for details
08:38:25,944 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to DEBUG
08:38:25,944 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
08:38:25,944 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
08:38:25,945 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@2acb118 - Registering current configuration as safe fallback point
SLF4J: Actual binding is of type [ch.qos.logback.classic.selector.DefaultContextSelector]
08:38:25.952 [Thread-5] INFO com.github.sarxos.webcam.Webcam - WebcamDefaultDriver capture driver will be used
08:38:25.956 [webcam-discovery-service] DEBUG c.g.s.w.d.b.WebcamDefaultDriver - Searching devices
08:38:26.363 [webcam-discovery-service] DEBUG c.g.s.w.d.b.WebcamDefaultDriver - Found device Webcam C170 0x1a143000046d082b
08:38:26.366 [JavaFX Application Thread] DEBUG com.github.sarxos.webcam.Webcam - Setting new resolution 640x480
08:38:26.366 [JavaFX Application Thread] DEBUG com.github.sarxos.webcam.WebcamLock - Lock Webcam Webcam C170 0x1a143000046d082b
08:38:26.368 [atomic-processor-1] INFO c.g.s.webcam.ds.cgt.WebcamOpenTask - Opening webcam Webcam C170 0x1a143000046d082b
08:38:26.368 [atomic-processor-1] DEBUG c.g.s.w.d.b.WebcamDefaultDevice - Opening webcam device Webcam C170 0x1a143000046d082b
08:38:26.368 [atomic-processor-1] DEBUG c.g.s.w.d.b.WebcamDefaultDevice - Webcam device 0x1a143000046d082b starting session, size java.awt.Dimension[width=640,height=480]
08:38:29.367 [webcam-discovery-service] DEBUG c.g.s.w.d.b.WebcamDefaultDriver - Searching devices
If you want, I'ld show my desktop throught chrome remote desktop, or via skype, for best way to resolve the problem. Thanks very much.
the problem look like to be of OS X Mavericks, because my other project with javacv opencv, does not work since I update mavericks from OS X Lion 10.7.4
Hi,
I was looking into native code which hangs, but since I do not have experience with Objective-C, I was not able to find what may be wrong, but my suspicion is same as your's - there may be something wrong with the system and/or cocoa dependencies.
Here is the grabber source code if you would like to check it: (link)
Ok, Thanks you very much.
Hi again, I'm tring already with opencv and javacv and it works. i'm tell this for it's helpfull for you. Thanks very much again.
I have same issue on RC6-10, even try to snapshot. My OS is latest Mavericks and JDK is oracle 1.7.0_55.
I can confirm this code does not work in non-main Thread:
DeviceList list = new OpenIMAJGrabber().getVideoDevices().get();
I assume mavericks has restriction on this?
After further investigation, the problem partial solved. I am using Eclipse which has option to automatically add -XstartOnFirstThread
on running program if the classpath includes "SWT" jar(even the project never use it). After I tick off the option, I get that Swing capture video windows! However, I am not sure if your project is still working with SWT. My target UI is SWT, so I will update here if any process...
FYI, linking the following ticket:
I have a similar issue when trying to access or search from a JavaFX thread. I tried opening the default from JavaFX with no success, but if open the Webcam from the main thread and make the webcam static I can then use it in JavaFX to save the image. Although this requires the webcam to be open constantly.
Hi @msj121, does it appear as well when you run it without -XstartOnFirstThread
?
As you can see above, I've duped this bug and noted that the work around posted on OpenIMAJ does not appear to be reliable:
Hello I'm creating an javafx application with jdk8, it run perfectly on Ubuntu 13.10, but on my OS X Mavericks (hackntosh) it hang up on searching devices, this is the debug console out:
Very good work, very very thanks. HAPPY NEW YEAR!.