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

Always crashes #7

Open
tim424 opened this issue Dec 11, 2015 · 18 comments
Open

Always crashes #7

tim424 opened this issue Dec 11, 2015 · 18 comments

Comments

@tim424
Copy link

tim424 commented Dec 11, 2015

I got this error when the sketch tries to start on my device:

FATAL EXCEPTION: Animation Thread
Process: processing.test.generatemachine_android, PID: 14576
java.lang.IllegalArgumentException: This library works only on Android.
at com.yourinventit.processing.android.serial.SerialCommunicatorFacory.create(SerialCommunicatorFacory.java:67)
at com.yourinventit.processing.android.serial.Serial.(Serial.java:41)
at com.yourinventit.processing.android.serial.Serial.(Serial.java:50)
at com.yourinventit.processing.android.serial.Serial.list(Serial.java:263)
at processing.test.generatemachine_android.generatemachine_android.setup(generatemachine_android.java:47)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PGraphicsAndroid2D.requestDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:841)

I put the manifest and device filter in the correct folder and the sketch tries to run if i connect my arduino, but also crashes then.

it happens even if i only put println(Serial.list(this)); in the code.

I have a galaxy s3 neo with android 4.4.2 and tried it with a simple arduino uno.

@tim424 tim424 changed the title Always craches Always crashes Dec 11, 2015
@dbaba
Copy link
Contributor

dbaba commented Dec 11, 2015

Could you post your processing code including println(Serial.list(this)); as well?

@tim424
Copy link
Author

tim424 commented Dec 11, 2015

import com.yourinventit.processing.android.serial.*;

void setup()
{
println(Serial.list(this));
}

void draw()
{

}

@dbaba
Copy link
Contributor

dbaba commented Dec 11, 2015

Thanks. Which version of Processing are you using?

@tim424
Copy link
Author

tim424 commented Dec 11, 2015

3.0.1

@dbaba
Copy link
Contributor

dbaba commented Dec 11, 2015

I understood. The library depends on 2.x and you got the error.
I will update the version later and close this ticket when I finish the task.
Until then, use 2.x and your code should work.

@tim424
Copy link
Author

tim424 commented Dec 11, 2015

thanks alot it works in 2.03 :)!

@kcchang61
Copy link

I tested your new release (develop branches) and I got some error like this.

  • Test Environment

Processing Version : 3.0.1

Serial Target Device : Arduino UNO

Android Target Device

  • LG G-Pad (Android 5.0.1) : Working well but sometimes stopped!
  • LG G3 (Android 6.0) : Never Working
    ; I could not capture error message, LG G3 did not support Wi-Fi ADB.

@dbaba
Copy link
Contributor

dbaba commented Feb 29, 2016

Processing 3.x won't work on the release 0.0.x version of the library.
Please try 0.1.0-alpha though I couldn't test it on Processing 3 with Android mode as the mode didn't work for me... Anyway, please try it and let me know if you still have issues.

The built binary "AndroidSerial-distribution.zip" is available at 0.1.0-alpha page.

@kcchang61
Copy link

Thanks for your update!
Could you check the link of 0.1.0-alpha page? Browser show me the "Page not found!".

Current link --> https://github.com/releases/tag/0.1.0-alpha

@dbaba
Copy link
Contributor

dbaba commented Feb 29, 2016

@kcchang61
Copy link

Thanks for your release.

This is my test result and almost same like above.

Processing Version : 3.0.2 (Recently Updated from 3.0.1)
Serial Target Device : Arduino (Baud Rate : 19200 bps)

LG G-Pro (Android 4.2.2) : Working well but sometimes stopped!
LG G-Pad (Android 5.0.1) : Working well but sometimes stopped!
LG G3 (Android 6.0) : Always do not working.. (Error!)

When I checked with USB Device Info (Android App), looks like as follow.

LG G3 (6.0)
Device List(1)
/dev/bus/usb/001/002 --> Arduino V-ID 2341

LG G-Pad (5.0.1)
Device List(2)
/dev/bus/usb/001/001 --> USB Hub (0x9)
/dev/bus/usb/001/002 --> Ardudino V-ID 2341

LG G-Pro (4.2.2)
Device List(4)
/dev/bus/usb/002/001 --> USB Hub (0x09)
/dev/bus/usb/001/002 --> Usb Class information.. V-ID 05c6
/dev/bus/usb/001/001 --> USB Hub (0x09)
/dev/bus/usb/002/002 --> Arduino V-ID 2341

  • So, I need to downgrade G3 Android version from 6.0 to 5.X and then
    I will update my test result later again! Best Regards!

