-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
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
amino.Unmarshal
doesn't work without unused import
#1197
Comments
There are two issues.
|
Fix the second issue in gnolang#1197 - Before fix, if a Amino type was not imported as registered Amino package, we got stack overflow runtime: goroutine stack exceeds 1000000000-byte limit runtime: sp=0xc02050c458 stack=[0xc02050c000, 0xc04050c000] fatal error: stack overflow - After fix, if a Amino type was not imported as registered Amino package, we could print the message to verify what has been imported for debugging purpose Error: unable to unmarshal with amino, unmarshal to std.Tx failed after 17 bytes (error reading slice contents: unrecognized concrete type full name vm.m_call of map[abci.BlockParams:TypeInfo{Type:abci.BlockParams,Registered:true,PointerPreferred:false,TypeURL:"/abci.BlockParams",ReprType:,Fields:[]amino.FieldInfo{amino.FieldInfo{Type:(*reflect.rtype)(0x104cfc920), TypeInfo:(*amino.TypeInfo)(0x1400011c6e0), Name:"MaxTxBytes", Index:0, ........
This issue is still not resolved, please don't close it until we find a solution to the problem |
amino.Unmarshal
doesn't work without unused importDescription
For some reason, calling
amino.Unmarhsal
without importing an unused package_ "github.com/gnolang/gno/gno.land/pkg/sdk/vm"
causes a stack overflow exception.Your environment
master
(ce258b1)Steps to reproduce
Create a test file:
Running this test should produce a stack overflow error:
Now, add the unused import:
Running the test now should be good, with the transaction being printed:
Expected behaviour
Calling
amino.Unmarshal
should work with just the base import"github.com/gnolang/gno/tm2/pkg/amino"
.Actual behaviour
Calling
amino.Unmarshal
without the unused import (_ "github.com/gnolang/gno/gno.land/pkg/sdk/vm"
) causes a stack overflow exception.Logs
Proposed solution
No proposed solution as of now.
The text was updated successfully, but these errors were encountered: