My program works fine during non-release compilation, and I can make sure that the “Invalid memory access” error is not related to the binding API.
Even more strange is that I only fixed the bug by adding a line of
puts "xxx" code.
Just add a call to the puts method. The link is here: