l3lackShark / gosumemory

Cross-Platform memory reader for osu!
GNU General Public License v3.0
692 stars 63 forks source link

gosumemory crashes in tournament mode #78

Closed itsmehoaq closed 3 years ago

itsmehoaq commented 3 years ago

Stacktrace:

fatal error: too many callback functions

goroutine 34 [running]:
runtime.throw(0x15ca275, 0x1b)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/runtime/panic.go:1116 +0x79 fp=0xc00018fb90 sp=0xc00018fb60 pc=0xfba359
syscall.compileCallback(0x14fa080, 0xc000180c40, 0xc00018fc01, 0x1)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/runtime/syscall_windows.go:89 +0x2de fp=0xc00018fbd0 sp=0xc00018fb90 pc=0xfe8b1e
syscall.NewCallback(...)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/syscall/syscall_windows.go:177
github.com/l3lackShark/gosumemory/mem.FindWindow(0x15c0c3c, 0xd, 0x0, 0x1656dc0, 0xc000210020)
        /home/blackshark/actions-runner/_work/gosumemory/gosumemory/mem/windows.go:59 +0xa5 fp=0xc00018fc30 sp=0xc00018fbd0 pc=0x115b265
github.com/l3lackShark/gosumemory/mem.FindProcess(0xc00006b0e0, 0xc00018fec0, 0x2, 0x2, 0x0, 0x0, 0x1656dc0, 0xc00004b1f0, 0x0)
        /home/blackshark/actions-runner/_work/gosumemory/gosumemory/mem/windows.go:141 +0x47e fp=0xc00018fd68 sp=0xc00018fc30 pc=0x115bbde
github.com/l3lackShark/gosumemory/memory.initBase(0xc028b117cce63474, 0xaaeec6825)
        /home/blackshark/actions-runner/_work/gosumemory/gosumemory/memory/init.go:57 +0xc5 fp=0xc00018fef0 sp=0xc00018fd68 pc=0x13244e5
github.com/l3lackShark/gosumemory/memory.Init()
        /home/blackshark/actions-runner/_work/gosumemory/gosumemory/memory/functions.go:72 +0xe53 fp=0xc00018ffe0 sp=0xc00018fef0 pc=0x1322013
runtime.goexit()
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc00018ffe8 sp=0xc00018ffe0 pc=0xfec961
created by main.main
        /home/blackshark/actions-runner/_work/gosumemory/gosumemory/main.go:48 +0x5ec

goroutine 1 [sleep]:
time.Sleep(0x5f5e100)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/runtime/time.go:188 +0xc9
github.com/l3lackShark/gosumemory/web.HTTPServer()
        /home/blackshark/actions-runner/_work/gosumemory/gosumemory/web/web.go:74 +0x45
main.main()
        /home/blackshark/actions-runner/_work/gosumemory/gosumemory/main.go:63 +0x62b

