deltachat / deltachat-core-rust

Delta Chat Rust Core library, used by Android/iOS/desktop apps, bindings and bots 📧
https://delta.chat/en/contribute
Other
682 stars 87 forks source link

Success variable in dc_open callback is zero or not 1 #530

Closed Simon-Laux closed 5 years ago

Simon-Laux commented 5 years ago
Logfile: /home/simon/.config/DeltaChat/logs/2019-08-00-21-55-36.log
Fontconfig warning: "/etc/fonts/fonts.conf", line 100: unknown element "blank"
/home/simon/Documents/Projects/dcd-debug-env/deltachat-desktop/src/main/index.js:30
  throw err
  ^

Error: Failed to open

It's one of the more recent commits, the version from Friday noon worked.

hpk42 commented 5 years ago

why do you think this is core-rust related?

Simon-Laux commented 5 years ago

Because I upgraded rust master and it stopped working. From what I found out the error originates from the module.c in deltachts node. Probably has sth to do with the context refactorings

Am 16. September 2019 21:55:15 MESZ schrieb holger krekel notifications@github.com:

why do you think this is core-rust related?

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/deltachat/deltachat-core-rust/issues/530#issuecomment-531932487

-- Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.

flub commented 5 years ago

This doesn't give many clues to what is wrong in the core to me. There's two things we could do (or both is even better):

  1. automate this into some sort of test that can be passed to git-bisect. that'll give us some clue

  2. Somehow get a better traceback from javascript. We should at least know what function in the core it was calling and what it's return value was. Or just anything about what the core was doing, this doesn't give me any clue.

Simon-Laux commented 5 years ago

The only occurrence of "Failed to open" in our code is https://github.com/deltachat/deltachat-node/blob/master/src/module.c#L1355

So I suspect the context refactoring broke this binding function.

Jikstra commented 5 years ago

Probably we never test if the dc_open callback is getting called with a 1 as the first argument?