@calebfoss
Copy link

This is error I got on my Galaxy s4 with Android 5.0.1 using the 0.1.0-alpha:

FATAL EXCEPTION: Animation Thread
Process: processing.test.arduinoandroidtest_v02, PID: 25745
java.lang.IllegalStateException: Cannot setup USB Serial.
at com.yourinventit.processing.android.serial.UsbSerialCommunicator.doStart(UsbSerialCommunicator.java:108)
at com.yourinventit.processing.android.serial.AbstractAndroidSerialCommunicator.start(AbstractAndroidSerialCommunicator.java:332)
at com.yourinventit.processing.android.serial.AbstractAndroidSerialCommunicator.start(AbstractAndroidSerialCommunicator.java:307)
at com.yourinventit.processing.android.serial.AbstractAndroidSerialCommunicator.start(AbstractAndroidSerialCommunicator.java:296)
at com.yourinventit.processing.android.serial.Serial.(Serial.java:51)
at com.yourinventit.processing.android.serial.Serial.list(Serial.java:263)
at processing.test.arduinoandroidtest_v02.arduinoAndroidTest_v02.setup(arduinoAndroidTest_v02.java:33)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PGraphicsAndroid2D.requestDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:818)

@henry1218
Copy link

I got this error when the sketch tries to start on my Galaxy s4 with Android 5.1.1 using the 0.1.0-alpha:

FATAL EXCEPTION: Animation Thread
java.lang.IllegalStateException: Cannot setup USB Serial.
at com.yourinventit.processing.android.serial.UsbSerialCommunicator.doStart(UsbSerialCommunicator.java:108)
at com.yourinventit.processing.android.serial.AbstractAndroidSerialCommunicator.start(AbstractAndroidSerialCommunicator.java:332)
at com.yourinventit.processing.android.serial.AbstractAndroidSerialCommunicator.start(AbstractAndroidSerialCommunicator.java:307)
at com.yourinventit.processing.android.serial.AbstractAndroidSerialCommunicator.start(AbstractAndroidSerialCommunicator.java:296)
at com.yourinventit.processing.android.serial.Serial.(Serial.java:51)
at com.yourinventit.processing.android.serial.Serial.list(Serial.java:263)
at gausstoys.android.SerialManager.printSerialPortList(Unknown Source)
at gausstoys.android.GaussSense.printSerialPortList(Unknown Source)
at processing.test.e1_hello_gausssense.e1_hello_gausssense.setup(e1_hello_gausssense.java:32)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PGraphicsAndroid2D.requestDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:856)

@niepoprawnynick
Copy link

I am getting the same error:

FATAL EXCEPTION: Animation Thread java.lang.IllegalArgumentException: This library works only on Android. at com.yourinventit.processing.android.serial.SerialCommunicatorFacory.create(SerialCommunicatorFacory.java:67) at com.yourinventit.processing.android.serial.Serial.<init>(Serial.java:41) at com.yourinventit.processing.android.serial.Serial.<init>(Serial.java:50) at com.yourinventit.processing.android.serial.Serial.list(Serial.java:263) at processing.test.sketch_160719d.sketch_160719d.setup(sketch_160719d.java:33) at processing.core.PApplet.handleDraw(Unknown Source) at processing.core.PGraphicsAndroid2D.requestDraw(Unknown Source) at processing.core.PApplet.run(Unknown Source) at java.lang.Thread.run(Thread.java:856)

I use processing 3.1.1 and 0.1.0 alpha version of the library.
Anyone know how to fix it?

Thanks in advance.

@dbaba
Copy link
Contributor

dbaba commented Jul 29, 2016

I'm currently working on updating android-usb-serial library.
But took time to test the update because of unexpected error in Processing 3.1.1 and Android-mode 0250.
I'll update the ticket when I finish the work.

@dbaba
Copy link
Contributor

dbaba commented Sep 23, 2016

Sorry for the delay. Just released the latest library. Could you please try a zip file at the release page?

@goutham93
Copy link

image

Im getting this error when I try this simple code:

import com.yourinventit.processing.android.serial.*;
void setup()
{
println(Serial.list(this)); // print a list of available serial ports

}

Any idea why

@q2dg
Copy link

q2dg commented Aug 10, 2017

Are you running your code on Android??
The error message says: "This library works only on Android"

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

8 participants