hakchi2 icon indicating copy to clipboard operation
hakchi2 copied to clipboard

Getting error 'System.OutOfMemeoryException' when trying to sync games with 2.14b

Open DatSpacedude opened this issue 9 years ago • 20 comments

img_0298 Process of syncing begins and prompt above sync meter reads "building folder structure....." for around 5 to 10 mins then error shows up. I'm sure I have correct hmods in folder. Never had a problem with 2.13e.

DatSpacedude avatar Mar 20 '17 22:03 DatSpacedude

Thanks for the reply and input. I'll try again at 250mb to see if that does it.

DatSpacedude avatar Mar 21 '17 01:03 DatSpacedude

I further tested perimeters, but will not edit this post...just read down below to see results of my further testing

I tested out my theory, and fixed this error. There may be fewer steps involved. But, this is exactly how I fixed the issue.

  1. Flash to Original Kernel
  2. Uninstall Hakchi2 traces
  3. Uninstalled all HMODS
  4. Flash Custom Kernel
  5. Synch 300mb of games,
  6. Reinstall HMODS:)
  7. Success:)

I just did everything I thought that would remedy the issue. You can probably remove 1 or more of these steps, and still succeed! But, this is foolproof! Note: You cannot install the drivers for the NEW transfer method, until you do custom flash, upon removing hakchi2 traces.

PS, I am going to retest this, to try to eliminate more steps, to better simplify and streamline this process.

KMFDManic avatar Mar 21 '17 01:03 KMFDManic

So I followed the steps you put and it did indeed work the first time I synced at 250mb. Then I tried to sync again, but at 281mb. This time I got the past results of getting the exception error, so I'm back to not knowing what is giving me this error. I'm going to try and sync without a certain game that I think is giving me troubles.

DatSpacedude avatar Mar 21 '17 03:03 DatSpacedude

I did further testing with this. My NES Mini, I was able to get to 300mb, by following the above steps. I tried helping another friend, but was limited on time. His NES Mini is still stuck at under 300mb. I am wondering if, on top of uninstalling hakchi2 remnants, past hmods, etc...the clovershell module for access to the mini, would help remove the "extra" files, once you know which ones to remove. The oddity here, is that...while being able to flash at JUST 250mb on 2.14b, (as an example) you can go right back to 2.13e and flash at 300mb, without issue. Somewhere, somehow, there is a memory issue:) What happens is that it starts to build the folder structure, then it gets stopped upon trying to actually transfer the files, if over the memory limit. Hopefully, it gets pinpointed. But, for now, my steps worked on my Mini. And, they should help others, as a temporary fix: til ClusterM gets to the bottom of things:) Sometimes, on various videogame systems, phones, etc, there is actually EXTRA room required for installation of certain things. I wonder if it NEEDS extra space for the "file transfers", that it wouldn't typically need in previous Hakchi2s. By having an absolutely clean system, with NO HMODS, etc...you can hit the 300mb without issue. But, with the files there, this possibly needed "extra space" becomes a conflict. It is an interesting puzzle:) I look forward to the official result of why it occurs.

KMFDManic avatar Mar 21 '17 03:03 KMFDManic

Yea, I kept getting the same results after running various syncs with different mb amounts and memory wipes. The only way I was able to get the sync to work was with the aforementioned methods you have pointed out above. For now I'm going to stick with 2.13e until (hopefully) we get a more reliable fix for this. Again, thanks for the help and input, highly appreciated.

DatSpacedude avatar Mar 21 '17 06:03 DatSpacedude

I streamlined my method, and can now flash at 300mb in fewer steps. I need to run a few more tests to confirm I am correct in my theory, then I will post how I did it:) If I am correct, Clusterm will not need to patch this. It is something that can be fixed fairly easily on the user end.

KMFDManic avatar Mar 22 '17 22:03 KMFDManic

Awesome, looking forward to test myself.

Sent from my iPod

On Mar 22, 2017, at 6:42 PM, KMFDManic [email protected] wrote:

I streamlined my method, and can now flash at 300mb. I need to run a few more tests, then I will post how I did it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

DatSpacedude avatar Mar 22 '17 23:03 DatSpacedude

Ok, DatSpacedude, try THIS test for me. See how things go. I was able to do 3 NES Minis on my end, and it worked. But, there is still a conflict on my friend's Mac. Anyways...

Have all the newest HMODS from pcm720 and clusterm in the user mods directory, uninstall everything you think you've used before, or just highlight each and every one. Once are all uninstalled, Try flashing at automatic with 290 mb or so, then with folders, if you use them. Let me know the results. I tested at 300mb with all 3 minis. Only failure right now is the Mac connected NES Mini. Clovershell crashed a few times on that setup.

KMFDManic avatar Mar 23 '17 00:03 KMFDManic

Upon further testing, HERE are the results...

-NES Mini, with NO HMODS installed. Flash at 299 MB, which is recommended hakchi2 limit, per gui warning. SUCCESS!!! -NES Mini, WITH HMODS installed, ran at 299, same exact games as previous test, FAIL!!! -NES Mini, WITH HMODS installed, 299mb MINUS exact size of HMODS that were installed, SUCCESS!!! -NES Mini. WITH NO HMODS installed. Flash at 299 MB, again, SUCCESS!!! THEN! Install same HMODS as earlier, SUCCESS!!!

So, then, what it comes down to, is this.

In order to flash at 299mb, you Cannot have HMODS installed, or they will directly affect how much data you can transfer. BUT, if you flash at 299, THEN install the HMODS, things are fine. So, anytime you need to reflash the 299 or similar, you must FIRST uninstall HMODS, then reflash games, THEN reinstall HMODS. This is definitely a memory bug issue.

