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

Smart Card Emulator crashes #163

Closed
EilishVanDerSnickt opened this issue Apr 6, 2020 · 13 comments
Closed

Smart Card Emulator crashes #163

EilishVanDerSnickt opened this issue Apr 6, 2020 · 13 comments

Comments

@EilishVanDerSnickt
Copy link

I have installed the smartcard emulator but every time i try to read the card, the app crashes.

@frankmorgner
Copy link
Owner

could you be more specific?

@EilishVanDerSnickt
Copy link
Author

I have installed the emulator via Android Studio. It runs on my phone but it keeps crashing at random time for example when I click on settings or try connect my phone with a NFC smart card reader

@EilishVanDerSnickt
Copy link
Author

I have an LG G5 with Android 7.0

@frankmorgner
Copy link
Owner

If you use Android Studio to debug the app (or launch in debug mode), then you'll see the actual crash in the debugger. A log would be most helpful.

@532910
Copy link

532910 commented Apr 24, 2020

v3.3 from f-droid crashes every time I'm trying to open settings, 2.0 opens settings wo errors

I ActivityManager: START u0 {cmp=com.vsmartcard.acardemulator/.SettingsActivity} from uid 10314
W ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@dcfaedd
D AndroidRuntime: Shutting down VM
E AndroidRuntime: FATAL EXCEPTION: main
E AndroidRuntime: Process: com.vsmartcard.acardemulator, PID: 25898
E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.vsmartcard.acardemulator/com.vsmartcard.acardemulator.SettingsActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.preference.Preference.setOnPreferenceChangeListener(android.preference.Preference$OnPreferenceChangeListener)' on a null object reference
E AndroidRuntime:        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2951)
E AndroidRuntime:        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3086)
E AndroidRuntime:        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
E AndroidRuntime:        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
E AndroidRuntime:        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
E AndroidRuntime:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816)
E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:106)
E AndroidRuntime:        at android.os.Looper.loop(Looper.java:193)
E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:6718)
E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.preference.Preference.setOnPreferenceChangeListener(android.preference.Preference$OnPreferenceChangeListener)' on a null object reference
E AndroidRuntime:        at com.vsmartcard.acardemulator.SettingsActivity.bindPreferenceSummaryToValue(SettingsActivity.java:152)
E AndroidRuntime:        at com.vsmartcard.acardemulator.SettingsActivity.access$000(SettingsActivity.java:56)
E AndroidRuntime:        at com.vsmartcard.acardemulator.SettingsActivity$VICCPreferenceFragment.onCreate(SettingsActivity.java:187)
E AndroidRuntime:        at android.app.Fragment.performCreate(Fragment.java:2503)
E AndroidRuntime:        at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1256)
E AndroidRuntime:        at android.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1576)
E AndroidRuntime:        at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1637)
E AndroidRuntime:        at android.app.BackStackRecord.executeOps(BackStackRecord.java:807)
E AndroidRuntime:        at android.app.FragmentManagerImpl.executeOps(FragmentManager.java:2405)
E AndroidRuntime:        at android.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2200)
E AndroidRuntime:        at android.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2155)
E AndroidRuntime:        at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2062)
E AndroidRuntime:        at android.app.FragmentManagerImpl.dispatchMoveToState(FragmentManager.java:3051)
E AndroidRuntime:        at android.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:2998)
E AndroidRuntime:        at android.app.FragmentController.dispatchActivityCreated(FragmentController.java:182)
E AndroidRuntime:        at android.app.Activity.performCreate(Activity.java:7151)
E AndroidRuntime:        at android.app.Activity.performCreate(Activity.java:7135)
E AndroidRuntime:        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
E AndroidRuntime:        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2931)
E AndroidRuntime:        ... 11 more

@EilishVanDerSnickt
Copy link
Author

I have exactly the same issue with the settings.
I have also discovered that the emulator itself crashes because it times out trying to connect to the reader, which is installed on my computer.
I haven't had much time to troubleshoot lately so I will have to come back to that later.

I have not found a solution regarding the settings error

@532910
Copy link

532910 commented Apr 24, 2020

  1. I'm no sure if crash on setting opening and card reading is the same.
  2. my phone is android 9 OP3T LineageOS 16.0

@EilishVanDerSnickt
Copy link
Author

No it is indeed a different crash.
My phone has android 7.0 the nougat OS

@frankmorgner
Copy link
Owner

My local build didn't have this problem, but I can reproduce this with the fdroid binaries. Maybe something went wrong during the build/release update.

Until this is fixed, you could try the previous version from F-Droid, which should work in this regard.

@532910
Copy link

532910 commented Apr 24, 2020

As I've already mentioned 2.0 works for me.

@frankmorgner
Copy link
Owner

I think I've found the problem #167. Unfortunately, I cannot test this right now. Would you mind trying it out?

@532910
Copy link

532910 commented Apr 25, 2020

Could you give me an apk?

@532910
Copy link

532910 commented May 1, 2020

As I've already mentioned 2.0 works for me.

Really I meant "2.0 doesn't crash" as in fact it doesn't connect to 35963.

bowb pushed a commit to bowb/vsmartcard that referenced this issue Mar 6, 2023
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

Successfully merging a pull request may close this issue.

3 participants