开源改变世界!!

尝试在空对象引用 GrblUsbSerialService.java 行 281 上调用接口方法 getDeviceList #80

推推 grbl 2年前 (2023-02-12) 156次浏览
关闭
zeevy 打开了这个问题 2018 年 8 月 19 日 · 0 条评论
关闭

尝试在空对象引用 GrblUsbSerialService.java 行 281 上调用接口方法 getDeviceList#80

zeevy 打开了这个问题 2018 年 8 月 19 日 · 0 条评论

评论

尝试在空对象引用 GrblUsbSerialService.java 行 281 上调用接口方法 getDeviceList #80
所有者
疯狂的 评论了 2018 年 8 月 19 日  

# Crashlytics - plaintext stacktrace downloaded by venkateswararao at Sun, 19 Aug 2018 02:47:49 GMT
# Organization: Development
# Platform: android
# Application: Grbl Controller
# Version: 2.30 (21)
# Bundle Identifier: in.co.gorest.grblcontroller
# Issue #: 101
# Issue ID: 5b7899596007d59fcd2d7672
# Session ID: 5B788A75032E0001097CE728713F65F2_DNE_0_v2
# Date: 2018-08-18T21:07:00Z
# OS Version: 5.1.1
# Device: Full Sandbox Alpha Image for Emulator x86
# RAM Free: 80.1%
# Disk Free: 68.9%

#0. Crashed: main
       at android.app.ActivityThread.handleCreateService(ActivityThread.java:2771)
       at android.app.ActivityThread.access$1800(ActivityThread.java:151)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1386)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:135)
       at android.app.ActivityThread.main(ActivityThread.java:5254)
       at java.lang.reflect.Method.invoke(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:372)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

--

Fatal Exception: java.lang.RuntimeException: Unable to create service in.co.gorest.grblcontroller.service.GrblUsbSerialService: java.lang.NullPointerException: Attempt to invoke interface method 'void android.hardware.usb.IUsbManager.getDeviceList(android.os.Bundle)' on a null object reference
       at android.app.ActivityThread.handleCreateService(ActivityThread.java:2771)
       at android.app.ActivityThread.access$1800(ActivityThread.java:151)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1386)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:135)
       at android.app.ActivityThread.main(ActivityThread.java:5254)
       at java.lang.reflect.Method.invoke(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:372)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

Caused by java.lang.NullPointerException: Attempt to invoke interface method 'void android.hardware.usb.IUsbManager.getDeviceList(android.os.Bundle)' on a null object reference
       at android.hardware.usb.UsbManager.getDeviceList(UsbManager.java:243)
       at in.co.gorest.grblcontroller.service.GrblUsbSerialService.findSerialPortDevice(GrblUsbSerialService.java:281)
       at in.co.gorest.grblcontroller.service.GrblUsbSerialService.onCreate(GrblUsbSerialService.java:135)
       at android.app.ActivityThread.handleCreateService(ActivityThread.java:2761)
       at android.app.ActivityThread.access$1800(ActivityThread.java:151)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1386)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:135)
       at android.app.ActivityThread.main(ActivityThread.java:5254)
       at java.lang.reflect.Method.invoke(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:372)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

#0. Crashed: main
       at android.app.ActivityThread.handleCreateService(ActivityThread.java:2771)
       at android.app.ActivityThread.access$1800(ActivityThread.java:151)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1386)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:135)
       at android.app.ActivityThread.main(ActivityThread.java:5254)
       at java.lang.reflect.Method.invoke(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:372)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

#1. main
       at java.lang.Object.wait(Object.java)
       at java.lang.Thread.parkFor(Thread.java:1220)
       at sun.misc.Unsafe.park(Unsafe.java:299)
       at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:197)
       at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:397)
       at java.util.concurrent.FutureTask.get(FutureTask.java:174)
       at com.crashlytics.android.core.CrashlyticsBackgroundWorker.submitAndWait(CrashlyticsBackgroundWorker.java:41)
       at com.crashlytics.android.core.CrashlyticsController.handleUncaughtException(CrashlyticsController.java:320)
       at com.crashlytics.android.core.CrashlyticsController$6.onUncaughtException(CrashlyticsController.java:300)
       at com.crashlytics.android.core.CrashlyticsUncaughtExceptionHandler.uncaughtException(CrashlyticsUncaughtExceptionHandler.java:42)
       at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
       at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)

#2. FinalizerWatchdogDaemon
       at java.lang.Thread.sleep(Thread.java)
       at java.lang.Thread.sleep(Thread.java:1031)
       at java.lang.Thread.sleep(Thread.java:985)
       at java.lang.Daemons$FinalizerWatchdogDaemon.sleepFor(Daemons.java:258)
       at java.lang.Daemons$FinalizerWatchdogDaemon.waitForFinalization(Daemons.java:269)
       at java.lang.Daemons$FinalizerWatchdogDaemon.run(Daemons.java:217)
       at java.lang.Thread.run(Thread.java:818)

#3. pool-2-thread-1
       at java.lang.Object.wait(Object.java)
       at java.lang.Thread.parkFor(Thread.java:1220)
       at sun.misc.Unsafe.park(Unsafe.java:299)
       at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)
       at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2016)
       at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1048)
       at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:776)
       at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
       at java.lang.Thread.run(Thread.java:818)

#4. FinalizerDaemon
       at java.lang.Object.wait(Object.java)
       at java.lang.Object.wait(Object.java:422)
       at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:101)
       at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:72)
       at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:174)
       at java.lang.Thread.run(Thread.java:818)

#5. pool-4-thread-1
       at java.lang.Object.wait(Object.java)
       at java.lang.Thread.parkFor(Thread.java:1220)
       at sun.misc.Unsafe.park(Unsafe.java:299)
       at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)
       at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2016)
       at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410)
       at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
       at java.lang.Thread.run(Thread.java:818)

#6. HeapTrimmerDaemon
       at java.lang.Object.wait(Object.java)
       at java.lang.Daemons$HeapTrimmerDaemon.run(Daemons.java:311)
       at java.lang.Thread.run(Thread.java:818)

#7. Queue
       at libcore.io.Posix.poll(Posix.java)
       at libcore.io.BlockGuardOs.poll(BlockGuardOs.java:195)
       at libcore.io.IoBridge.isConnected(IoBridge.java:215)
       at libcore.io.IoBridge.connectErrno(IoBridge.java:171)
       at libcore.io.IoBridge.connect(IoBridge.java:122)
       at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
       at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:456)
       at java.net.Socket.connect(Socket.java:882)
       at com.android.okhttp.internal.Platform.connectSocket(Platform.java:174)
       at com.android.okhttp.Connection.connect(Connection.java:152)
       at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:276)
       at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:211)
       at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:382)
       at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:332)
       at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:500)
       at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
       at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:25)
       at io.fabric.sdk.android.services.network.HttpRequest.code(HttpRequest.java:1353)
       at io.fabric.sdk.android.services.settings.DefaultSettingsSpiCall.handleResponse(DefaultSettingsSpiCall.java:108)
       at io.fabric.sdk.android.services.settings.DefaultSettingsSpiCall.invoke(DefaultSettingsSpiCall.java:92)
       at io.fabric.sdk.android.services.settings.DefaultSettingsController.loadSettingsData(DefaultSettingsController.java:80)
       at io.fabric.sdk.android.services.settings.DefaultSettingsController.loadSettingsData(DefaultSettingsController.java:64)
       at io.fabric.sdk.android.services.settings.Settings.loadSettingsData(Settings.java:155)
       at io.fabric.sdk.android.Onboarding.retrieveSettingsData(Onboarding.java:126)
       at io.fabric.sdk.android.Onboarding.doInBackground(Onboarding.java:99)
       at io.fabric.sdk.android.Onboarding.doInBackground(Onboarding.java:45)
       at io.fabric.sdk.android.InitializationTask.doInBackground(InitializationTask.java:63)
       at io.fabric.sdk.android.InitializationTask.doInBackground(InitializationTask.java:28)
       at io.fabric.sdk.android.services.concurrency.AsyncTask$2.call(AsyncTask.java:311)
       at java.util.concurrent.FutureTask.run(FutureTask.java:237)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
       at java.util.concurrent.FutureTask.run(FutureTask.java:237)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
       at java.lang.Thread.run(Thread.java:818)

#8. Answers Events Handler1
       at java.lang.Object.wait(Object.java)
       at java.lang.Thread.parkFor(Thread.java:1220)
       at sun.misc.Unsafe.park(Unsafe.java:299)
       at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:197)
       at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2055)
       at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1060)
       at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:776)
       at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
       at io.fabric.sdk.android.services.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:75)
       at io.fabric.sdk.android.services.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:30)
       at java.lang.Thread.run(Thread.java:818)

