1) If the plugin is not in debug mode and you are using a JIT version, the lines will be probably wrong.
2) You are most likely using a stock which calls a native so the error is reported to be in the stock. Run the plugin in debug and it will show you who called the stock.