java.lang.IllegalStateException: Not on the main thread 11-05 10:48:56.504: W/System.err(5498): at com.google.j.a.cl.b(Unknown Source) 11-05 10:48:56.504: W/System.err(5498): at com.google.maps.api.android.lib6.c.br.b(Unknown Source) 11-05 10:48:56.504: W/System.err(5498): at com.google.maps.api.android.lib6.c.dw.a(Unknown Source) 11-05 10:48:56.504: W/System.err(5498): at com.google.android.gms.maps.internal.l.onTransact(SourceFile:51) 11-05 10:48:56.505: W/System.err(5498): at android.os.Binder.transact(Binder.java:380) 11-05 10:48:56.505: W/System.err(5498): at com.google.android.gms.maps.internal.IGoogleMapDelegate$a$a.getCameraPosition(Unknown Source) 11-05 10:48:56.505: W/System.err(5498): at com.google.android.gms.maps.GoogleMap.getCameraPosition(Unknown Source) 11-05 10:48:56.505: W/System.err(5498): at com.reddatura.freecharging_beta.MapView$GetNewPins.doInBackground(MapView.java:241) 11-05 10:48:56.505: W/System.err(5498): at com.reddatura.freecharging_beta.MapView$GetNewPins.doInBackground(MapView.java:1) 11-05 10:48:56.505: W/System.err(5498): at android.os.AsyncTask$2.call(AsyncTask.java:288) 11-05 10:48:56.505: W/System.err(5498): at java.util.concurrent.FutureTask.run(FutureTask.java:237) 11-05 10:48:56.505: W/System.err(5498): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) 11-05 10:48:56.505: W/System.err(5498): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 11-05 10:48:56.505: W/System.err(5498): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 11-05 10:48:56.505: W/System.err(5498): at java.lang.Thread.run(Thread.java:818) thanks Peter for that. SO the problem doesn't seem to be at onPostExecute as I initially thought, but it is the doinbackground, where I want to get the campos variable EDIT3: as Adogeon advised I've put the whole thing in the main loop, but there is this exception, which I was aware, just for the sake why I used asynctask for this...but I am prone to other suggestions 11-05 11:28:06.926: W/System.err(6417): android.os.NetworkOnMainThreadException 11-05 11:28:06.927: W/System.err(6417): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1147) 11-05 11:28:06.927: W/System.err(6417): at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:249) 11-05 11:28:06.927: W/System.err(6417): at libcore.io.IoBridge.recvfrom(IoBridge.java:553) 11-05 11:28:06.927: W/System.err(6417): at java.net.PlainSocketImpl.read(PlainSocketImpl.java:485) 11-05 11:28:06.927: W/System.err(6417): at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37) 11-05 11:28:06.927: W/System.err(6417): at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237) 11-05 11:28:06.927: W/System.err(6417): at com.android.okio.Okio$2.read(Okio.java:113) 11-05 11:28:06.927: W/System.err(6417): at com.android.okio.RealBufferedSource.indexOf(RealBufferedSource.java:147) 11-05 11:28:06.927: W/System.err(6417): at com.android.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:94)

