Hacking Wii backup Manager for Windows

fig2k4

Well-Known Member
OP
Member
Joined
Oct 30, 2009
Messages
758
Trophies
0
Location
Scotland
Website
www.wiibackupmanager.co.uk
XP
174
Country
Right, so I have definitely introduced a bug somewhere. I should try to recover from this message, so I can get the log.

I just want to point out that this integer overflow message is for debugging purposes. The message isn't actually a bug, it's just pointing out that there is one, potentially, so I can track it down. I can disable checking and everything will run smoothly, but the files could be corrupt. I'd much prefer getting grief about things I can fix, rather than totally guessing what the problem could be.
smile.gif
 

pontomedon

Active Member
Newcomer
Joined
Nov 18, 2009
Messages
36
Trophies
0
XP
79
Country
Australia
fig2k4 said:
Can you tell me exactly what you were doing when it happened? The file system transferring from/to, where in the transfer it happened, the size of the game. etc.

I was transferring from rar'd isos on NTFS to wbfs folders on fat.

I think i remember it happened during adding of a game (not during extracting a game), it *think* the game where it happened was 'Ninja Reflex' (RNZP69) which is only 944 MB in size. But i could be wrong on that, sorry, i don't have the log anymore. Anyway, after i deleted the game where it happened from the disk (using windows explorer) and restarted the manager, everything worked. So i guess it's not the game that's causing problems.

When i encounter the bug again i will save the log to be more helpfull ;-)
 

fig2k4

Well-Known Member
OP
Member
Joined
Oct 30, 2009
Messages
758
Trophies
0
Location
Scotland
Website
www.wiibackupmanager.co.uk
XP
174
Country
I found something in the rar code that might cause it. Does it happen at the start of the transfer?

When I open the rar file I had this..

HeaderData.packSize and HeaderData.UnpSize are 32 bit which could cause an error if the total size was over 4 gig. Which is almost always with the fUnPackedSize.
unsure.gif


fPackedSize := HeaderData.packSize + (int64(HeaderData.packSizeHigh) shl 32);
fUnPackedSize := HeaderData.UnpSize + (int64(HeaderData.UnpSizeHigh) shl 32);

when it should be this..

fPackedSize := int64(HeaderData.packSize) + (int64(HeaderData.packSizeHigh) shl 32);
fUnPackedSize := int64(HeaderData.UnpSize) + (int64(HeaderData.UnpSizeHigh) shl 32);
 

Bloodlust

Well-Known Member
Member
Joined
May 25, 2006
Messages
1,122
Trophies
0
Website
Visit site
XP
609
Country
Hong Kong
fig2k4 said:
Right, so I have definitely introduced a bug somewhere. I should try to recover from this message, so I can get the log.

I just want to point out that this integer overflow message is for debugging purposes. The message isn't actually a bug, it's just pointing out that there is one, potentially, so I can track it down. I can disable checking and everything will run smoothly, but the files could be corrupt. I'd much prefer getting grief about things I can fix, rather than totally guessing what the problem could be.
smile.gif

It's definitely not corrupted files. But it does have a password. And files like these have the potential of crashing the program. Besides the integer overflow error also causes the program to be unable to launch properly again as it always prompts me with a "unable to create temp folder" or something like that. I'll capture the snapshots if encounted again...
 

giantpune

Well-Known Member
Member
Joined
Apr 10, 2009
Messages
2,860
Trophies
0
XP
213
Country
United States
ive got another issue just come up. somebody has brought me a drive that this program cannot access. it is a seagate free agent. i have completely wiped out the drive in gparted and created a new FAT partition. Then tried to use this app to format it to WBFS. the log says that it it formatted correctly, but when i go to put games on it, i get a invalid handle error in the log. I went back through older versions and every version does the same. I have also destroyed the partiition and recreated it with windows disk manager. And the same thing happens. WBFS manager 3, USB Loader GX, and oggzee's wbfs_file1.9 can all read/write to the partition and games play fine. It is only this one drive that this happens for, all my others work fine.
 

fig2k4

Well-Known Member
OP
Member
Joined
Oct 30, 2009
Messages
758
Trophies
0
Location
Scotland
Website
www.wiibackupmanager.co.uk
XP
174
Country
QUOTE said:
It's definitely not corrupted files.
I meant that the app could be creating corrupt files if i just ignore it.