Further testing, previous version, 2.13e. Successfully flashed 299mb WITH HMODS installed. 2.14b Failed to flash same game set from 2.13e at 299, WITH HMODS installed.

2.14b is GREAT, of course. But, this is the little loophole you have to workaround to get a 299 flash.

In essence, you cannot have ANY previous stuff installed, so you need to uninstall all previously installed HMODS. I tested the perimeter of NOT uninstalling hakchi2, and that appeared to have no effect on the 299mb. Only the HMODS did. It also appears that the exact size of your hmods, are how much less you can flash at, under 299, if you leave them installed. This is not an issue in 2.13e. I am still theorizing this is related to "space needed" for clovershell to apply the game set to the mini, file transfer wise.

I would recommend you rename your issue post to something along the lines of Memory Bug Conflict with HMODS installed, or similar. along with your original out of memory exception, DatSpacedude. I am glad I figured out the procedure to at least maintain a 299 mb set, for now:)

As a final note, I have successfully gotten 7 NES Minis working at 299 mb on Windows setups. My one friend, his is still stuck at under 299. He is on a Mac setup. There is a possibility of another conflict on Macs. So, ANY Mac users, your input and test results would be very welcome. This Mac user, originally had a soft bricked Mini NES, that I helped unbrick. I am curious as to whether "files" got stuck on his Mini, that are directly affecting his ability to get to 299. I will keep working with him on it, though! It is so much easier if I have a Mini right in my hands, to test and work on, however! But, I will do what I can to remotely help him. I would love to see the 299 flash work for Mac and Windows users, alike, til a patch or fix is posted!

KMFDManic avatar Mar 23 '17 14:03 KMFDManic

Nice find. Great testing.

Driche avatar Mar 23 '17 16:03 Driche

I did further testing, as well. You have approximately 310 mb of working space to install games and HMODS. That is 299 mb of games on Hakchi2, then slightly less than 10 mb of HMODS. If you bypass this, any HMODS bypassing that slightly under 10 mb point, will fail to work. So, if you have 299 of games, then add 12 in HMODS, the FINAL HMOD/S installed will fail to load games. So, using this mini formula. Add up total size of all HMODS you plan on using, then subtract their total size from 300mb, and flash with only that amount of games. 20 in HMODS, Flash with just 280 in games. I have not tested how save states are affected (as in if you are at 310 limit, if save states fail or not). I mainly cared about overall games and HMOD installations. So, as of right now, save states are the only test remaining. But, for the sake of being on the safe side, I would just leave room for them, regardless.

KMFDManic avatar Mar 23 '17 18:03 KMFDManic

I just finished testing using the methods you have given me and unfortunately, I'm still getting the same error exception result. I have tried syncing at 281 mb using 2.14 before uninstalling hmods and after uninstalling hmods. I have tried uninstalling hakchi from nesmini completely and reinstalling everything from there. I've tried compression toggled on and off when syncing, flashing the original kernel then going back to custom before syncing. I even went back, uninstalled everything I could and returned the nesmini back to factory settings. Even after all that I'm still getting the same error. Back to 2.13, yet again. Really wish this working or me, takes me about 45 to 75 mins to sync each time with 2.13, sometimes even longer.

DatSpacedude avatar Mar 23 '17 22:03 DatSpacedude

Yes, you have an exact point you are able to successfully flash at. Once you arrive at that number. You have to take into account any HMODS you plan on installing, and DELETE that amount of MB from your total successful Flash Number. In my case, I laid out every hakchi2 version I ever used, and opened up each and every one of them, uninstalling every HMOD that I previously used in each of them. THEN, I uninstalled hakchi2. Once I was back to factory spec, and reflashed the custom mod. I was able to flash at 299. Unfortunately, different people seem to have different results, depending on which hmods and hakchi versions they previously used. It is just a bug you have to accept, for now, if you want fast flashing:) I am sure Clusterm will fix it soon enough!

KMFDManic avatar Mar 24 '17 07:03 KMFDManic

Thanks for testing this.

baconcow avatar Mar 24 '17 08:03 baconcow

It's normal for 32-bit version of Windows. I'll try to optimize memory usage.

ClusterM avatar Mar 24 '17 12:03 ClusterM

Thanks clusterm. I do use 64bit, which is why I max out at 309 mb. 32bit users I helped out max out at 50mb less than that. I knew the amazing quick flashing ability would likely need to pull system resources somehow. Still, fantastic that the lightning quick flashes are even possible!! Despite you saying the "hype train" is gone, you will remain to have your dedicated fan base. Thanks for putting so much of your personal time into this project.

KMFDManic avatar Mar 24 '17 16:03 KMFDManic

As a final note, depending on whether you are on a 32 bit or 64 bit operating system, you will get about 250 mb or less max flash ability on 32 bit, and 299 or less max flash ability on 64 bit. This is determined by the inclusion of exclusion of previous save states and hmods So, If you are on 2.14b, figure out what size your hmods take up, and flash at 250mb - that for 32 bit, or 299 - that for 64 bit. If you use save states, expect to lose up to an additional 20 mb. So, factory settings on mini, to clear the save states, or subtract to compensate for save states. Clusterm is currently working on memory optimization for this bug. So, this is your best course of action til then:)

KMFDManic avatar Mar 24 '17 18:03 KMFDManic

Fixed. Please wait for the next release :)

ClusterM avatar Mar 28 '17 22:03 ClusterM

Thank You Cluster for the quick fix, hope it works for my problem and thanks Manic for all the testing and time you put into finding out why this certain error occurs. Looking forward to the new release.

DatSpacedude avatar Mar 29 '17 01:03 DatSpacedude

No problem at all. Cant have solutions without test results:)

KMFDManic avatar Mar 29 '17 01:03 KMFDManic