AndroidIDEOfficial / AndroidIDE

AndroidIDE is an IDE for Android to develop full featured Android apps.
https://m.androidide.com
GNU General Public License v3.0
2.35k stars 291 forks source link

NullPointerException during search in project. #276

Closed ghost closed 2 years ago

ghost commented 2 years ago
AndroidIDE crash report
Manufacturer: Xiaomi
Device: M2006C3MNG
App version: 2.1.2-beta (212)

 Stacktrace: 
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.widget.CheckBox.isChecked()' on a null object reference
    at com.itsaky.androidide.EditorActivity.lambda$createFindInProjectDialog$40$com-itsaky-androidide-EditorActivity(EditorActivity.java:1627)
    at com.itsaky.androidide.EditorActivity$$ExternalSyntheticLambda11.onClick(Unknown Source:6)
    at androidx.appcompat.app.AlertController$ButtonHandler.handleMessage(AlertController.java:167)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loop(Looper.java:225)
    at android.app.ActivityThread.main(ActivityThread.java:7563)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:994)

Steps to reproduce

Open several files (in my case 2), select the "Search in project" option, enter the text for the search and extension, click "Find". If the files are not open or only one file is open, the error does not appear.

Screenshots

Screenshot

Screenshot

Unfortunately, the screenshots are in the Russian locale.

ghost commented 2 years ago

The problem is that this occurs when the project is initialized.