Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full demo project also throws a NullPointerException #9

Closed
jsfan3 opened this issue May 15, 2020 · 1 comment
Closed

Full demo project also throws a NullPointerException #9

jsfan3 opened this issue May 15, 2020 · 1 comment

Comments

@jsfan3
Copy link

jsfan3 commented May 15, 2020

The NullPointerException thrown by the demo basic code of the ReadMe (#8), is thrown also by the demo project https://github.com/codenameone/CameraKitCodenameOne/tree/master/CameraKitDemo:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
java.lang.NullPointerException
	at com.codename1.camerakit.impl.CameraNativeAccessImpl.getWebcam(Unknown Source)
	at com.codename1.camerakit.impl.CameraNativeAccessImpl.start(Unknown Source)
	at com.codename1.camerakit.CameraKit.start(CameraKit.java:72)
	at com.codename1.camerakit.demo.CameraKitDemo.start(CameraKitDemo.java:95)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.codename1.impl.javase.Executor$3$1.run(Executor.java:261)
	at com.codename1.ui.Display.processSerialCalls(Display.java:1303)
	at com.codename1.ui.Display.mainEDTLoop(Display.java:1097)
	at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
	at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
/home/francesco/NetBeansProjects/CameraKitCodenameOne-master/CameraKitDemo/nbproject/build-impl.xml:1328: The following error occurred while executing this line:
/home/francesco/NetBeansProjects/CameraKitCodenameOne-master/CameraKitDemo/nbproject/build-impl.xml:980: Java returned: 1
@shannah
Copy link
Collaborator

shannah commented May 22, 2020

I have guarded against the NPE, but it doesn't explain why the lib can't find your system's camera. If you can figure out how to get the webcam lib we use on simulator working on your environment, then we can probably apply the changes in our cn1lib so that it works on your system. The library we use is
https://github.com/sarxos/webcam-capture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants