Wieku / danser-go

Dancing visualizer of osu! standard maps and custom osu! client written in Go. Also a generator for osu! videos.
Other
749 stars 102 forks source link

Crash while importing #25

Closed LMNYX closed 3 years ago

LMNYX commented 4 years ago

panic: open C:\Users\jackg\AppData\Local\osu!\Songs\\13019 Daisuke Achiwa - BASARA\Daisuke Achiwa - BASARA (100pa-) [BASARA].osu: The system cannot find the path specified.

goroutine 1 [running, locked to thread]:
github.com/wieku/danser/beatmap.ParseBeatMap(0xc000336540, 0x0, 0x0)
        C:/Users/Wieku/go/src/github.com/wieku/danser/beatmap/parser.go:128 +0xea4
github.com/wieku/danser/beatmap.ParseBeatMapFile(0xc000006ab8, 0x9fac20)
        C:/Users/Wieku/go/src/github.com/wieku/danser/beatmap/parser.go:200 +0x154
github.com/wieku/danser/database.LoadBeatmaps.func1(0xc00083b900, 0x9b, 0xa53ee0, 0xc000edb650, 0x0, 0x0, 0x0, 0x0)
        C:/Users/Wieku/go/src/github.com/wieku/danser/database/manager.go:102 +0x35a
path/filepath.walk(0xc00083b900, 0x9b, 0xa53ee0, 0xc000edb650, 0xc000045580, 0x0, 0x0)
        C:/Go/src/path/filepath/path.go:358 +0x410
path/filepath.walk(0xc0009748c0, 0x6d, 0xa53ee0, 0xc000edb260, 0xc000045580, 0x0, 0x0)
        C:/Go/src/path/filepath/path.go:382 +0x2f2
path/filepath.walk(0xc000a759a0, 0x4f, 0xa53ee0, 0xc000edaa80, 0xc000045580, 0x0, 0x0)
        C:/Go/src/path/filepath/path.go:382 +0x2f2
path/filepath.walk(0xc0000702a0, 0x28, 0xa53ee0, 0xc0001b2cb0, 0xc000045580, 0x0, 0x20)
        C:/Go/src/path/filepath/path.go:382 +0x2f2
path/filepath.Walk(0xc0000702a0, 0x28, 0xc000045580, 0xd47980, 0x0)
        C:/Go/src/path/filepath/path.go:404 +0x10c
github.com/wieku/danser/database.LoadBeatmaps(0x0, 0x0, 0x8)
        C:/Users/Wieku/go/src/github.com/wieku/danser/database/manager.go:91 +0x211
main.run.func1()
        C:/Users/Wieku/go/src/github.com/wieku/danser/main.go:87 +0x5d2
github.com/faiface/mainthread.Call.func1()
        C:/Users/Wieku/go/src/github.com/faiface/mainthread/mainthread.go:63 +0x36
github.com/faiface/mainthread.Run(0x9fa988)
        C:/Users/Wieku/go/src/github.com/faiface/mainthread/mainthread.go:44 +0xc4
main.main()
        C:/Users/Wieku/go/src/github.com/wieku/danser/main.go:257 +0x4f```
Wieku commented 4 years ago

Was it the first run of danser? Does the map exist in osu?

LMNYX commented 4 years ago

Hello, yes this was a first run, and also yes map exist in osu.

Wieku commented 4 years ago

Was that the first map being loaded?

LMNYX commented 4 years ago

No, it wasn't. I can try and run it again later today and send full log

MasterZitron commented 4 years ago

I had the same error, but on my case the program wasn't finding the map because of a few missing characters

For example "98728 Tamura Yukari ft motsu from m.o.v.e - You & Me", it couldn't find that map, because on my songs folder there was missing dots in between "move"

image

I manually added them and it worked

image

On your case I'm not sure what's wrong, I downloaded the map and the names do match. You can try creating a new song folder and paste only the maps you want to use there

Wieku commented 4 years ago

@MasterZitron that's interesting, just tested that map and it works properly without dots

Wieku commented 4 years ago

Also it's a mania mapset so it should not have anything with crashing

Wieku commented 4 years ago

@lmnyx Are you sure that specific version still exists? It looks like it was removed. Because it crashes when it tries to refresh already cached beatmap. That's a bug for sure, but can you check that folder?

Wieku commented 4 years ago

I think I've found the cause of this issue. It happens when a beatmap has nested .osu file in its subdirectories or when the beatmap has landed in Failed directory.

Wieku commented 4 years ago

Should be fixed in upcoming update. Leaving this open for visibility. Current workaround is to remove .osu files that are in subdirectories of map directory (like */Songs/Brain Power/foo/bar.osu) or to clear Failed directory.