Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6768627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:05:49+00:00 2026-05-26T15:05:49+00:00

I have A TabActivity that hosts other activities, on the tabactivity I have a

  • 0

I have A TabActivity that hosts other activities, on the tabactivity I have a broadcast receiver that gets data from a webservice(not an android Service) class. The webservice class makes a http request in an asynctask and returns the data by sending broadcast message to the tabhost.

If I block the screen on portrait, the data is retrieved with no problems, if I let the screen in default mode (portrait and landscape), at first run the application is getting the data but after several orientation screen changes, the app is crashing and I receive the following error:

11-03 17:25:48.542: ERROR/AndroidRuntime(16486): FATAL EXCEPTION: main
    java.lang.RuntimeException: Error receiving broadcast Intent { act=x.tableManager.tableData.success } in x.SolarObjTableMain$TableViewDataReceiver@405c5d88
    at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:756)
    at android.os.Handler.handleCallback(Handler.java:587)
    at android.os.Handler.dispatchMessage(Handler.java:92)
    at android.os.Looper.loop(Looper.java:143)
    at android.app.ActivityThread.main(ActivityThread.java:4196)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
    at dalvik.system.NativeStart.main(Native Method)
    Caused by: java.lang.NullPointerException
    at x.SolarObjTableMain.getPaddedData(SolarObjTableMain.java:530)
    at x.SolarObjTableMain.addTableToList(SolarObjTableMain.java:983)
    at x.SolarObjTableMain.access$900(SolarObjTableMain.java:35)
    at x.SolarObjTableMain$TableViewDataReceiver.onReceive(SolarObjTableMain.java:1051)
    at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:739)
    ... 9 more

After the first crash, the app is keep crashing at the first run, I don’t have to shake the phone or rotate it to reproduce the error…

After some break points, it seems that the receiver gets some data but after a random amount of data received, all objects in the activity gets to null.

Note that I am registering the receiver in onCreate() and onResume() and unregister it in onPause().

What I am doing wrong? Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:05:49+00:00Added an answer on May 26, 2026 at 3:05 pm

    You’re registering in onCreate AND onResume? Just do onResume.

    Also, your life would be easier if you add this to the activity declaration in AndroidManifest.xml

    android:configChanges=”orientation|keyboard|keyboardHidden”

    It will prevent a complete restart of your activity on orientation changes (as well as keyboard events).

    I’m not sure why you’re getting nulls, but I think if you change those two things, you should be good. If not, we’d need some code to look at.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a TabActivity that hosts other three activities. If the first tab is
I have a TabActivity that shows other Activities as the content based on which
I have a TabActivity that is the base Activity in my application. From the
So I have an Android app that is running in a TabActivity that separates
I have created tabs using intents.MainPage.java is my class that extends TabActivity and other
I have an android app that extends a MapActivity, so I can't extend TabActivity.
I have three activities: Activity A - Displays a list of data from a
i have a tabActivity that hold 3 tabs. from one tab i want to
I have within a TabActivity a Spinner that will be generated dynamically. Just to
I have a tabActivity which has 3 tabs and 3 different activities in each

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.