joernlenoch / playview-extractor

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

Problems with Ni no Kuni Remaster #1

Closed CalicoStonewolf closed 6 days ago

CalicoStonewolf commented 1 week ago

I was trying to use your Playview Extractor, trying to make rips of all of the different languages of the Wizard's Companion books from the Ni no Kuni remaster, and it keeps giving me a error that it's ran out of memory, and spits out a bunch of text afterwards. I ran the main.exe, in the folder with the gvd.dat file (there's also a content.dat and a gvd.dat.imd file, not sure if that helps any or not). It creates the "out" directory and the errors. I'm not very well versed with github or anything like that, I downloaded the Go language installer or whatever and compiled the program, but I wasn't sure if I needed more files in that directory or what's going on.

2024/08/31 22:50:17 Checking header TGDT0100 2024/08/31 22:50:17 ...done 2024/08/31 22:50:17 Number of Pages: 3036676096 runtime: VirtualAlloc of 412987949056 bytes failed with errno=1455 fatal error: out of memory

runtime stack: runtime.throw({0x409a0a?, 0xcce02cb000?}) C:/Program Files/Go/src/runtime/panic.go:1067 +0x4d fp=0x39d49ffc50 sp=0x39d49ffc20 pc=0x355c6d runtime.sysUsedOS(0xc000108000, 0x6028000000) C:/Program Files/Go/src/runtime/mem_windows.go:83 +0x1bb fp=0x39d49ffcb0 sp=0x39d49ffc50 pc=0x3036fb runtime.sysUsed(...) C:/Program Files/Go/src/runtime/mem.go:77 runtime.(mheap).allocSpan(0x4f5120, 0x3014000, 0x0, 0x0) C:/Program Files/Go/src/runtime/mheap.go:1345 +0x487 fp=0x39d49ffd58 sp=0x39d49ffcb0 pc=0x315c27 runtime.(mheap).alloc.func1() C:/Program Files/Go/src/runtime/mheap.go:962 +0x5c fp=0x39d49ffda0 sp=0x39d49ffd58 pc=0x3153dc runtime.systemstack(0x4edbe0) C:/Program Files/Go/src/runtime/asm_amd64.s:514 +0x49 fp=0x39d49ffdb0 sp=0x39d49ffda0 pc=0x35b389

goroutine 1 gp=0xc00003c000 m=0 mp=0x4ee840 [running]: runtime.systemstack_switch() C:/Program Files/Go/src/runtime/asm_amd64.s:479 +0x8 fp=0xc000027bc0 sp=0xc000027bb0 pc=0x35b328 runtime.(mheap).alloc(0x4?, 0x0?, 0x5e?) C:/Program Files/Go/src/runtime/mheap.go:956 +0x5b fp=0xc000027c08 sp=0xc000027bc0 pc=0x31533b runtime.(mcache).allocLarge(0x390680?, 0x6028000000, 0x0) C:/Program Files/Go/src/runtime/mcache.go:234 +0x87 fp=0xc000027c58 sp=0xc000027c08 pc=0x3024a7 runtime.mallocgc(0x6028000000, 0x400b60, 0x1) C:/Program Files/Go/src/runtime/malloc.go:1177 +0x5d0 fp=0xc000027cf8 sp=0xc000027c58 pc=0x352050 runtime.makeslice(0xc00001c360?, 0x0?, 0x2?) C:/Program Files/Go/src/runtime/slice.go:116 +0x49 fp=0xc000027d20 sp=0xc000027cf8 pc=0x356f89 main.readHeader(0xc000046088) C:/Users/(user)/Downloads/playview-extractor-1.1.1/main.go:476 +0x372 fp=0xc000027e88 sp=0xc000027d20 pc=0x3d6a32 main.main() C:/Users/(user)/Downloads/playview-extractor-1.1.1/main.go:134 +0x335 fp=0xc000027f50 sp=0xc000027e88 pc=0x3d30b5 runtime.main() C:/Program Files/Go/src/runtime/proc.go:272 +0x27d fp=0xc000027fe0 sp=0xc000027f50 pc=0x327a7d runtime.goexit({}) C:/Program Files/Go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000027fe8 sp=0xc000027fe0 pc=0x35d341

goroutine 2 gp=0xc00003c700 m=nil [force gc (idle)]: runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?) C:/Program Files/Go/src/runtime/proc.go:424 +0xce fp=0xc00003ffa8 sp=0xc00003ff88 pc=0x355d8e runtime.goparkunlock(...) C:/Program Files/Go/src/runtime/proc.go:430 runtime.forcegchelper() C:/Program Files/Go/src/runtime/proc.go:337 +0xb8 fp=0xc00003ffe0 sp=0xc00003ffa8 pc=0x327d98 runtime.goexit({}) C:/Program Files/Go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc00003ffe8 sp=0xc00003ffe0 pc=0x35d341 created by runtime.init.7 in goroutine 1 C:/Program Files/Go/src/runtime/proc.go:325 +0x1a

