ftctechnh / ftc_app

FTC Android Studio project to create FTC Robot Controller app.
759 stars 3.17k forks source link

Webcam Consistently Crashing on Init #751

Open sjpeccoud opened 4 years ago

sjpeccoud commented 4 years ago

During my team's autonomous we use a logitech webcam runnng the tfod for Skystone. It initializes ok 1/5 times, usually it is a tedious process of unplugging and plugging the webcam. Does anyone have any suggestions?

Windwoes commented 4 years ago

Can you post your logs from a failed attempt?

sjpeccoud commented 4 years ago

The console log crashes because of a getFocalLength() method but I believe that the phone simply cannot see the webcam most of the time on init.

cmacfarl commented 4 years ago

The entire stack trace would be helpful.

On Sat, Dec 14, 2019 at 8:54 PM sjpeccoud notifications@github.com wrote:

The console log crashes because of a getFocalLength() method but I believe that the phone simply cannot see the webcam most of the time on init.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ftctechnh/ftc_app/issues/751?email_source=notifications&email_token=AAK6P52T4BHPBGDK6MKHP4TQYWZ65A5CNFSM4J23MVA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEG4RNSI#issuecomment-565778121, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAK6P56ZQN3KWNX34M6PZRLQYWZ65ANCNFSM4J23MVAQ .

sjpeccoud commented 4 years ago

Ok, I will have on Monday.

sjpeccoud commented 4 years ago

So here is the full error message:

Robot Status: EMERGENCY STOP To attempt recovery, please restart the robot. Error: User Code threw an uncaught exception: NullPointerException - Attempt to invoke virtual method 'com.vuforia.Vec2F com.vuforia.CameraCalibration.getFocalLength()' on a null object reference.

Windwoes commented 4 years ago

@sjpeccoud that is not the entire stack trace, that's only like the first line or two

sjpeccoud commented 4 years ago

Thats all there was on the phone screen. Where can I find the whole message?

Windwoes commented 4 years ago

You can pull the robotControllerLog.txt file from the FIRST folder on the internal storage of the phone and upload it here for us to look at.

KotoTheOriginal commented 4 years ago

Hey, I'm on the same team as Sam and am looking into finding out the reasoning for this error. The closest I could find to what you mentioned about finding the whole error message was looking at the logs on the RC phone. How can I find the internal storage of the phone to find this FIRST folder?

cmacfarl commented 4 years ago

adb and familiarity with a shell is the easiest way. They are in /sdcard/ and named robotControllerLog.txt, rotated files have numbers appended to the filename.

adb details can be found here: https://developer.android.com/studio/command-line/adb

If you don't want to deal that, you can select View Logs, and if you long-click on the logs that appear the standard Android sharing dialog will appear whence you can choose how you'd like to share them.

KokeCacao commented 4 years ago

Hey, I'm on the same team as Sam and am looking into finding out the reasoning for this error. The closest I could find to what you mentioned about finding the whole error message was looking at the logs on the RC phone. How can I find the internal storage of the phone to find this FIRST folder?

for ref: do adb pull /sdcard/robotControllerLog.txt