filcuc/nimqml

Crash calling beginResetModel()

Dax89 opened this issue · 2 comments

Dax89 commented

Hi!

I'm trying to do a simple application so I can learn Nim by doing something fun, I've encountered a strange issue in my Qml Model:

Traceback (most recent call last)
/home/davide/Programmazione/Progetti/NIM/GHReleases/src/ghreleases.nim(16) ghreleases
/home/davide/Programmazione/Progetti/NIM/GHReleases/src/ghreleases.nim(13) main
/home/davide/.nimble/pkgs/nimqml-0.9.1/nimqml/private/qapplication.nim(8) exec
/home/davide/.nimble/pkgs/nimqml-0.9.1/nimqml/private/qobject.nim(131) qobjectCallback
/home/davide/.nimble/pkgs/nimqml-0.9.1/nimqml/private/qobject.nim(116) onSlotCalled
(4)                      onSlotCalled
/home/davide/Programmazione/Progetti/NIM/GHReleases/src/githubapi.nim(74) setUrl
/home/davide/.nimble/pkgs/nimqml-0.9.1/nimqml/private/qabstractitemmodel.nim(215) beginResetModel
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
zsh: segmentation fault (core dumped)  ./ghreleases

Basically the application crashes when I call beginResetModel(), if I remove this function call it hangs when the urlChanged() signal is called in setUrl() function (implemented in githubapi.nim).

OS and Packages versions:

  • OS: Arch Linux
  • NIM: Nim Compiler Version 1.7.1 [Linux: amd64]
  • DOtherSide: v0.8.1.r1.gf83a8b7-1 (compiled directly from AUR)

I have attached the application's source code (it's very small): GHReleases.tar.gz

Am I doing something wrong?

Should be fixed with the latest master of DOtherSide see commit filcuc/dotherside@41873d4

Dax89 commented

It works! Grazie mille 🥇