Bug 470643 - After importing a PDF ticket, KDE Itinerary freezes when station coordinates cannot be found
Summary: After importing a PDF ticket, KDE Itinerary freezes when station coordinates ...
Status: RESOLVED FIXED
Alias: None
Product: KDE Itinerary
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Android Android 12.x
: NOR normal
Target Milestone: ---
Assignee: Volker Krause
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-04 21:36 UTC by Szőts Ákos
Modified: 2023-06-23 18:55 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In: 23.04.3
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Szőts Ákos 2023-06-04 21:36:29 UTC
I imported a ticket into Itinerary, but it completely froze right after. After a restart it displayed the imported ticket normally.

What I observed is that Itinerary tries to search for coordinates for stations. If it could not find them, it freezes. When it could find them, I didn't notice a freeze.

Something similar appeared in the logs:

Non-working condition logs:
itinerary: "Station 1" nan nan
itinerary: "Station 2" nan nan

Working condition logs:
itinerary: "Station 1" Coord1_1 Coord1_2
itinerary: "Station 2 with track info" Coord2_1 Coord2_2
Comment 1 Volker Krause 2023-06-23 14:49:35 UTC
Git commit 0ef3aa53895980a82d79940aa7494f1d700cea84 by Volker Krause.
Committed on 23/06/2023 at 14:48.
Pushed by vkrause into branch 'release/23.04'.

Ensure we pass content: URLs fully encoded to Android API and QFile

This fixes the app crashing due to an unhandled security exception when
trying to open a file with e.g. a space anywhere in its name or path.

content: URLs we get from the file dialog need to get back into Android
API (via QFile or otherwise) as exactly the same string, any kind of
changes e.g. to the URL encoding are not considered to be the same file,
and thus a file we have no permission to access to.
FIXED-IN: 23.04.3

M  +1    -1    src/app/filehelper.cpp
M  +1    -1    src/kandroidextras/android/uri.cpp

https://invent.kde.org/pim/itinerary/-/commit/0ef3aa53895980a82d79940aa7494f1d700cea84
Comment 2 Szőts Ákos 2023-06-23 18:55:17 UTC
Nice catch, thank you for the fix!