keepass2android icon indicating copy to clipboard operation
keepass2android copied to clipboard

app crashes on 'previous version' option

Open motouser57 opened this issue 2 years ago • 15 comments

Hi Philipp

New version 1.09e crashes if i click in any entry on one of the "vorherige version" buttons. What should happen here normally?
Regards motouser57

motouser57 avatar Apr 25 '23 13:04 motouser57

I have the same problem - app crashes when clicking on an entry in the "previous version" section. This happens in both my phones (Android 10 and 12) and on the offline and online app version (i use both on both phones) All apps are 1.09e-r7

FranLa avatar May 09 '23 19:05 FranLa

I would like to add, that it doesn't happen all the time - sometimes it works when looking at a previous version of en entry, then I might look at a previous version in a different entry - and the app crashes. And when I go back to the other entry that worked just before and look at an older version the app suddenly also crashes now in this entry (that worked just before). I haven't been able to see a 'pattern'. But mostly the app crashes when looking at an older version of an entry.

FranLa avatar May 19 '23 08:05 FranLa

Several different entries with version history immediately crash app. However, I could not repro with a fresh entry created within the app, so the entries must not conform to current expectations for some reason- bug, older app version, or more likely other KeePass2.0 apps the db is shared with.

If entry is non-conforming or corrupted, expect a helpful error message and no crash, ideally some sort of record rebuild/ repair option, or extract to text as last resort for recovery.

metaxis avatar Dec 23 '23 16:12 metaxis

@motouser57 @metaxis can you reduce a copy of the database to contain just one "bad" entry? Then convert it to xml on Windows and replace all occurences of sensitive data with placeholders. Then convert back and verify the issue still exists. Can you then share the file with me here or through [email protected]?

PhilippC avatar Jan 02 '24 13:01 PhilippC

I'm having the same issue on my current phone running Android 9. I also run this application on my older phone which is running Android 11 and my tablet running rooted Android 7.1.2. The version installed on my current phone is 1.09e-r7 ~~installed via F-Droid~~ whereas the one on my tablet is 1.09c-r0 both installed from the play store. That one doesn't seem to have the ability to view previous versions of entries?? Interestingly some of the entries that are having issues with viewing previous versions were created directly in the app and updated a few times over the last few years.

conceptrat avatar Jan 03 '24 00:01 conceptrat

Same issue with v1.10-pre... Here some exception it wanted to send as feedback:

android.runtime.JavaProxyThrowable: System.NullReferenceException: Object reference not set to an instance of an object
  at keepass2android.EntryActivity.PopulateGroupText (System.Int32 viewId, System.Int32 containerViewId, System.String key) [0x00020] in <dabeaecbf9c0465bb1ce8a7bcc561766>:0 
  at keepass2android.EntryActivity.FillData () [0x0006d] in <dabeaecbf9c0465bb1ce8a7bcc561766>:0 
  at keepass2android.EntryActivity.OnCreate (Android.OS.Bundle savedInstanceState) [0x002de] in <dabeaecbf9c0465bb1ce8a7bcc561766>:0 
  at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_savedInstanceState) [0x0000f] in <f14734ebc98e4416a8b2fbf77ffc79bb>:0 
  at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPL_V (_JniMarshal_PPL_V callback, System.IntPtr jnienv, System.IntPtr klazz, System.IntPtr p0) [0x00005] in <f14734ebc98e4416a8b2fbf77ffc79bb>:0 
	at crc64dd09b2a2e58bb27d.EntryActivity.n_onCreate(Native Method)
	at crc64dd09b2a2e58bb27d.EntryActivity.onCreate(EntryActivity.java:48)
	at android.app.Activity.performCreate(Activity.java:8181)
	at android.app.Activity.performCreate(Activity.java:8147)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1330)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3737)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3931)
	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2284)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:210)
	at android.os.Looper.loop(Looper.java:299)
	at android.app.ActivityThread.main(ActivityThread.java:8337)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1037)

Maybe that's useful?

bluezed avatar Jan 30 '24 11:01 bluezed

@PhilippC did you get an example file as requested on Jan 2nd for reproduction? I have the same problem and would help with creating such an example file if necessary (and not allready done).

I had some free time, so... with the attached xml file it is possible to reproduce the crash (rename to .xml extension to import).

reproduce.txt

@anotherUserWithoutUsername I imported the database into a test database and opened the entry as well as some of the versions. What do I need to do differently?

PhilippC avatar Feb 19 '24 08:02 PhilippC

@PhilippC Sorry, this were the steps by which I could reproduce it. I use DB sync over Dropbox (special Folder on Dropbox) an an POCO X3 Pro (Android 11). Maybe there are further circumstances that affect the crash, but currently I have no idea what it could be...

I have also downloaded the reproduce.txt which was uploaded by user "anotherUserWithoutUsername", renamed the file to reproduce.xml and opened it with "Keepass2Android Offline" on my Goolge Pixel 7a with Android version 14 (which is up to date), not rooted or any other 'funny stuff'

When I click at any of the 'previous version' entries the app crashes. I didn't do anything special - just the steps mentioned above. I use as mentioned "Keepass2Android Offline", and the app is version 1.09e-r7

I then tried the same with "Keepass2Android" (the 'non-Offline' edition') version 1.10-pre on the same phone and got the same error (=crash).

As I normally use the danish language settings on my phone ("Dansk (Danmark)") I also tried with "English (United States)" - but the error/crash still occurs in both apps just as before.

In other words: I had no problems reproducing the error

FranLa avatar Mar 03 '24 17:03 FranLa

I'm having the same problem on my samsung phone (version 1-10-pre.)

Brassrat avatar Mar 12 '24 18:03 Brassrat

1.11-r0 still crashes when trying to access "previous versions".

bmwdroid avatar May 03 '24 16:05 bmwdroid

still crashes, 1.11-r0. keepassdx can access history just fine, maybe the app handles the xml structure differently?

aroguecoder avatar May 29 '24 21:05 aroguecoder