mashingan / excelin

Create and read Excel file purely in Nim
MIT License
51 stars 1 forks source link

SegFault with 0.4.8 after every call to .row()[] #4

Closed nick133 closed 2 years ago

nick133 commented 2 years ago

Sorry, I can't reopen issue that I haven't closed. Here is what's happening at runtime:

Traceback (most recent call last)
/home/nick/Projects/Code/xlstest/src/xlstest.nim(53) xlstest
/home/nick/Projects/Code/xlstest/src/xlstest.nim(41) main
/home/nick/.nimble/pkgs/excelin-0.4.8/excelin/internal_rows.nim(7) row
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
mashingan commented 2 years ago

It's okay, lets this a new issue instead.

Now, regarding the issue itself, it's strange though, we ran the nimble test without crashing and also local development files normally. Tried running with WSL (Ubuntu 20.04) with Nim 1.6.6 and Devel, worked fine. With -d:danger and --mm:orc or --mm:arc also ran no problem.

Could you elaborate on what to do to reproduce it?

mashingan commented 2 years ago

Ah, just remembered, when you're fetching sheet, the sheet object could be nil when the excel object couldn't find the sheet. You can make sure which the sheet name available with sheetNames procs in order to see sheets' name. You can refer the 2nd example in readme.

nick133 commented 2 years ago

you are right, it was my blind mistake, I forgot to rename sheet in tested xlsx to that reffered in code, sorry. Thanks for fast resolving, it works as expected everytime now!