momentum-xyz / ubercontroller

New controller
GNU Affero General Public License v3.0
9 stars 1 forks source link

Crash in harvester after minted NFT #287

Open dmitry-yudakov opened 11 months ago

dmitry-yudakov commented 11 months ago
2023-09-25T19:47:05.783+0300    DEBUG   arbitrum_nova_adapter/arbitrum_nova_adapter.go:165  GET:  0 1754 1754
2023-09-25T19:47:05.823+0300    DEBUG   arbitrum_nova_adapter/arbitrum_nova_adapter.go:341  NFT
2023-09-25T19:47:05.823+0300    DEBUG   arbitrum_nova_adapter/arbitrum_nova_adapter.go:341  NFT
2023-09-25T19:47:05.823+0300    DEBUG   arbitrum_nova_adapter/arbitrum_nova_adapter.go:199  RETURN:  1754 1754 1
Block: 1754

2023-09-25T19:47:05.823+0300    DEBUG   node/nfts.go:22 Table Listener:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xd0 pc=0x100e58869]

goroutine 987 [running]:
github.com/momentum-xyz/ubercontroller/universe/node.(*Node).IsLocalWorld(0x101148bc0?, {0x0?, 0x0?})
    github.com/momentum-xyz/ubercontroller/universe/node/nfts.go:78 +0x29
github.com/momentum-xyz/ubercontroller/universe/node.(*Node).Listener(0xc0000ec140, {0xc000680401?, 0xc002268ac0?}, {0x1020fd730, 0x0, 0x1000111c7?}, {0x1020fd730, 0x0, 0x0}, {0xc0000147c0, ...})
    github.com/momentum-xyz/ubercontroller/universe/node/nfts.go:56 +0x64f
github.com/momentum-xyz/ubercontroller/harvester.(*Table2).ProcessLogs(0xc006052960, 0x6da, {0xc0022e5830, 0x1, 0x0?})
    github.com/momentum-xyz/ubercontroller/harvester/table2.go:210 +0x1744
github.com/momentum-xyz/ubercontroller/harvester.(*Table2).fastForward(0xc006052960)
    github.com/momentum-xyz/ubercontroller/harvester/table2.go:95 +0x434
github.com/momentum-xyz/ubercontroller/harvester.(*Table2).listener(...)
    github.com/momentum-xyz/ubercontroller/harvester/table2.go:236
github.com/momentum-xyz/ubercontroller/harvester/arbitrum_nova_adapter.(*ArbitrumNovaAdapter).Run.func1()
    github.com/momentum-xyz/ubercontroller/harvester/arbitrum_nova_adapter/arbitrum_nova_adapter.go:89 +0x165
created by github.com/momentum-xyz/ubercontroller/harvester/arbitrum_nova_adapter.(*ArbitrumNovaAdapter).Run
    github.com/momentum-xyz/ubercontroller/harvester/arbitrum_nova_adapter/arbitrum_nova_adapter.go:74 +0x1ce
make: *** [run] Error 2

It happened on my localhost with commit dc15732eb2f396d6bd065d7662a42c7a29c94f87

The reason is checking whether the world is local, but it requires the instance of the world while this happens before the world is created - we need another way of checking where the world should be hosted.

dmitry-yudakov commented 11 months ago

I temp disabled it in 22d9a66 as it keeps crashing on start