nurpax/sqlite-simple

Nondeterministic `ErrorMisuse` on multiple runs of the same application test

aryairani opened this issue · 0 comments

I'm not sure where to begin with requesting help with this. I have an application and unit tests that I've just written to use sqlite-simple, but on some runs I get ErrorMisuse.

From a successful run:

Sqlite's debug output (Sqlite.setTrace conn (Just $ traceM . Text.unpack)):

SELECT base32 FROM hash WHERE id = 2

My debug output:

query "SELECT base32 FROM hash WHERE id = ?"
  input: Only {fromOnly = HashId 2}
 output: [Only {fromOnly = UnsafeBase32Hex {toText = "iipvjg8ufk4mohtnad5du7nk1ge6cp4gpoe1pbaa4il910b1t19eam27nk3nmufomplej5g520uqv1qo2kambnolaqpfbbbif111ch0"}}]

From a failing run:

Sqlite debug output: (none)
My debug output:

query "SELECT base32 FROM hash WHERE id = ?"
  input: Only {fromOnly = HashId 2}
(and crashed)

SQLite3 returned ErrorMisuse while attempting to perform prepare "SELECT base32 FROM hash WHERE id = ?": bad parameter or other API misuse

I know there's not a lot to go on here, but it seems like "not a me thing". Can you offer any ideas for how to find out more about what's going wrong?