#9. Measurement Worker
       at android.database.sqlite.SQLiteConnection.nativeExecuteForChangedRowCount(SQLiteConnection.java)
       at android.database.sqlite.SQLiteConnection.executeForChangedRowCount(SQLiteConnection.java:734)
       at android.database.sqlite.SQLiteSession.executeForChangedRowCount(SQLiteSession.java:754)
       at android.database.sqlite.SQLiteStatement.executeUpdateDelete(SQLiteStatement.java:64)
       at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1676)
       at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1605)
       at com.google.android.gms.internal.measurement.zzei.zza(Unknown Source)
       at com.google.android.gms.internal.measurement.zzel.onOpen(Unknown Source)
       at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:266)
       at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:163)
       at com.google.android.gms.internal.measurement.zzel.getWritableDatabase(Unknown Source)
       at com.google.android.gms.internal.measurement.zzei.getWritableDatabase(Unknown Source)
       at com.google.android.gms.internal.measurement.zzei.zzbe(Unknown Source)
       at com.google.android.gms.internal.measurement.zzgf.zzbt(Unknown Source)
       at com.google.android.gms.internal.measurement.zzgf.zze(Unknown Source)
       at com.google.android.gms.internal.measurement.zzef.zzd(Unknown Source)
       at com.google.android.gms.internal.measurement.zzef.zzaz(Unknown Source)
       at com.google.android.gms.internal.measurement.zzgl.start(Unknown Source)
       at com.google.android.gms.internal.measurement.zzgm.run(Unknown Source)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
       at java.util.concurrent.FutureTask.run(FutureTask.java:237)
       at com.google.android.gms.internal.measurement.zzgk.run(Unknown Source)

#10. OkHttp ConnectionPool
       at java.lang.Object.wait(Object.java)
       at java.lang.Thread.parkFor(Thread.java:1220)
       at sun.misc.Unsafe.park(Unsafe.java:299)
       at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:197)
       at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2055)
       at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:435)
       at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
       at java.lang.Thread.run(Thread.java:818)

#11. Crashlytics Exception Handler1
       at dalvik.system.VMStack.getThreadStackTrace(VMStack.java)
       at java.lang.Thread.getStackTrace(Thread.java:580)
       at java.lang.Thread.getAllStackTraces(Thread.java:522)
       at com.crashlytics.android.core.CrashlyticsController.writeSessionEvent(CrashlyticsController.java:1334)
       at com.crashlytics.android.core.CrashlyticsController.writeFatal(CrashlyticsController.java:1021)
       at com.crashlytics.android.core.CrashlyticsController.access$500(CrashlyticsController.java:68)
       at com.crashlytics.android.core.CrashlyticsController$7.call(CrashlyticsController.java:327)
       at com.crashlytics.android.core.CrashlyticsController$7.call(CrashlyticsController.java:320)
       at java.util.concurrent.FutureTask.run(FutureTask.java:237)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
       at io.fabric.sdk.android.services.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:75)
       at io.fabric.sdk.android.services.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:30)
       at java.lang.Thread.run(Thread.java:818)

#12. GCDaemon
       at java.lang.Object.wait(Object.java)
       at java.lang.Daemons$GCDaemon.run(Daemons.java:344)
       at java.lang.Thread.run(Thread.java:818)

#13. Queue
       at java.lang.Object.wait(Object.java)
       at java.lang.Thread.parkFor(Thread.java:1220)
       at sun.misc.Unsafe.park(Unsafe.java:299)
       at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)
       at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2016)
       at java.util.concurrent.PriorityBlockingQueue.take(PriorityBlockingQueue.java:510)
       at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.performOperation(DependencyPriorityBlockingQueue.java:197)
       at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.get(DependencyPriorityBlockingQueue.java:236)
       at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.take(DependencyPriorityBlockingQueue.java:65)
       at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.take(DependencyPriorityBlockingQueue.java:46)
       at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
       at java.lang.Thread.run(Thread.java:818)

#14. ReferenceQueueDaemon
       at java.lang.Object.wait(Object.java)
       at java.lang.Daemons$ReferenceQueueDaemon.run(Daemons.java:134)
       at java.lang.Thread.run(Thread.java:818)


尝试在空对象引用 GrblUsbSerialService.java 行 281 上调用接口方法 getDeviceList #80 zeevy 更改了标题 GrblUsbSerialService.java 第 281 行 尝试在空对象引用 GrblUsbSerialService.java 行 281 上调用接口方法 getDeviceList 2018 年 8 月 19 日
zeevy 添加了引用此问题的提交 2018 年 8 月 28 日

喜欢 (0)