Without the fix I mentioned, I've tested rar (single and multi-volume) without problems. Copying to and from WBFS seems OK. I still think it would be a good idea to intercept the overflow message and save the log for debug, before quitting the app. Or it should be possible just to carry on with the next file.

A quick way for people to report bugs would be an good idea too, to quickly email me the log. The more logs I receive the easier it will be to fix things.
 

jstevenson72

Well-Known Member
Newcomer
Joined
Feb 19, 2007
Messages
77
Trophies
0
Age
51
Location
61240
XP
258
Country
United States
In many of my apps, I put a button in the UI to send an email with the log attached... simple but effective... I usually pop a dialog to ask them, "What was happening" or "Why are you sending me this" kind of thing.
 

dun4cheap

Well-Known Member
Member
Joined
Mar 15, 2009
Messages
179
Trophies
0
XP
49
Country
United States
fig2k4 said:
That sounds similar to select "Items not in folder" that was requested dun4cheap. It may actually be better to use the file list though, since you can load files from multiple sources into the file list, instead of just checking against the contents of 1 folder.

It's much easier to implement too, since I can just use the lists already loaded to compare.


This way would work and may be more simple to understand for users.
 

Bloodlust

Well-Known Member
Member
Joined
May 25, 2006
Messages
1,122
Trophies
0
Website
Visit site
XP
609
Country
Hong Kong
fig2k4 said:
QUOTE said:
It's definitely not corrupted files.
I meant that the app could be creating corrupt files if i just ignore it.

Without the fix I mentioned, I've tested rar (single and multi-volume) without problems. Copying to and from WBFS seems OK. I still think it would be a good idea to intercept the overflow message and save the log for debug, before quitting the app. Or it should be possible just to carry on with the next file.

A quick way for people to report bugs would be an good idea too, to quickly email me the log. The more logs I receive the easier it will be to fix things.

Just managed to catch a bug. I put a Wii disc to convert to wbfs. Under "transfer" I already selected "wbfs", but the output is an ISO file...
 

Bloodlust

Well-Known Member
Member
Joined
May 25, 2006
Messages
1,122
Trophies
0
Website
Visit site
XP
609
Country
Hong Kong
Bloodlust said:
fig2k4 said:
QUOTE said:
It's definitely not corrupted files.
I meant that the app could be creating corrupt files if i just ignore it.

Without the fix I mentioned, I've tested rar (single and multi-volume) without problems. Copying to and from WBFS seems OK. I still think it would be a good idea to intercept the overflow message and save the log for debug, before quitting the app. Or it should be possible just to carry on with the next file.

A quick way for people to report bugs would be an good idea too, to quickly email me the log. The more logs I receive the easier it will be to fix things.

Just managed to catch a bug. I put a Wii disc to convert to wbfs. Under "transfer" I already selected "wbfs", but the output is an ISO file...

Just tried converting another wii disc to wbfs. Outcome is still ISO...

Version is beta 2 test 2
 

pontomedon

Active Member
Newcomer
Joined
Nov 18, 2009
Messages
36
Trophies
0
XP
79
Country
Australia
fig2k4 said:
I found something in the rar code that might cause it. Does it happen at the start of the transfer?

When I open the rar file I had this..

HeaderData.packSize and HeaderData.UnpSize are 32 bit which could cause an error if the total size was over 4 gig. Which is almost always with the fUnPackedSize.
unsure.gif


fPackedSize := HeaderData.packSize + (int64(HeaderData.packSizeHigh) shl 32);
fUnPackedSize := HeaderData.UnpSize + (int64(HeaderData.UnpSizeHigh) shl 32);

when it should be this..

fPackedSize := int64(HeaderData.packSize) + (int64(HeaderData.packSizeHigh) shl 32);
fUnPackedSize := int64(HeaderData.UnpSize) + (int64(HeaderData.UnpSizeHigh) shl 32);

As far as i remember it happened right in the middle of the transfer and not during extracting, so i guess the unrar code shouldn't be involved there. I think it must somehow be related to the queue length of the transfer job - it happend at the ~50th game, and this game worked fine after a restart.
 

fig2k4

