ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

illegal state exception crashes app when switching from Activity to RosActivity

asked 2012-07-02 12:04:36 -0500

dirkmcpherson gravatar image

updated 2014-01-28 17:12:53 -0500

ngrennan gravatar image

My main activity is a rosActivity where I execute various nodes in my init function. I have an Android activity that displays various utility information and I can switch from my RosActivity to my Activity without any problems. When I return to my RosActivity from my Activity the following error occurs:

W/dalvikvm( 6308): threadid=1: thread exiting with uncaught exception (group=0x40a4b1f8)
E/AndroidRuntime( 6308): FATAL EXCEPTION: main
E/AndroidRuntime( 6308): java.lang.IllegalStateException
E/AndroidRuntime( 6308):    at
E/AndroidRuntime( 6308):    at
E/AndroidRuntime( 6308):    at$100(
E/AndroidRuntime( 6308):    at$NodeMainExecutorServiceConnection.onServiceConnected(
E/AndroidRuntime( 6308):    at$ServiceDispatcher.doConnected(
E/AndroidRuntime( 6308):    at$ServiceDispatcher$
E/AndroidRuntime( 6308):    at android.os.Handler.handleCallback(
E/AndroidRuntime( 6308):    at android.os.Handler.dispatchMessage(
E/AndroidRuntime( 6308):    at android.os.Looper.loop(
E/AndroidRuntime( 6308):    at
E/AndroidRuntime( 6308):    at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 6308):    at java.lang.reflect.Method.invoke(
E/AndroidRuntime( 6308):    at$
E/AndroidRuntime( 6308):    at
E/AndroidRuntime( 6308):    at dalvik.system.NativeStart.main(Native Method)

I'm running on a phone and using a lot of memory so the original RosActivity is almost certainly being destroyed when I switch to my Activity. Are the RosNodes connected to their rosActivity in a way where they cannot be recalled when their RosActivity is destroyed?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-07-02 22:29:15 -0500

damonkohler gravatar image

I've created a bug for this:

Feel free to star it so that you will be notified when it is addressed.

edit flag offensive delete link more


Hi, I got the same problem. Did you solve the problem then?? gravatar image  ( 2015-11-12 01:39:25 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-07-02 12:04:36 -0500

Seen: 6,608 times

Last updated: Jul 02 '12