Transportr icon indicating copy to clipboard operation
Transportr copied to clipboard

query crashes when routing to "Freizeit- und Erholungszentrum"

Open woffs opened this issue 1 year ago • 8 comments

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:

  • choose VBB as provider
  • route from somewhere to "Freizeit- und Erholungszentrum"

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):

  • Transportr Version: 2.1.5 (from F-Droid)
  • Device: Shiftphone 5me
  • Android Version: 8.1.0

woffs avatar Dec 18 '23 15:12 woffs

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?

Altonss avatar Dec 18 '23 16:12 Altonss

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

woffs avatar Dec 18 '23 16:12 woffs

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

Altonss avatar Dec 18 '23 16:12 Altonss

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). :-)

woffs avatar Dec 18 '23 17:12 woffs

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

Altonss avatar Dec 18 '23 17:12 Altonss

  • extracted transportr.db from phone
  • only foreign_key is
CREATE TABLE `searches` (`uid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `networkId` TEXT, `from_id` INTEGER NOT NULL, `via_id` INTEGER, `to_id` INTEGER NOT NULL, `count` INTEGER NOT NULL, `lastUsed` INTEGER, `favorite` INTEGER NOT NULL, FOREIGN KEY(`from_id`) REFERENCES `locations`(`uid`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`via_id`) REFERENCES `locations`(`uid`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`to_id`) REFERENCES `locations`(`uid`) ON UPDATE NO ACTION ON DELETE NO ACTION );
  • db does not contain string "Freizeit"
  • so I guess station name "Freizeit- und Erholungszentrum" can not be inserted into locations for some reason and then FOREIGN KEY fails
  • or it is something completely different

woffs avatar Dec 18 '23 21:12 woffs

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 avatar Dec 18 '23 21:12 woffs

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 "+"

woffs avatar Jan 05 '24 00:01 woffs