llakssz / CIAngel

Download GOOD CIAs on your 3DS!
189 stars 19 forks source link

Download memory allocation failing #4

Closed DrakiaXYZ closed 8 years ago

DrakiaXYZ commented 8 years ago

Been getting stuck at Downloding contents - 1 of 2 for a while. Testing with a relatively small title (~90MB). Threw in a bit of debugging code and it seems to be failing on the linearAlloc in DownloadFile (It's returning nullptr). There's no checks on the call, so it just sits there if this call fails.

Title I'm using is Pokemon Picross: 000400000017C100

DrakiaXYZ commented 8 years ago

Best guess on this is that the original tool this was based off of (FirmwareDownloader) probably didn't have any large files it had to grab. The tools is still trying to allocate the entire memory buffer at once for every download, which doesn't work too well for larger things. I'm looking into a fix right now.

DrakiaXYZ commented 8 years ago

I've opened a pull request https://github.com/llakssz/CIAngel/pull/6 that should fix this issue.