We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
While working on Issue #5, I encountered the following panic:
=== RUN TestGetUserForNFCToken --- FAIL: TestGetUserForNFCToken (0.01s) panic: runtime error: invalid memory address or nil pointer dereference [recovered] panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x80 pc=0x55a10e] goroutine 35 [running]: testing.tRunner.func1.2({0x8d0040, 0xce28f0}) /usr/lib/golang/src/testing/testing.go:1631 +0x24a testing.tRunner.func1() /usr/lib/golang/src/testing/testing.go:1634 +0x377 panic({0x8d0040?, 0xce28f0?}) /usr/lib/golang/src/runtime/panic.go:770 +0x132 database/sql.(*Rows).closemuRUnlockIfHeldByScan(0xd54340?) /usr/lib/golang/src/database/sql/sql.go:3366 +0xe database/sql.(*Rows).Close(0x0) /usr/lib/golang/src/database/sql/sql.go:3393 +0x18 github.com/Port39/go-drink/users.GetUserForId({0x9e1600, 0xd54340}, {0xc00012e660?, 0xc00019dda8?}, 0xc000117380) /home/derconno/workspaces/goland/go-drink/users/user.go:101 +0x37a github.com/Port39/go-drink/users.GetUserForNFCToken({0x9e1600, 0xd54340}, {0xc9b320?, 0xc00019df28?, 0x9264ef?}, 0xc000117380) /home/derconno/workspaces/goland/go-drink/users/user.go:139 +0x239 github.com/Port39/go-drink/users.TestGetUserForNFCToken(0xc000142820) /home/derconno/workspaces/goland/go-drink/users/users_test.go:129 +0x2cb testing.tRunner(0xc000142820, 0x962fa8) /usr/lib/golang/src/testing/testing.go:1689 +0xfb created by testing.(*T).Run in goroutine 1 /usr/lib/golang/src/testing/testing.go:1742 +0x390 Process finished with the exit code 1
The fix should be to not defer closing the result in the function GetUserForNFCToken, as the sqlite driver has concurrency problems.
GetUserForNFCToken
The text was updated successfully, but these errors were encountered:
the issue has been reported upstream: https://gitlab.com/cznic/sqlite/-/issues/189
Sorry, something went wrong.
closing rows before performing another query to fix issue #7
b6207a9
Merge pull request #8 from Port39/7-panic-when-using-sqlite-and-reque…
afb1542
…sting-a-user-by-their-nfc-token closing rows before performing another query to fix issue #7
derconno
Successfully merging a pull request may close this issue.
While working on Issue #5, I encountered the following panic:
The fix should be to not defer closing the result in the function
GetUserForNFCToken
, as the sqlite driver has concurrency problems.The text was updated successfully, but these errors were encountered: