Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App force closes because of no initialisation of mFragmentSelectedMap. #832

Closed
drigio opened this issue Oct 21, 2019 · 1 comment · Fixed by #833
Closed

App force closes because of no initialisation of mFragmentSelectedMap. #832

drigio opened this issue Oct 21, 2019 · 1 comment · Fixed by #833

Comments

@drigio
Copy link
Contributor

drigio commented Oct 21, 2019

App force closes on running.

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.util.SparseIntArray.append(int, int)' on a null object reference at swati4star.createpdf.activity.MainActivity.setTitleMap(MainActivity.java:275) at swati4star.createpdf.activity.MainActivity.initializeValues(MainActivity.java:170) at swati4star.createpdf.activity.MainActivity.onCreate(MainActivity.java:70)

Checked out previous commits and found commit 6f3837c has removed the initialisation of SparseIntArray mFragmentSelectedMap.

Is there anything that I'm missing?

Steps to reproduce

Set up clean project, compile and run.

Expected behaviour

App should run without force closing.

Actual behaviour

App force closes.

Would you like to work on the issue?

Yes. Simple addition of the initialisation would do the trick.

@Swati4star
Copy link
Owner

Please fix it @drigio 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants