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

Crash on navigation for compound buttons #540

Open
vincent-karuri opened this issue Jan 20, 2021 · 1 comment
Open

Crash on navigation for compound buttons #540

vincent-karuri opened this issue Jan 20, 2021 · 1 comment

Comments

@vincent-karuri
Copy link
Contributor

 Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'org.json.JSONArray org.json.JSONObject.getJSONArray(java.lang.String)' on a null object reference
        at com.vijay.jsonwizard.activities.JsonFormActivity.checkBoxWriteValue(JsonFormActivity.java:1000)
        at com.vijay.jsonwizard.activities.JsonFormActivity.writeValue(JsonFormActivity.java:189)
        at com.vijay.jsonwizard.fragments.JsonFormFragment.writeValue(JsonFormFragment.java:549)
        at com.vijay.jsonwizard.presenters.JsonFormFragmentPresenter.onCheckedChanged(JsonFormFragmentPresenter.java:968)
        at com.vijay.jsonwizard.fragments.JsonFormFragment.onCheckedChanged(JsonFormFragment.java:741)
        at android.widget.CompoundButton.setChecked(CompoundButton.java:182)
        at com.vijay.jsonwizard.widgets.CheckBoxFactory.addCheckBoxOptionsElements(CheckBoxFactory.java:209)
        at com.vijay.jsonwizard.widgets.CheckBoxFactory.attachJson(CheckBoxFactory.java:123)
        at com.vijay.jsonwizard.widgets.CheckBoxFactory.getViewsFromJson(CheckBoxFactory.java:78)
        at com.vijay.jsonwizard.interactors.JsonFormInteractor.fetchViews(JsonFormInteractor.java:223)
        at com.vijay.jsonwizard.interactors.JsonFormInteractor.fetchFields(JsonFormInteractor.java:209)
        at com.vijay.jsonwizard.interactors.JsonFormInteractor.fetchFormElements(JsonFormInteractor.java:163)
        at com.vijay.jsonwizard.presenters.JsonFormFragmentPresenter.executeRefreshLogicForNextStep(JsonFormFragmentPresenter.java:492)
        at com.vijay.jsonwizard.presenters.JsonFormFragmentPresenter.onNextClick(JsonFormFragmentPresenter.java:361)
        at com.vijay.jsonwizard.fragments.JsonFormFragment.next(JsonFormFragment.java:422)

This exception occurs when one selects a checkbox or radio button on a page and navigates a step back then one step forward to the initial page i.e. select a checkbox or radio button on page 2, navigate back to page 1 then navigate forward to page 2, crash occurs.

@vincent-karuri
Copy link
Contributor Author

@bennsimon do you have an idea what's happening here?

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

No branches or pull requests

1 participant