Wieku/danser-go

invalid memory address error when replay dir doesnt exist

Closed this issue · 2 comments

Describe the bug
error when selecting replay when there is not a valid replay directory in the settings

Screenshots
image

Also triggered this so here are some logs:

2023/07/24 20:19:52 panic: runtime error: invalid memory address or nil pointer dereference
2023/07/24 20:19:52 goroutine 1 [running, locked to thread]:
2023/07/24 20:19:52 github.com/wieku/danser-go/framework/graphics/texture.(*Pixmap).NRGBA(...)
2023/07/24 20:19:52     D:/Program Files/OSU Tools/danser-go/framework/graphics/texture/pixmap.go:108
2023/07/24 20:19:52 github.com/wieku/danser-go/framework/platform.LoadIcons(0x0?, {0x7ff7a501d0f1, 0xa}, {0x0, 0x0})
2023/07/24 20:19:52     D:/Program Files/OSU Tools/danser-go/framework/platform/glfw.go:21 +0x1ee
2023/07/24 20:19:52 github.com/wieku/danser-go/app.run.func2()
2023/07/24 20:19:52     D:/Program Files/OSU Tools/danser-go/app/app.go:424 +0x16ea
2023/07/24 20:19:52 github.com/faiface/mainthread.Call.func1()
2023/07/24 20:19:52     C:/Users/PercyDan/go/pkg/mod/github.com/faiface/mainthread@v0.0.0-20171120011319-8b78f0a41ae3/mainthread.go:63 +0x26
2023/07/24 20:19:52 github.com/faiface/mainthread.Run(0x7ff7a5064188)
2023/07/24 20:19:52     C:/Users/PercyDan/go/pkg/mod/github.com/faiface/mainthread@v0.0.0-20171120011319-8b78f0a41ae3/mainthread.go:44 +0xc4
2023/07/24 20:19:52 github.com/wieku/danser-go/app.Run()
2023/07/24 20:19:52     D:/Program Files/OSU Tools/danser-go/app/app.go:836 +0x43c
2023/07/24 20:19:52 main.main()
2023/07/24 20:19:52     D:/Program Files/OSU Tools/danser-go/main.go:26 +0x3b
2023/07/24 20:19:52
2023/07/24 20:19:52 goroutine 18 [chan receive]:
2023/07/24 20:19:52 github.com/faiface/mainthread.Call(0x7ff7a5064180)
2023/07/24 20:19:52     C:/Users/PercyDan/go/pkg/mod/github.com/faiface/mainthread@v0.0.0-20171120011319-8b78f0a41ae3/mainthread.go:66 +0xb1
2023/07/24 20:19:52 github.com/wieku/danser-go/app.run()
2023/07/24 20:19:52     D:/Program Files/OSU Tools/danser-go/app/app.go:95 +0x46
2023/07/24 20:19:52 github.com/faiface/mainthread.Run.func1()
2023/07/24 20:19:52     C:/Users/PercyDan/go/pkg/mod/github.com/faiface/mainthread@v0.0.0-20171120011319-8b78f0a41ae3/mainthread.go:37 +0x26
2023/07/24 20:19:52 created by github.com/faiface/mainthread.Run
2023/07/24 20:19:52     C:/Users/PercyDan/go/pkg/mod/github.com/faiface/mainthread@v0.0.0-20171120011319-8b78f0a41ae3/mainthread.go:36 +0xb8
2023/07/24 20:19:52
2023/07/24 20:19:52 goroutine 19 [syscall, locked to thread]:
2023/07/24 20:19:52 syscall.SyscallN(0x1000?, {0xc000063be0?, 0x52?, 0xc000063c68?})
2023/07/24 20:19:52     C:/Program Files/Go/src/runtime/syscall_windows.go:557 +0x109
2023/07/24 20:19:52 syscall.Syscall6(0xc000547720?, 0x0?, 0xc000547720?, 0x54?, 0x0?, 0xc0001b2300?, 0xc000396008?, 0xc0001b2360?)
2023/07/24 20:19:52     C:/Program Files/Go/src/runtime/syscall_windows.go:501 +0x50
2023/07/24 20:19:52 syscall.getQueuedCompletionStatus(0x0?, 0x0?, 0x0?, 0x3000106?, 0xffffffff)
2023/07/24 20:19:52     C:/Program Files/Go/src/syscall/zsyscall_windows.go:836 +0x8a
2023/07/24 20:19:52 syscall.GetQueuedCompletionStatus(0xc0001b4f40?, 0xc00038c000?, 0xc000063d24, 0xfff?, 0x0?)
2023/07/24 20:19:52     C:/Program Files/Go/src/syscall/syscall_windows.go:1285 +0x45
2023/07/24 20:19:52 github.com/fsnotify/fsnotify.(*Watcher).readEvents(0xc0001b4f40)
2023/07/24 20:19:52     C:/Users/PercyDan/go/pkg/mod/github.com/fsnotify/fsnotify@v1.5.1/windows.go:382 +0x7a
2023/07/24 20:19:52 created by github.com/fsnotify/fsnotify.NewWatcher
2023/07/24 20:19:52     C:/Users/PercyDan/go/pkg/mod/github.com/fsnotify/fsnotify@v1.5.1/windows.go:47 +0x1d6
2023/07/24 20:19:52
2023/07/24 20:19:52 goroutine 20 [sleep]:
2023/07/24 20:19:52 time.Sleep(0xbebc200)
2023/07/24 20:19:52     C:/Program Files/Go/src/runtime/time.go:195 +0x13a
2023/07/24 20:19:52 github.com/wieku/danser-go/app/settings.setupWatcher.func1()
2023/07/24 20:19:52     D:/Program Files/OSU Tools/danser-go/app/settings/manager.go:92 +0x19d
2023/07/24 20:19:52 github.com/wieku/danser-go/framework/goroutines.runInternal.func1()
2023/07/24 20:19:52     D:/Program Files/OSU Tools/danser-go/framework/goroutines/goroutines.go:44 +0x59
2023/07/24 20:19:52 created by github.com/wieku/danser-go/framework/goroutines.runInternal
2023/07/24 20:19:52     D:/Program Files/OSU Tools/danser-go/framework/goroutines/goroutines.go:27 +0x65
2023/07/24 20:19:52
exit status 1
Wieku commented

@PercyDan54 completely unrelated. It means you've broken assets big time.