Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
woffs opened this issue Dec 18, 2023 · 8 comments
Open

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

woffs opened this issue Dec 18, 2023 · 8 comments
Labels
bug 🐞 A functional defect or unexpected behavior.

Comments

@woffs
Copy link

woffs commented Dec 18, 2023

Describe the bug
as reported in schildbach/public-transport-enabler#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 woffs added the bug 🐞 A functional defect or unexpected behavior. label Dec 18, 2023
@Altonss
Copy link
Collaborator

Altonss commented Dec 18, 2023

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 Altonss added the needs info ℹ️ More information needed, label Dec 18, 2023
@woffs
Copy link
Author

woffs commented Dec 18, 2023

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

@Altonss
Copy link
Collaborator

Altonss commented Dec 18, 2023

It might be related to : #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
Copy link
Author

woffs commented Dec 18, 2023

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
Copy link
Collaborator

Altonss commented Dec 18, 2023

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

@woffs
Copy link
Author

woffs commented Dec 18, 2023

  • 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

@Altonss Altonss removed the needs info ℹ️ More information needed, label Dec 18, 2023
@woffs
Copy link
Author

woffs commented Dec 18, 2023

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
Copy link
Author

woffs commented Jan 5, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 A functional defect or unexpected behavior.
Projects
None yet
Development

No branches or pull requests

2 participants