Stack Overflow | Citrus | 2 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Android java.lang.IllegalStateException, not on the main thread

    Stack Overflow | 2 years ago | Citrus
    java.lang.IllegalStateException: Not on the main thread 11-05 10:48:56.504: W/System.err(5498): at com.google.j.a.cl.b(Unknown Source) 11-05 10:48:56.504: W/System.err(5498): at com.google.maps.api.android.lib6.c.br.b(Unknown Source) 11-05 10:48:56.504: W/System.err(5498): at com.google.maps.api.android.lib6.c.dw.a(Unknown Source) 11-05 10:48:56.504: W/System.err(5498): at com.google.android.gms.maps.internal.l.onTransact(SourceFile:51) 11-05 10:48:56.505: W/System.err(5498): at android.os.Binder.transact(Binder.java:380) 11-05 10:48:56.505: W/System.err(5498): at com.google.android.gms.maps.internal.IGoogleMapDelegate$a$a.getCameraPosition(Unknown Source) 11-05 10:48:56.505: W/System.err(5498): at com.google.android.gms.maps.GoogleMap.getCameraPosition(Unknown Source) 11-05 10:48:56.505: W/System.err(5498): at com.reddatura.freecharging_beta.MapView$GetNewPins.doInBackground(MapView.java:241) 11-05 10:48:56.505: W/System.err(5498): at com.reddatura.freecharging_beta.MapView$GetNewPins.doInBackground(MapView.java:1) 11-05 10:48:56.505: W/System.err(5498): at android.os.AsyncTask$2.call(AsyncTask.java:288) 11-05 10:48:56.505: W/System.err(5498): at java.util.concurrent.FutureTask.run(FutureTask.java:237) 11-05 10:48:56.505: W/System.err(5498): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) 11-05 10:48:56.505: W/System.err(5498): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 11-05 10:48:56.505: W/System.err(5498): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 11-05 10:48:56.505: W/System.err(5498): at java.lang.Thread.run(Thread.java:818) thanks Peter for that. SO the problem doesn't seem to be at onPostExecute as I initially thought, but it is the doinbackground, where I want to get the campos variable EDIT3: as Adogeon advised I've put the whole thing in the main loop, but there is this exception, which I was aware, just for the sake why I used asynctask for this...but I am prone to other suggestions 11-05 11:28:06.926: W/System.err(6417): android.os.NetworkOnMainThreadException 11-05 11:28:06.927: W/System.err(6417): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1147) 11-05 11:28:06.927: W/System.err(6417): at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:249) 11-05 11:28:06.927: W/System.err(6417): at libcore.io.IoBridge.recvfrom(IoBridge.java:553) 11-05 11:28:06.927: W/System.err(6417): at java.net.PlainSocketImpl.read(PlainSocketImpl.java:485) 11-05 11:28:06.927: W/System.err(6417): at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37) 11-05 11:28:06.927: W/System.err(6417): at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237) 11-05 11:28:06.927: W/System.err(6417): at com.android.okio.Okio$2.read(Okio.java:113) 11-05 11:28:06.927: W/System.err(6417): at com.android.okio.RealBufferedSource.indexOf(RealBufferedSource.java:147) 11-05 11:28:06.927: W/System.err(6417): at com.android.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:94)
  2. 0

    android sqlite database access raising lock error

    Stack Overflow | 4 years ago | mungaih pk
    java.lang.IllegalStateException: database /data/data/com.intelligent.stocktrader/databases/stocktrader.db (conn# 0) already closed 09-11 13:11:15.329: W/System.err(22091): at android.database.sqlite.SQLiteDatabase.verifyDbIsOpen(SQLiteDatabase.java:2082) 09-11 13:11:15.329: W/System.err(22091): at android.database.sqlite.SQLiteDatabase.lock(SQLiteDatabase.java:413) 09-11 13:11:15.329: W/System.err(22091): at android.database.sqlite.SQLiteDatabase.lock(SQLiteDatabase.java:400) 09-11 13:11:15.329: W/System.err(22091): at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:79) 09-11 13:11:15.339: W/System.err(22091): at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:160) 09-11 13:11:15.339: W/System.err(22091): at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:152) 09-11 13:11:15.339: W/System.err(22091): at android.database.AbstractCursor.moveToPosition(AbstractCursor.java:158) 09-11 13:11:15.349: W/System.err(22091): at android.database.AbstractCursor.moveToFirst(AbstractCursor.java:235) 09-11 13:11:15.349: W/System.err(22091): at com.intelligent.stocktrader.database.ShareService.checkWatchList(ShareService.java:160) 09-11 13:11:15.349: W/System.err(22091): at com.intelligent.stocktrader.database.ShareService.onCreate(ShareService.java:63) 09-11 13:11:15.359: W/System.err(22091): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2252) 09-11 13:11:15.359: W/System.err(22091): at android.app.ActivityThread.access$1600(ActivityThread.java:122) 09-11 13:11:15.359: W/System.err(22091): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1200) 09-11 13:11:15.369: W/System.err(22091): at android.os.Handler.dispatchMessage(Handler.java:99) 09-11 13:11:15.369: W/System.err(22091): at android.os.Looper.loop(Looper.java:137) 09-11 13:11:15.369: W/System.err(22091): at android.app.ActivityThread.main(ActivityThread.java:4340) 09-11 13:11:15.369: W/System.err(22091): at java.lang.reflect.Method.invokeNative(Native Method)
  3. 0

    How to avoid .IllegalStateException

    Stack Overflow | 6 years ago | jennifer
    java.lang.IllegalStateException: Could not execute method of the activity 02-09 12:06:39.574: ERROR/AndroidRuntime(198): at android.view.View$1.onClick(View.java:2031) 02-09 12:06:39.574: ERROR/AndroidRuntime(198): at android. view.View.performClick(View.java:2364) 02-09 12:06:39.574: ERROR/AndroidRuntime(198): at android.view.View.onTouchEvent(View.java:4179) 02-09 12:06:39.574: ERROR/AndroidRuntime(198): at android.widget.TextView.onTouchEvent(TextView.java:6541) 02-09 12:06:39.574: ERROR/AndroidRuntime(198): at android.view.View.dispatchTouchEvent(View.java:3709) 02-09 12:06:39.574: ERROR/AndroidRuntime(198): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 02-09 12:06:39.574: ERROR/AndroidRuntime(198): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 02-09 12:06:39.574: ERROR/AndroidRuntime(198): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 02-09 12:06:39.574: ERROR/AndroidRuntime(198): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 02-09 12:06:39.574: ERROR/AndroidRuntime(198): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 02-09 12:06:39.574: ERROR/AndroidRuntime(198): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659) 02-09 12:06:39.574: ERROR/AndroidRuntime(198): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107) 02-09 12:06:39.574: ERROR/AndroidRuntime(198): at android.app.Activity.dispatchTouchEvent(Activity.java:2061) 02-09 12:06:39.574: ERROR/AndroidRuntime(198): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1643) 02-09 12:06:39.574: ERROR/AndroidRuntime(198): at android.view.ViewRoot.handleMessage(ViewRoot.java:1691) 02-09 12:06:39.574: ERROR/AndroidRuntime(198): at android.os.Handler.dispatchMessage(Handler.java:99) 02-09 12:06:39.574: ERROR/AndroidRuntime(198): at android.os.Looper.loop(Looper .java:123) 02-09 12:06:39.574: ERROR/AndroidRuntime(198): ... 26 more 02-09 12:06:39.574: ERROR/AndroidRuntime(198): Caused by: java.lang.reflect.InvocationTargetException 02-09 12:06:39.574: ERROR/AndroidRuntime(198): at com.ey.eyconnect.Connect_EY.btnSaveActive(Connect_EY.java:1734) 02-09 12:06:39.574: ERROR/AndroidRuntime(198): at java.lang.reflect.Method.invokeNative(Native Method)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    error Bad request for field slot 0,-1

    Stack Overflow | 5 years ago | Avi Kumar Manku
    java.lang.IllegalStateException: get field slot from row 0 col -1 failed 03-20 11:43:43.526: W/System.err(6138): at android.database.CursorWindow.getString_native(Native Method) 03-20 11:43:43.526: W/System.err(6138): at android.database.CursorWindow.getString(CursorWindow.java:329) 03-20 11:43:43.526: W/System.err(6138): at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:49) 03-20 11:43:43.526: W/System.err(6138): at golf.score.project.ExtendedScoreDisplay.onCreate(ExtendedScoreDisplay.java:123) 03-20 11:43:43.536: W/System.err(6138): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 03-20 11:43:43.556: W/System.err(6138): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) 03-20 11:43:43.556: W/System.err(6138): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 03-20 11:43:43.556: W/System.err(6138): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 03-20 11:43:43.556: W/System.err(6138): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 03-20 11:43:43.567: W/System.err(6138): at android.os.Handler.dispatchMessage(Handler.java:99) 03-20 11:43:43.577: W/System.err(6138): at android.os.Looper.loop(Looper.java:123) 03-20 11:43:43.598: W/System.err(6138): at android.app.ActivityThread.main(ActivityThread.java:4627) 03-20 11:43:43.598: W/System.err(6138): at java.lang.reflect.Method.invokeNative(Native Method)
  6. 0

    java-cdi-weld-issues - [JBoss JIRA] (WELD-877) "IllegalStateException: Context is already active" when error-page of exception-type com.sun.faces.context.FacesFileNotFoundException - msg#00111 - Recent Discussion OSDir.com

    osdir.com | 2 years ago
    java.lang.IllegalStateException: Singleton is not set > at > org.jboss.weld.bootstrap.api.helpers.IsolatedStaticSingletonProvider$ > IsolatedStaticSingleton.get(IsolatedStaticSingletonProvider.java:52) > at > org.jboss.weld.context.AbstractSharedContext.getBeanStore(AbstractSha > redContext.java:54) > at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:93) > at > org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.j > ava:690) > at > org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl. > java:264) > at > org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.jav > a:234) > at > org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractC > ontainerEvent.java:88) > at > org.jboss.weld.bootstrap.events.BeforeShutdownImpl.fire(BeforeShutdow > nImpl.java:62) > at > org.jboss.weld.bootstrap.events.BeforeShutdownImpl.fire(BeforeShutdow > nImpl.java:50) > at > org.jboss.weld.bootstrap.WeldBootstrap.shutdown(WeldBootstrap.java:49 > 1) > at > org.jboss.weld.environment.se.ShutdownManager.shutdown(ShutdownManage > r.java:45) > at > org.jboss.weld.environment.se.org$jboss$weld$bean-classpath-ManagedBe > an-org$jboss$weld$environment$se$ShutdownManager$@javax$enterprise$context$Appli > cationScoped()${}_$$_WeldClientProxy.shutdown(org$jboss$weld$bean-classpath-Mana > gedBean-org$jboss$weld$environment$se$ShutdownManager$@javax$enterprise$context$ > ApplicationScoped()${}_$$_WeldClientProxy.java) > at org.jboss.weld.environment.se.Weld.shutdown(Weld.java:169) > at > org.apache.ode.server.event.EventTest.tearDownAfterClass(EventTest.ja > va:76) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Not on the main thread 11-05 10:48:56.504: W/System.err(5498): at com.google.j.a.cl.b(Unknown Source) 11-05 10:48:56.504: W/System.err(5498): at com.google.maps.api.android.lib6.c.br.b(Unknown Source) 11-05 10:48:56.504: W/System.err(5498): at com.google.maps.api.android.lib6.c.dw.a(Unknown Source) 11-05 10:48:56.504: W/System.err(5498): at com.google.android.gms.maps.internal.l.onTransact(SourceFile:51) 11-05 10:48:56.505: W/System.err(5498): at android.os.Binder.transact(Binder.java:380) 11-05 10:48:56.505: W/System.err(5498): at com.google.android.gms.maps.internal.IGoogleMapDelegate$a$a.getCameraPosition(Unknown Source) 11-05 10:48:56.505: W/System.err(5498): at com.google.android.gms.maps.GoogleMap.getCameraPosition(Unknown Source) 11-05 10:48:56.505: W/System.err(5498): at com.reddatura.freecharging_beta.MapView$GetNewPins.doInBackground(MapView.java:241) 11-05 10:48:56.505: W/System.err(5498): at com.reddatura.freecharging_beta.MapView$GetNewPins.doInBackground(MapView.java:1) 11-05 10:48:56.505: W/System.err(5498): at android.os.AsyncTask$2.call(AsyncTask.java:288) 11-05 10:48:56.505: W/System.err(5498): at java.util.concurrent.FutureTask.run(FutureTask.java:237) 11-05 10:48:56.505: W/System.err(5498): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) 11-05 10:48:56.505: W/System.err(5498): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 11-05 10:48:56.505: W/System.err(5498): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 11-05 10:48:56.505: W/System.err(5498): at java.lang.Thread.run(Thread.java:818) thanks Peter for that. SO the problem doesn't seem to be at onPostExecute as I initially thought, but it is the doinbackground, where I want to get the campos variable EDIT3: as Adogeon advised I've put the whole thing in the main loop, but there is this exception, which I was aware, just for the sake why I used asynctask for this...but I am prone to other suggestions 11-05 11:28:06.926: W/System.err(6417): android.os.NetworkOnMainThreadException 11-05 11:28:06.927: W/System.err(6417): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1147) 11-05 11:28:06.927: W/System.err(6417): at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:249) 11-05 11:28:06.927: W/System.err(6417): at libcore.io.IoBridge.recvfrom(IoBridge.java:553) 11-05 11:28:06.927: W/System.err(6417): at java.net.PlainSocketImpl.read(PlainSocketImpl.java:485) 11-05 11:28:06.927: W/System.err(6417): at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37) 11-05 11:28:06.927: W/System.err(6417): at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237) 11-05 11:28:06.927: W/System.err(6417): at com.android.okio.Okio$2.read(Okio.java:113) 11-05 11:28:06.927: W/System.err(6417): at com.android.okio.RealBufferedSource.indexOf(RealBufferedSource.java:147) 11-05 11:28:06.927: W/System.err(6417): at com.android.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:94)

      at com.android.okhttp.internal.http.HttpConnection.readResponse()
    2. Android
      HttpURLConnectionImpl.getInputStream
      1. com.android.okhttp.internal.http.HttpConnection.readResponse(HttpConnection.java:175)
      2. com.android.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:101)
      3. com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:616)
      4. com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:379)
      5. com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:323)
      6. com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:190)
      6 frames
    3. com.reddatura.serverside
      FreechargingAPI.GetUnitsOnMap
      1. com.reddatura.serverside.FreechargingAPI.ExecuteGET(FreechargingAPI.java:42)
      2. com.reddatura.serverside.FreechargingAPI.GetUnitsOnMap(FreechargingAPI.java:100)
      2 frames
    4. com.reddatura.freecharging_beta
      MapView$1.onMapSettled
      1. com.reddatura.freecharging_beta.MapView$1.onMapSettled(MapView.java:101)
      1 frame
    5. com.reddatura.listeners
      MapStateListener$4$1.run
      1. com.reddatura.listeners.MapStateListener.settleMap(MapStateListener.java:119)
      2. com.reddatura.listeners.MapStateListener$4$1.run(MapStateListener.java:78)
      2 frames
    6. Android Platform
      ActivityThread.main
      1. android.os.Handler.handleCallback(Handler.java:739)
      2. android.os.Handler.dispatchMessage(Handler.java:95)
      3. android.os.Looper.loop(Looper.java:135)
      4. android.app.ActivityThread.main(ActivityThread.java:5221)
      4 frames
    7. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      1 frame