OpenTracksApp / OpenTracks

OpenTracks is a sport tracking application that completely respects your privacy.
https://OpenTracksApp.com
Apache License 2.0
1.04k stars 190 forks source link

Post-workout export failed, please check the export directory 🤪 #1142

Closed vsevjednom-cz closed 2 years ago

vsevjednom-cz commented 2 years ago

Describe the bug I see the error about export after stop tracking. GPX is exported ok. It's weird.

To Reproduce

  1. Enable automatic GPX export in settings.
  2. Start
  3. Stop
  4. See error

If applicable: There isn't error in Run log but maybe this helps:

D/StrictMode: StrictMode policy violation; ~duration=34 ms: android.os.strictmode.DiskReadViolation
        at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1514)
        at android.database.sqlite.SQLiteConnection.applyBlockGuardPolicy(SQLiteConnection.java:1100)
        at android.database.sqlite.SQLiteConnection.executeForCursorWindow(SQLiteConnection.java:901)
        at android.database.sqlite.SQLiteSession.executeForCursorWindow(SQLiteSession.java:851)
        at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:62)
        at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:149)
        at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:137)
        at android.content.ContentResolver.query(ContentResolver.java:835)
        at android.content.ContentResolver.query(ContentResolver.java:766)
        at android.content.ContentResolver.query(ContentResolver.java:717)
        at de.dennisguse.opentracks.data.ContentProviderUtils.getTrackCursor(ContentProviderUtils.java:261)
        at de.dennisguse.opentracks.data.ContentProviderUtils.getTrack(ContentProviderUtils.java:234)
        at de.dennisguse.opentracks.TrackRecordedActivity.onPrepareOptionsMenu(TrackRecordedActivity.java:165)
        at android.app.Activity.onPreparePanel(Activity.java:3698)
        at androidx.fragment.app.FragmentActivity.onPrepareOptionsPanel(FragmentActivity.java:485)
        at androidx.fragment.app.FragmentActivity.onPreparePanel(FragmentActivity.java:470)
        at androidx.appcompat.view.WindowCallbackWrapper.onPreparePanel(WindowCallbackWrapper.java:99)
        at androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.onPreparePanel(AppCompatDelegateImpl.java:3149)
        at androidx.appcompat.app.ToolbarActionBar.populateOptionsMenu(ToolbarActionBar.java:459)
        at androidx.appcompat.app.ToolbarActionBar$1.run(ToolbarActionBar.java:58)
        at android.os.Handler.handleCallback(Handler.java:907)
        at android.os.Handler.dispatchMessage(Handler.java:105)
        at android.os.Looper.loop(Looper.java:216)
        at android.app.ActivityThread.main(ActivityThread.java:7625)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
...
W/....debug: type=1400 audit(0.0:114248): avc: granted { write } for comm=4173796E635461736B202331 path=2F73746F726167652F656D756C617465642F302F4A6564752F31383530303139385F54726173612036362E677078 dev="sdcardfs" ino=376252 scontext=u:r:untrusted_app:s0:c247,c256,c512,c768 tcontext=u:object_r:sdcardfs:s0 tclass=file
W/....debug: type=1400 audit(0.0:114249): avc: granted { write } for comm=4173796E635461736B202331 path=2F73746F726167652F656D756C617465642F302F4A6564752F31383530303139385F54726173612036362E677078 dev="sdcardfs" ino=376252 scontext=u:r:untrusted_app:s0:c247,c256,c512,c768 tcontext=u:object_r:sdcardfs:s0 tclass=file
W/....debug: type=1400 audit(0.0:114250): avc: granted { write } for comm=4173796E635461736B202331 path=2F73746F726167652F656D756C617465642F302F4A6564752F31383530303139385F54726173612036362E677078 dev="sdcardfs" ino=376252 scontext=u:r:untrusted_app:s0:c247,c256,c512,c768 tcontext=u:object_r:sdcardfs:s0 tclass=file
I/GPXTrackExporter: Exporting SEGMENT_END_MANUAL is not supported.
I/GPXTrackExporter: Exporting SEGMENT_START_MANUAL is not supported.
I/GPXTrackExporter: Exporting SEGMENT_END_MANUAL is not supported.
I/GPXTrackExporter: Exporting SEGMENT_START_MANUAL is not supported.
I/GPXTrackExporter: Exporting SEGMENT_START_MANUAL is not supported.
E/: [ZeroHung]zrhung_get_config: Get config failed for wp[0x0008]
W/....debug: type=1400 audit(0.0:114275): avc: granted { write } for comm=4173796E635461736B202331 path=2F73746F726167652F656D756C617465642F302F4A6564752F31383530303139385F54726173612036362E677078 dev="sdcardfs" ino=376252 scontext=u:r:untrusted_app:s0:c247,c256,c512,c768 tcontext=u:object_r:sdcardfs:s0 tclass=file
W/....debug: type=1400 audit(0.0:114276): avc: granted { write } for comm=4173796E635461736B202331 path=2F73746F726167652F656D756C617465642F302F4A6564752F31383530303139385F54726173612036362E677078 dev="sdcardfs" ino=376252 scontext=u:r:untrusted_app:s0:c247,c256,c512,c768 tcontext=u:object_r:sdcardfs:s0 tclass=file
W/....debug: type=1400 audit(0.0:114277): avc: granted { write } for comm=4173796E635461736B202331 path=2F73746F726167652F656D756C617465642F302F4A6564752F31383530303139385F54726173612036362E677078 dev="sdcardfs" ino=376252 scontext=u:r:untrusted_app:s0:c247,c256,c512,c768 tcontext=u:object_r:sdcardfs:s0 tclass=file
I/chatty: uid=10247(....debug) identical 1 line
W/....debug: type=1400 audit(0.0:114279): avc: granted { write } for comm=4173796E635461736B202331 path=2F73746F726167652F656D756C617465642F302F4A6564752F31383530303139385F54726173612036362E677078 dev="sdcardfs" ino=376252 scontext=u:r:untrusted_app:s0:c247,c256,c512,c768 tcontext=u:object_r:sdcardfs:s0 tclass=file

Technical information

pstorch commented 2 years ago

Interesting. Isn't the StrictMode only enabled in DEBUG builds? @vsevjednom-cz how did you capture the log? From the release version or from a selfbuild debug version?

pstorch commented 2 years ago

The error description sounds like #1141, @vsevjednom-cz can you check the nightly build?

vsevjednom-cz commented 2 years ago

@pstorch: hmm, it's weird. I didn't do anything but problem with export is away 🤪. I'll let you know if the problem comes back.

vsevjednom-cz commented 2 years ago

The problem is really weird - sometimes export crashes, sometimes not. But it looks like something about export is fixed in version 3.25.1. I started using this version. I'll let you know.

pstorch commented 2 years ago

It's still trial and error. I have problems with Nextcloud directories also with other Apps (e.g. KeePassDX).

vsevjednom-cz commented 2 years ago

Everything works without any problem in v3.25.1 🥳.