2

I'm having some weird issues with DialogFragment on a real Device. Samsung Galaxy Note 4.

When I try to open an dialog, the application enters an infinte loop (something from the system) and it gives ANR after a while. Everything is blocked. There are no logs. In debug, the break point went after the show method of the dialog.

Here is the method I use to show the dialog:

public void openLivecastMenuDialog() {
        MenuDialog menuDialog = (MenuDialog) getSupportFragmentManager().findFragmentByTag(MENU_STORY_TAG);

        if (null == menuDialog) {
            // Menu fragment not found in the fragment manager, initialize it
            menuDialog = MenuDialog.newInstance(MenuType.MENU_STORY, currentTag);
        }

        isCoverChanged = false;

        // Show the menu fragment
        menuDialog.show(getSupportFragmentManager(), MENU_STORY_TAG);
    }

MenuDialog is an "v4.app.DialogFragment".

What could create such behavior ?

LE:

It was not because of the DialogFragment. It was because of Google Analytics which was called when the Dialog Was created. Damn those services.

Ionut Negru
  • 6,186
  • 4
  • 48
  • 78

2 Answers2

2

It was not because of the DialogFragment. It was because of Google Analytics which was called when the Dialog Was created. Damn those services.

Ionut Negru
  • 6,186
  • 4
  • 48
  • 78
  • I was wondering if you could help me with this question http://goo.gl/d5opg5 . It's not one of those "fix-this-for-me" questions, I promise. – Axel Jun 22 '15 at 03:36
0

Can you add logcat file generated in the device dumpsys anr ?

You can also use cmd line to capture the logcat. Run the below command and then reproduce the anr

adb shell logcat -v threadtime > filename.txt
Sam
  • 452
  • 5
  • 15