bedrock-tool / bedrocktool

a mostly working minecraft bedrock tool for downloading server worlds, skins and others
GNU General Public License v3.0
189 stars 22 forks source link

Error: assignment to entry in nil map #186

Closed afarhansib closed 4 months ago

afarhansib commented 5 months ago

Describe the bug Crash when joining a server.

Expected behavior Should not Crash

Desktop (please complete the following information):

Additional context Fatal Error occurred. --COPY FROM HERE-- Version: 1.38.0-3 Cmdline: [bedrocktool-windows-amd64-1.38.0-3-gui.exe] Error: assignment to entry in nil map stacktrace from panic: goroutine 98 [running]: runtime/debug.Stack() /opt/hostedtoolcache/go/1.22.4/x64/src/runtime/debug/stack.go:24 +0x5e github.com/bedrock-tool/bedrocktool/utils.PrintPanic({0x1467612f500, 0x14f3e40}) /home/runner/work/bedrocktool/bedrocktool/utils/panic.go:21 +0x2f github.com/bedrock-tool/bedrocktool/ui/gui/pages.(Router).Execute.func1.1({0x1467612f500, 0x14f3e40}) /home/runner/work/bedrocktool/bedrocktool/ui/gui/pages/router.go:251 +0x2a github.com/bedrock-tool/bedrocktool/utils/proxy.(Context).packetFunc.func1() /home/runner/work/bedrocktool/bedrocktool/utils/proxy/context.go:233 +0x45 panic({0x11567c0?, 0x14f3e40?}) /opt/hostedtoolcache/go/1.22.4/x64/src/runtime/panic.go:770 +0x132 github.com/bedrock-tool/bedrocktool/handlers/worlds/worldstate.(worldStateDefer).StoreMap(0xc0011e2390, 0xc00213f680) /home/runner/work/bedrocktool/bedrocktool/handlers/worlds/worldstate/defer.go:38 +0xe5 github.com/bedrock-tool/bedrocktool/handlers/worlds/worldstate.(World).StoreMap(0x24aa480?, 0x59882c8?) /home/runner/work/bedrocktool/bedrocktool/handlers/worlds/worldstate/world.go:247 +0x9e github.com/bedrock-tool/bedrocktool/handlers/worlds.(worldsHandler).chunkPackets(0xc00017c000?, {0x15054e8?, 0xc00213f680?}) /home/runner/work/bedrocktool/bedrocktool/handlers/worlds/packets.go:369 +0x156 github.com/bedrock-tool/bedrocktool/handlers/worlds.(worldsHandler).packetCB(0xc00017c000, {0x15054e8?, 0xc00213f680?}, 0x0, {0xc1955171c5d10be6?, 0xdd935d947?, 0x241eaa0?}, 0x2?) /home/runner/work/bedrocktool/bedrocktool/handlers/worlds/packets.go:139 +0x3bf github.com/bedrock-tool/bedrocktool/utils/proxy.(Context).packetFunc(0xc000bf0a88, {0x0?, 0x0?, 0x0?}, {0xc002ce6803, 0x151, 0x47fd}, {0x1503a10, 0xc00087dc50}, {0x1503a10, ...}) /home/runner/work/bedrocktool/bedrocktool/utils/proxy/context.go:265 +0x357 github.com/sandertv/gophertunnel/minecraft.(Conn).PacketFunc(0xc005068ba0?, {0x8?, 0x0?, 0x0?}, {0xc002ce6803?, 0x472645?, 0x5?}, {0x1503a10?, 0xc00087dc50?}, {0x1503a10, ...}) /home/runner/work/bedrocktool/bedrocktool/gophertunnel/minecraft/conn.go:250 +0x5d github.com/sandertv/gophertunnel/minecraft.parseData({0xc002ce6802, 0x152, 0x47fe}, {0x1525c88, 0xc001972008}, {0x1503a10, 0xc00087dc50}, {0x1503a10, 0xc00087c060}) /home/runner/work/bedrocktool/bedrocktool/gophertunnel/minecraft/packet.go:29 +0x1a6 github.com/sandertv/gophertunnel/minecraft.(*Conn).receive(0xc001972008, {0xc002ce6802, 0x152, 0x47fe}) /home/runner/work/bedrocktool/bedrocktool/gophertunnel/minecraft/conn.go:626 +0xb6 github.com/sandertv/gophertunnel/minecraft.listenConn(0xc001972008, 0xc0011e3b90, 0xc001051560, 0xc0010515c0) /home/runner/work/bedrocktool/bedrocktool/gophertunnel/minecraft/dial.go:326 +0x1ea created by github.com/sandertv/gophertunnel/minecraft.Dialer.DialContext in goroutine 41 /home/runner/work/bedrocktool/bedrocktool/gophertunnel/minecraft/dial.go:248 +0xb7d

--END COPY HERE--

olebeck commented 4 months ago

should be fixed now