Well-Known Member
OP
Member
Joined
Oct 30, 2009
Messages
758
Trophies
0
Location
Scotland
Website
www.wiibackupmanager.co.uk
XP
174
Country
@Bloodlust
For now, untick the "Use ISO on NTFS" when you want to transfer to .wbfs.. Another silly error easily fixed.

@TeenTin
It seems that you you get a read error.
smile.gif
Can you translate the error message for me and if you have time, do that again with full debug?

@pontomedon
I'm thinking it's maybe caused by the transfer times then (total,remaining). If that game worked on it's own, then it's nothing to do with the actual files. It would explain why I can't track it down because I haven't transferred large batches for a while, queues that take hours..

Were you transferring files to drive 1? I can simulate the large numbers by adding a few days to the time or even subtracting few days. If I've left an unsigned 32 bit integer around anywhere, the remaining time dropping below zero would cause it. I thought I fixed that, but it could be the same thing somewhere I didn't look.
 

TeenTin

Well-Known Member
Member
Joined
Jun 20, 2007
Messages
1,256
Trophies
1
XP
851
Country
Hong Kong
fig2k4 said:
@TeenTin
It seems that you you get a read error.
smile.gif
Can you translate the error message for me and if you have time, do that again with full debug?

The (chinese) error message is : Control code invalid.

0.3 release has no error with exactly the same condition.


Would you please tell me how to do the full debug ?

Besides, may I request implementing an option to disable the MD5 code, so that I can (hex) compare the files generated with that generated by wdfs_file.exe more easily ?

Thank you very much indeed !
happy.gif
 

fig2k4

Well-Known Member
OP
Member
Joined
Oct 30, 2009
Messages
758
Trophies
0
Location
Scotland
Website
www.wiibackupmanager.co.uk
XP
174
Country
I've changed a few things..

- System error messages now show the error code as well as the description
- 2 potential integer overflow fixes (one of them may fix the read error too)
- Disabled MD5 hashing
- Full debug by default (change it in "Debug level" menu on the log page)
- Application exceptions should be logged, instead of showing the message dialog
- DVD->WBFS file should work.

http://www.4shared.com/file/175843620/a6be...eta2-test3.html


Edit:
@giantpune

I just noticed your post, I didn't scroll up that far until now.
mellow.gif
The only way I'd be able to realistically debug that is if I had one of those drives physically connected to my PC, so I could see what happens. Maybe dumping the drive structure with Wiimms tools would show something, if you can do that?
 

pontomedon

Active Member
Newcomer
Joined
Nov 18, 2009
Messages
36
Trophies
0
XP
79
Country
Australia
fig2k4 said:
Were you transferring files to drive 1?
Yes, i transferred to drive one, The total time it gave me was about 6 hours, and it was running for about 2 hours when the error ocurred.
btw: the thing about the multi part rars i mentioned (that it displays only the size of the first part) seems to influence the calculation of the remaining time, it always took longer than the program stated.
 

fig2k4

Well-Known Member
OP
Member
Joined
Oct 30, 2009
Messages
758
Trophies
0
Location
Scotland
Website
www.wiibackupmanager.co.uk
XP
174
Country
I think the only way to get the real size of the file is to open all the volumes manually and sum up the file sizes. I thought the total size would already be in the header of the first rar file, but apparently not. It means opening multi-volume rars will be slower, but still way better than extracting them all before you can use them.
smile.gif
 

pontomedon

Active Member
Newcomer
Joined
Nov 18, 2009
Messages
36
Trophies
0
XP
79
Country
Australia
oh thats a pity - and you can't get the compressed size of a file out of the header? I can't really imagine winrar not saving such a property somewhere because if you open a multi part archive in winrar and selecting "show information" from the context menu of the iso file, it gives two properties: "Total Size" which is the extracted size of the iso, and "Packed Size", which is the compressed size of the iso and exactly the size you would need for an estimation.
 

fig2k4

Well-Known Member
OP
Member
Joined
Oct 30, 2009
Messages
758
Trophies
0
Location
Scotland
Website
www.wiibackupmanager.co.uk
XP
174
Country
Noted. Did you try adding a disc to WBFS?

@pontomedon
From the user's point of view nothing will change, the app will need to do this transparently. If you open the rar file in WinRAR, you'll probably notice that there's more disk activity opening a multi-volume rar than a single rar file, for this reason..
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: I am the cancer!!! lol