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

  • Home
  • SEARCH
  • 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 6860657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:26:09+00:00 2026-05-27T02:26:09+00:00

First things first, I’m using the compatibility library and here’s the error I’m getting:

  • 0

First things first, I’m using the compatibility library and here’s the error I’m getting:

11-22 19:57:09.111: ERROR/AndroidRuntime(28867): FATAL EXCEPTION: main
        java.lang.NullPointerException
        at android.support.v4.app.BackStackRecord.bumpBackStackNesting(BackStackRecord.java:518)
        at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:563)
        at 

    android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1379)
            at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:419)
            at android.os.Handler.handleCallback(Handler.java:587)
            at android.os.Handler.dispatchMessage(Handler.java:92)
            at android.os.Looper.loop(Looper.java:132)
            at android.app.ActivityThread.main(ActivityThread.java:4123)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:491)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
            at dalvik.system.NativeStart.main(Native Method)

This error only occurs when the application is in PORTRAIT orientation and I’m attempting to use a FragmentTransaction to hide two other fragments and show a new one. This code gets executed when a user presses a button in the app.

Here’s the code that throws (as soon as the commit is called and gets executed the error above is being thrown).

FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.addToBackStack(null);
transaction.hide(fragmentA);
transaction.hide(fragmentB);
transaction.replace(R.id.fragment_container, new PurchaseFragment());
transaction.commit();

Any ideas why this might be happening?

  • 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-27T02:26:10+00:00Added an answer on May 27, 2026 at 2:26 am

    Figured out what it was. I’m using Roboguice to inject some components and due to some logic not shown above, the fragments were null. If any fragment is null the transaction.hide(fragment) then the above exception will occur.

    After I fixed the logic error, the fragments were no longer null. At that point the app worked as expected.

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

Sidebar

Related Questions

newbie here. This is an iPhone utility project. First things first. I have a
Our team is just getting started with Mercurial. One of the first things we've
First things first, here is a little snippet code to help explain my problem:
First things first. This application is an ASP.NET application using windows authentication. Situation: The
First things first, I'm using cygwin version 1.7.1 on a Windows 7 box. Code
I've started using blocks, and one of the first things I encountered is an
First things first, I'm using: Java 1.7.0_02 MySQL 5.1.50 ZendServer CE (if that matters)
One of the first things I learned in C++ was that #include <iostream> int
One of the first things I like to do when I make a site
One if the first things I learned when I started with C# was the

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.