https://kotlinlang.org logo
s

saket

10/27/2020, 3:06 PM
What's the error stacktrace?
m

Maurice Jouvet

11/07/2020, 10:58 AM
Sorry didn't see your message. Because not in a thread.. I don't know how to see the stacktrace on iOS. Everything is working on Android...
Also for more information:
Copy code
sqldelight {
    database("Database") {
        dialect = "sqlite:3.24"
        packageName = "com.rjo.app.kmm.database"
    }
}
It's failling with this method:
Copy code
upsert {
  UPDATE FieldAudit
  SET type = :type, name = :name, min = :min, max = :max, libraryId = :libraryId,
  formLink = :formLink, isAllWords = :isAllWords, wordsId = :wordsId
  WHERE id = :id;

  INSERT OR IGNORE INTO FieldAudit (id, type, name, min, max, libraryId, formLink, isAllWords, wordsId)
  VALUES (:id, :type, :name, :min, :max, :libraryId, :formLink, :isAllWords, :wordsId);
}
It's an example (the other upsert is more complex)
s

saket

11/07/2020, 6:44 PM
yeah it's difficult to tell without looking at the stackstrace
m

Maurice Jouvet

11/22/2020, 12:06 PM
I understand... I also don't know why, but I can't have the stackTrace. (From Kotlin nor Swift) I tried lots of stuffs, even go back to Replace instead of Upsert, but not working..
So I have no idea on how can I fix this issue. I may have to remove KMM to use Swift only.... I'm stuck.
Hum, really weird, yesterday I recreate a new KMM project. (To try to reproduce). With the same configuration and when it's crash, I don't have it on my new project.. (Everything are the same... I'll dig into that..)
OMG!!!!
{
"id": 112,
"visibility": {
"isDisplayed": false,
"conditions": [
{
"baseFieldId": 321,
"baseFieldsetId": 111,
"baseTabId": 25,
"value": [
40
]
}
]
}
Not working because value == [40] but i'm looking to find that "value": ["40"]
No errror with you guys sorry for the inconvenience....
s

saket

11/23/2020, 5:08 PM
Glad you were able to figure it out!
m

Maurice Jouvet

11/27/2020, 9:38 AM
Yes... but unfortunately... This error came from the sqldelight.. (Can't change the server response right now, and with KotlinxSerialization I have the adequate configurations). There aren't any stackTrace on iOS. It's crashing on an ERROR_BAD_ACCESS. I didn't have the error on a manually call.
bindString(2, FieldSet.visibility?.let { database.FieldSetAdapter.visibilityAdapter.encode(it)}) --> ERROR_BAD_ACCESS. (It' from the bindString method)
If I call the same method here:
FieldSet.visibility?.let { database.FieldSetAdapter.visibilityAdapter.encode(it)}
--> No issues.
Hi, I wasn't able to reproduce it on a small project. So I have cleaned my project and here the link. https://web.tresorit.com/l/Z4xji#CpRD-Kdb6IprRS35N300bQ You can (if you have time or so) build and run the iOS version. And tell me if you see something weird? You just need to click on Connection (the credential are already hard coded, and the parsing/insertion is performed) Thanks in advance..
s

saket

12/07/2020, 7:28 PM
Nice. Can you create a new issue on github with this? http://github.com/cashapp/sqldelight/issues/new