Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

The App Crashed due to the ViewControlLayer class #86

Open
JiatongBao opened this issue May 4, 2019 · 6 comments
Open

The App Crashed due to the ViewControlLayer class #86

JiatongBao opened this issue May 4, 2019 · 6 comments
Labels

Comments

@JiatongBao
Copy link

The app was successfully installed and run on the phone. However, after it connected to the ros master, the app then crashed due to the following problem. I did not modify any part of the source code.

E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #5
Process: com.github.rosjava.android_apps.make_a_map.kinetic, PID: 18644
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:366)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:257)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:784)
Caused by: android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:8610)
at android.view.ViewRootImpl.focusableViewAvailable(ViewRootImpl.java:4061)
at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:920)
at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:920)
at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:920)
at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:920)
at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:920)
at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:920)
at android.view.View.setFlags(View.java:14253)
at android.view.View.setClickable(View.java:10564)
at android.view.View.setOnClickListener(View.java:6456)
at com.github.rosjava.android_apps.make_a_map.ViewControlLayer.(ViewControlLayer.java:85)
at com.github.rosjava.android_apps.make_a_map.MainActivity.init(MainActivity.java:300)
at org.ros.android.RosActivity$1$1.doInBackground(RosActivity.java:89)
at org.ros.android.RosActivity$1$1.doInBackground(RosActivity.java:86)
at android.os.AsyncTask$2.call(AsyncTask.java:345)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:257) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
at java.lang.Thread.run(Thread.java:784) 

@casiarobot
Copy link

maybe the sdk version's problem. max is the 25. but i make it by using the newly android_core_components.however, new pro. is no data receiveid

@YY-GX
Copy link

YY-GX commented May 8, 2019

Same problem. When I change sdk version to 25, it still doesn't work.

@rouyunpan
Copy link

rouyunpan commented Aug 5, 2019

I encounter the same problem in android 8.0.

@jubeira jubeira added the bug label Aug 5, 2019
@zengkl520
Copy link

You can run with the old version without crashing, but you need to modify some code to run
https://github.com/rosjava/android_apps/tree/e3fb0dbd588395da5f528655b1f9eecfdd339150

@slamlixiaodong
Copy link

did you solve the problem? I encounter the same problem.

@l376571926
Copy link

The app was successfully installed and run on the phone. However, after it connected to the ros master, the app then crashed due to the following problem. I did not modify any part of the source code.

E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #5 Process: com.github.rosjava.android_apps.make_a_map.kinetic, PID: 18644 java.lang.RuntimeException: An error occurred while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:366) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383) at java.util.concurrent.FutureTask.setException(FutureTask.java:252) at java.util.concurrent.FutureTask.run(FutureTask.java:271) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:257) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:784) Caused by: android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:8610) at android.view.ViewRootImpl.focusableViewAvailable(ViewRootImpl.java:4061) at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:920) at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:920) at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:920) at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:920) at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:920) at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:920) at android.view.View.setFlags(View.java:14253) at android.view.View.setClickable(View.java:10564) at android.view.View.setOnClickListener(View.java:6456) at com.github.rosjava.android_apps.make_a_map.ViewControlLayer.(ViewControlLayer.java:85) at com.github.rosjava.android_apps.make_a_map.MainActivity.init(MainActivity.java:300) at org.ros.android.RosActivity$1$1.doInBackground(RosActivity.java:89) at org.ros.android.RosActivity$1$1.doInBackground(RosActivity.java:86) at android.os.AsyncTask$2.call(AsyncTask.java:345) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:257)  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)  at java.lang.Thread.run(Thread.java:784)

image

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

No branches or pull requests

8 participants