grote / Transportr

Free Public Transport Assistant without Ads or Tracking
https://transportr.app
GNU General Public License v3.0
1.04k stars 187 forks source link

query crashes when routing to "Freizeit- und Erholungszentrum" #898

Open woffs opened 9 months ago

woffs commented 9 months ago

Describe the bug as reported in https://github.com/schildbach/public-transport-enabler/issues/550 the query crashes when routing to "Freizeit- und Erholungszentrum", which contains "- " (dash+space).

To Reproduce Steps to reproduce the behavior:

Screenshot_Transportr_20231218-164936

Expected behavior Routes as they appear when you choose destination POI "FEZ-Berlin", which works.

Versions (please complete the following information):

Altonss commented 9 months ago

Hello, Where did you download Transportr from? 2.0.5 seems to be a pretty old version, and everything works fine on the latest 2.1.5 version. Could you retry with the latest version?

woffs commented 9 months ago

sorry, I mistyped the version, I'm on 2.1.5

Altonss commented 9 months ago

It might be related to : https://github.com/grote/Transportr/issues/207 Can you try routing from somewhere else then the "Ahornallee" in your favorites? It might be that the location saved as favorite has changed ID in the API like in #207

woffs commented 9 months ago

Same error when routing from a non-favourite start point. Same error when routing from "Freizeit- und Erholungszentrum" to anywhere. Maybe I should extract the sqlite DB (phone is rooted). :-)

Altonss commented 9 months ago

:thinking: It's very weird as I cannot reproduce this issue at all.

woffs commented 9 months ago
woffs commented 9 months ago

logcat says a bit more:

12-18 22:23:58.021   918  3292 W System.err: android.database.sqlite.SQLiteConstraintException: 
FOREIGN KEY constraint failed (code 787)                            12-18 
22:23:58.024   918  3292 W System.err:    at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native 
Method)                        12-18 22:23:58.024   918  3292 W System.err:    
at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:783)                  
12-18 22:23:58.024   918  3292 W System.err:    at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788)                        
12-18 22:23:58.024   918  3292 W System.err:    at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86)                                   
12-18 22:23:58.024   918  3292 W System.err:    at androidx.sqlite.db.framework.FrameworkSQLiteStatement.executeInsert(FrameworkSQLiteStatement.java:51)            
12-18 22:23:58.024   918  3292 W System.err:    at androidx.room.EntityInsertionAdapter.insertAndReturnId(EntityInsertionAdapter.java:114)                          
12-18 22:23:58.024   918  3292 W System.err:    at de.grobox.transportr.data.locations.LocationDao_Impl.addFavoriteLocation(LocationDao_Impl.java:195)              
12-18 22:23:58.024   918  3292 W System.err:    at de.grobox.transportr.data.locations.LocationRepository.addFavoriteLocation(LocationRepository.kt:88)             
12-18 22:23:58.024   918  3292 W System.err:    at de.grobox.transportr.trips.search.TripsRepository.queryTrips(TripsRepository.kt:121)                             
12-18 22:23:58.024   918  3292 W System.err:    at de.grobox.transportr.trips.search.TripsRepository.access$queryTrips(TripsRepository.kt:52)                       
12-18 22:23:58.024   918  3292 W System.err:    at de.grobox.transportr.trips.search.TripsRepository$search$1.invoke(TripsRepository.kt:104)                        
12-18 22:23:58.024   918  3292 W System.err:    at de.grobox.transportr.trips.search.TripsRepository$search$1.invoke(TripsRepository.kt:104)                        
12-18 22:23:58.024   918  3292 W System.err:    at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)                                                    
12-18 22:23:58.269   448   517 I BufferQueueProducer:
[de.grobox.liberario/de.grobox.transportr.trips.search.DirectionsActivity#0](this:0x7777662800,id:8235,api:1,p:918,c:448) 
queueBuffer: fps=34.56 dur=1012.72 max=266.12 min=10.81
woffs commented 9 months ago

Am 18.12.23 um 13:06 schrieb Frank Doepper:

  • so I guess station name "Freizeit- und Erholungszentrum" can not be inserted into locations for some reason and then FOREIGN KEY fails

same with "S+U Hauptbahnhof", I guess because of "+"