goroutine 14 [IO wait]:
internal/poll.runtime_pollWait(0x138be81c878, 0x72, 0x1658600)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/runtime/netpoll.go:222 +0x65
internal/poll.(*pollDesc).wait(0xc000198bb8, 0x72, 0x1446400, 0x0, 0x0)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/internal/poll/fd_poll_runtime.go:87 +0x4c
internal/poll.execIO(0xc000198a18, 0x15e4118, 0x1, 0x1356, 0x1)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/internal/poll/fd_windows.go:175 +0x105
internal/poll.(*FD).Read(0xc000198a00, 0xc00028c000, 0x1ef5, 0x1ef5, 0x0, 0x0, 0x0)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/internal/poll/fd_windows.go:441 +0x2ff
net.(*netFD).Read(0xc000198a00, 0xc00028c000, 0x1ef5, 0x1ef5, 0xc, 0x1642169, 0xc00028cae5)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/net/fd_posix.go:55 +0x56
net.(*conn).Read(0xc000006128, 0xc00028c000, 0x1ef5, 0x1ef5, 0x0, 0x0, 0x0)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/net/net.go:182 +0x95
crypto/tls.(*atLeastReader).Read(0xc00008a120, 0xc00028c000, 0x1ef5, 0x1ef5, 0x1410, 0xc00028cae0, 0xc0001f7728)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/crypto/tls/conn.go:779 +0x67
bytes.(*Buffer).ReadFrom(0xc000061780, 0x1656ca0, 0xc00008a120, 0xf8cc0c, 0x151b060, 0x159e8e0)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/bytes/buffer.go:204 +0xbb
crypto/tls.(*Conn).readFromUntil(0xc000061500, 0x138be81c960, 0xc000006128, 0x5, 0xc000006128, 0xc00028cae5)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/crypto/tls/conn.go:801 +0xf3
crypto/tls.(*Conn).readRecordOrCCS(0xc000061500, 0x0, 0x0, 0xc00008a040)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/crypto/tls/conn.go:608 +0x12d
crypto/tls.(*Conn).readRecord(...)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/crypto/tls/conn.go:576
crypto/tls.(*Conn).Read(0xc000061500, 0xc0001f1000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/crypto/tls/conn.go:1252 +0x16d
bufio.(*Reader).Read(0xc0001d2c60, 0xc0001ba578, 0x9, 0x9, 0xc0000880c0, 0xc0001f7d38, 0x15e4a00)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/bufio/bufio.go:227 +0x238
io.ReadAtLeast(0x1656ac0, 0xc0001d2c60, 0xc0001ba578, 0x9, 0x9, 0x9, 0xc000090030, 0xc00004a060, 0x0)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/io/io.go:314 +0x8e
io.ReadFull(...)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/io/io.go:333
net/http.http2readFrameHeader(0xc0001ba578, 0x9, 0x9, 0x1656ac0, 0xc0001d2c60, 0x0, 0x0, 0xc000098240, 0x0)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/net/http/h2_bundle.go:1477 +0x8e
net/http.(*http2Framer).ReadFrame(0xc0001ba540, 0xc000098240, 0x0, 0x0, 0x0)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/net/http/h2_bundle.go:1735 +0xa8
net/http.(*http2clientConnReadLoop).run(0xc0001f7fa8, 0x0, 0x0)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/net/http/h2_bundle.go:8257 +0x9c
net/http.(*http2ClientConn).readLoop(0xc00003f980)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/net/http/h2_bundle.go:8185 +0x76
created by net/http.(*http2Transport).newClientConn
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/net/http/h2_bundle.go:7175 +0x685

goroutine 35 [sleep]:
time.Sleep(0x5f5e100)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/runtime/time.go:188 +0xc9
github.com/l3lackShark/gosumemory/web.SetupStructure()
        /home/blackshark/actions-runner/_work/gosumemory/gosumemory/web/structure.go:34 +0x5a
created by main.main
        /home/blackshark/actions-runner/_work/gosumemory/gosumemory/main.go:55 +0x605

goroutine 37 [sleep]:
time.Sleep(0x5f5e100)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/runtime/time.go:188 +0xc9
github.com/l3lackShark/gosumemory/pp.GetData()
        /home/blackshark/actions-runner/_work/gosumemory/gosumemory/pp/pp.go:284 +0x6f
created by main.main
        /home/blackshark/actions-runner/_work/gosumemory/gosumemory/main.go:58 +0x653

goroutine 38 [sleep]:
time.Sleep(0xee6b280)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/runtime/time.go:188 +0xc9
github.com/l3lackShark/gosumemory/pp.GetFCData()
        /home/blackshark/actions-runner/_work/gosumemory/gosumemory/pp/iffc.go:118 +0x2d2
created by main.main
        /home/blackshark/actions-runner/_work/gosumemory/gosumemory/main.go:59 +0x66b

goroutine 39 [sleep]:
time.Sleep(0xee6b280)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/runtime/time.go:188 +0xc9
github.com/l3lackShark/gosumemory/pp.GetMaxData()
        /home/blackshark/actions-runner/_work/gosumemory/gosumemory/pp/max.go:110 +0x4c
created by main.main
        /home/blackshark/actions-runner/_work/gosumemory/gosumemory/main.go:60 +0x685

goroutine 40 [sleep]:
time.Sleep(0x5f5e100)
        /home/blackshark/actions-runner/_work/_tool/go/1.15.8/x64/src/runtime/time.go:188 +0xc9
github.com/l3lackShark/gosumemory/pp.GetEditorData()
        /home/blackshark/actions-runner/_work/gosumemory/gosumemory/pp/editor.go:124 +0xac
created by main.main
        /home/blackshark/actions-runner/_work/gosumemory/gosumemory/main.go:61 +0x69d
l3lackShark commented 3 years ago

It can't initialize the program for some reason, then hits the limit of WinAPI callbacks (2000). Send your tournament.cfg here

itsmehoaq commented 3 years ago

Ah, it was actually tournament.cfg fault. Since I'm setting up a new tournament client, the cfg was somehow empty and not being generated after the first startup in this mode. Copied the old cfg fixed the issue.