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 when click "add device" #256

Closed
ivysrono opened this issue Mar 18, 2015 · 6 comments
Closed

crash when click "add device" #256

ivysrono opened this issue Mar 18, 2015 · 6 comments

Comments

@ivysrono
Copy link

Android 4.4.4
0.5.21

@chucic
Copy link

chucic commented Mar 18, 2015

Did you meant "Add device" ?

In case you did, its java.lang.NullPointerException in DeviceSettingsFragment.java line 77. Same thing will happen when you click on device name to change its settings.

Android 4.4.4
0.5.21

EDIT: Nutomic, after such crashes, shall I send report to Google with system info attached? Will it get to you? Or shall I write info from report here when creating/adding info to issue?

@ivysrono ivysrono changed the title crash when click "add service" crash when click "add device" Mar 18, 2015
@Zillode
Copy link
Contributor

Zillode commented Mar 18, 2015

@chucic : both will reach him, but the github issue tracker is preferred I think.
Could you post a log? It works on my device.
Also, is it installed through the play store or f-droid?

@chucic
Copy link

chucic commented Mar 18, 2015

Through Google Play.
Which log do you mean? My phone is not rooted, so I can't get to normal log file. Or do you mean logcat? Last time I did logcat, I end up with 2k+ lines file... But preview of report to google contains system log, event log and stack trace which starts with java.lang.RuntimeException: Unable ... : java.lang.NullPointerException at ... (30 more lines), so I think its relevant. But seems I'm not able copy+paste from preview, so I sent report.

Prestigio 5454
Stock Andriod 4.4.4
Without root

@SteffenTux
Copy link

I have the same problem. Can't add devices. App promtly crashes, when trying it. Former versions worked without problems.

Zillode added a commit to Zillode/syncthing-android that referenced this issue Mar 19, 2015
Zillode added a commit to Zillode/syncthing-android that referenced this issue Mar 19, 2015
@Nutomic
Copy link
Contributor

Nutomic commented Mar 19, 2015

Here's the logcat:

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.nutomic.syncthingandroid/com.nutomic.syncthingandroid.activities.SettingsActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.preference.Preference.setOnPreferenceChangeListener(android.preference.Preference$OnPreferenceChangeListener)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2329)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2391)
at android.app.ActivityThread.access$900(ActivityThread.java:147)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1296)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5256)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:117)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.preference.Preference.setOnPreferenceChangeListener(android.preference.Preference$OnPreferenceChangeListener)' on a null object reference
at com.nutomic.syncthingandroid.fragments.DeviceSettingsFragment.onCreate(DeviceSettingsFragment.java:77)
at android.support.v4.app.Fragment.performCreate(Fragment.java:1763)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:913)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1126)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:739)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1489)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:548)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1220)
at android.app.Activity.performStart(Activity.java:5949)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292)
... 11 more

However, I don't understand this at all. The crash shouldn't occur in the first place, because the code is correct (and hasn't changed in weeks. Also, it seems I got the crash once, but then never again.

I'm seriously stumped on this one.

@Nutomic
Copy link
Contributor

Nutomic commented Mar 19, 2015

Ok here are apks with Zillode's fix. Can you please try them and report if they fix the issue?

https://dl.dropboxusercontent.com/u/22457329/syncthing-android-x86-issue-256.apk
https://dl.dropboxusercontent.com/u/22457329/syncthing-android-armeabi-issue-256.apk

Nutomic added a commit that referenced this issue Mar 20, 2015
Persistent=false should be repeated for all subpreferences, a global persistent flag would have been too easy... (fixes #256)
@Nutomic Nutomic added the bug label Mar 20, 2015
@syncthing syncthing locked and limited conversation to collaborators Nov 9, 2018
acolomb pushed a commit to acolomb/syncthing-android that referenced this issue Nov 12, 2023
* Add prefs: verbose_log, expert_mode

* Update prefs in Constants

* Add service.AppPrefs

* Update fragments to read verbose log pref

* Update classes with context or inject to read verbose log pref

* Inherit ENABLE_VERBOSE_LOG from RestApi to Completion

* Restart whole app if verbose log pref was changed

* A line too much

* Revert expert mode pref (DELTA REVERT)

* Add expert mode pref (ref syncthing#256)

* Make ignoreDelete an expert option

* Make pullOrder and ignoreDelete expert options

* Make deviceCompression an expert option

* Import de translation
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants