eos icon indicating copy to clipboard operation
eos copied to clipboard

meet error 3070000 when setting contract

Open GeneSourceCode opened this issue 8 years ago • 6 comments

I get error message

2018-07-31T08:48:35.299 thread-0 http_plugin.cpp:476 handle_exception ] Exception Details: 3070000 wasm_exception: WASM Exception env.calloc unresolveable {"module":"env","export":"calloc"} thread-0 wasm_interface.hpp:42 resolve {"mod_name":"env","export_name":"calloc"} thread-0 wasm_interface.hpp:44 resolve pending console output: {"console":""}

when I set my contract. I define no static object in the class and dont use calloc at all. what could be the problem? thx

GeneSourceCode avatar Jul 31 '18 08:07 GeneSourceCode

Did you use any library that potentially involves "calloc"?

taokayan avatar Jul 31 '18 10:07 taokayan

I only call the library provided by eosio

GeneSourceCode avatar Aug 01 '18 00:08 GeneSourceCode

I got it. the sstream header cant be included in contract source code. after I remove the header, the error is gone. but why?

breadbread1984 avatar Aug 01 '18 03:08 breadbread1984

i got the same error when i use atof to format string to float

hama avatar Aug 02 '18 14:08 hama

the istream and ostream can't be used in smart contract.

breadbread1984 avatar Aug 03 '18 03:08 breadbread1984

Please refer to latest eosio.cdt, code and documentation: https://github.com/EOSIO https://developers.eos.io/ If problem persists with latest version please raise new issue.

halsaphi avatar Nov 01 '18 06:11 halsaphi