goroutine 3 gp=0xc00003ca80 m=nil [GC sweep wait]: runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?) C:/Program Files/Go/src/runtime/proc.go:424 +0xce fp=0xc000041f80 sp=0xc000041f60 pc=0x355d8e runtime.goparkunlock(...) C:/Program Files/Go/src/runtime/proc.go:430 runtime.bgsweep(0xc00004c000) C:/Program Files/Go/src/runtime/mgcsweep.go:277 +0x94 fp=0xc000041fc8 sp=0xc000041f80 pc=0x311c34 runtime.gcenable.gowrap1() C:/Program Files/Go/src/runtime/mgc.go:203 +0x25 fp=0xc000041fe0 sp=0xc000041fc8 pc=0x306565 runtime.goexit({}) C:/Program Files/Go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000041fe8 sp=0xc000041fe0 pc=0x35d341 created by runtime.gcenable in goroutine 1 C:/Program Files/Go/src/runtime/mgc.go:203 +0x66

goroutine 4 gp=0xc00003cc40 m=nil [GC scavenge wait]: runtime.gopark(0xc00004c000?, 0x435900?, 0x1?, 0x0?, 0xc00003cc40?) C:/Program Files/Go/src/runtime/proc.go:424 +0xce fp=0xc000053f78 sp=0xc000053f58 pc=0x355d8e runtime.goparkunlock(...) C:/Program Files/Go/src/runtime/proc.go:430 runtime.(*scavengerState).park(0x4edaa0) C:/Program Files/Go/src/runtime/mgcscavenge.go:425 +0x49 fp=0xc000053fa8 sp=0xc000053f78 pc=0x30f669 runtime.bgscavenge(0xc00004c000) C:/Program Files/Go/src/runtime/mgcscavenge.go:653 +0x3c fp=0xc000053fc8 sp=0xc000053fa8 pc=0x30fbdc runtime.gcenable.gowrap2() C:/Program Files/Go/src/runtime/mgc.go:204 +0x25 fp=0xc000053fe0 sp=0xc000053fc8 pc=0x306505 runtime.goexit({}) C:/Program Files/Go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000053fe8 sp=0xc000053fe0 pc=0x35d341 created by runtime.gcenable in goroutine 1 C:/Program Files/Go/src/runtime/mgc.go:204 +0xa5

goroutine 5 gp=0xc00003cfc0 m=nil [finalizer wait]: runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?) C:/Program Files/Go/src/runtime/proc.go:424 +0xce fp=0xc000055e20 sp=0xc000055e00 pc=0x355d8e runtime.runfinq() C:/Program Files/Go/src/runtime/mfinal.go:193 +0x107 fp=0xc000055fe0 sp=0xc000055e20 pc=0x305627 runtime.goexit({}) C:/Program Files/Go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000055fe8 sp=0xc000055fe0 pc=0x35d341 created by runtime.createfing in goroutine 1 C:/Program Files/Go/src/runtime/mfinal.go:163 +0x3d

joernlenoch commented 1 week ago

Hi!

I've build the playview extractor for a friend of mine to extract German and English "Ni No Kuni" images. I've never tried it on anything else as I do not own any.

2024/08/31 22:50:17 Number of Pages: 3036676096
runtime: VirtualAlloc of 412987949056 bytes failed with errno=1455
fatal error: out of memory

Hmmm.. interesting. 384 GB of Memory seems a bit exessiv :-D.

Could you tell me how big the .gvd file is? The other file was roughly 450 MB.

The typical output is like this...

.\playview-extractor.exe
2024/09/05 20:57:05 Checking header TGDT0100
2024/09/05 20:57:05 ...done
2024/09/05 20:57:05 Number of Pages: 181
2024/09/05 20:57:05  >> Header done.
2024/09/05 20:57:05  >> File names done.
2024/09/05 20:57:05   > Handle [top0001]
2024/09/05 20:57:05    .. Type [jpeg]
2024/09/05 20:57:09    .. Exported
2024/09/05 20:57:09   > Handle [top_chap1]
[...]

and outputs images like these (originals are roughly 35MB per image to avoid further compression!)

d348b30c-7afb-4c25-8d64-2d4cf0222e8d b40a62be-8544-4eaf-b985-c59a99bdf384

joernlenoch commented 1 week ago

If it is an option, you could try to send me the base file via google cloud.

It's always possible that they've changed something or we have some sort of weird special case going on...

CalicoStonewolf commented 1 week ago

If it is an option, you could try to send me the base file via google cloud.

It's always possible that they've changed something or we have some sort of weird special case going on...

The gvd.dat file is 1.79 GB in size (at least for the English book) (After looking at them, all languages are the same size). The content.dat file is 811kb. By base file, I'm assuming you mean the 1.79GB file? And I wouldn't be completely against stitching together images, but I'm unsure how to separate them in that way to begin with. But obviously wouldn't want to if I didn't need to, either.

joernlenoch commented 1 week ago

Hey!

Got it working, but will take another day to finalize.

Luckily, .dds is easily convertible to png via imagemagick, but I might want to add a mechanism which uses imagemagick directly or tries to load an previously exported and converted image from disk to create the final image.

All I got at the moment are ~16,5k image segments.

grafik

CalicoStonewolf commented 6 days ago

Whoa! Awesome work! Will it still be able to export to png for "lossless" when it's done? Thank you for taking a look into this, I appreciate it.

joernlenoch commented 6 days ago

Just published v1.2.0 which fixes your issues.

It raised some potential new problems, but we solve these as soon as new .gvd-files pop up.

trick