Emulator Issues #747
closedUnhandled exception while clicking arrows in AR codes with no data
0%
Description
What steps will reproduce the problem?
- Right click a game you don't have a list of AR codes/cheats of
- Go to Properties
- Under the GameConfig Tab click the AR Codes Tab
- Click Add
- Click the arrows on the right side of the window (I think they scroll
through the different codes)
What is the expected output? What do you see instead?
I think I was expecting them to be grayed out so you couldn't click them
when there isn't another AR code in a code list for a game. Instead, the
arrows are clickable which results in an Unhandled Exception error.
What version of the product are you using? On what operating system?
Dolphin SVN R2657 x64, Windows XP Pro SP2 x64
Please provide any additional information below.
Not much, but just be sure to try it on a game with no AR code list.
Updated by sl1nk3.s about 15 years ago
As I may be the one to blame here (see issue 608) :p
here's a patch for this : http://pastebin.com/m3748f2e2
It fixes a crash that was happening when entering a blank cheat code too.
Updated by marcus about 15 years ago
Well, you know the code better than I do.
Let's see if hrydgard of F|RES will make you a dev so you can upload it to the svn.
You certainly deserve it.
Updated by sl1nk3.s about 15 years ago
Well, thanks marcus. :)
Maybe i could help with general stuff if there's a place for me, but i'm still not so
good with C++ heh :p
Updated by marcus about 15 years ago
well, I hope they add you, it would be a good addition to the team.
Updated by daco65 about 15 years ago
say sl1nk3 , does that patch fix the whole thing (both this as what you did before)
or does it just revert?
Updated by sl1nk3.s about 15 years ago
It's not a revert : (see r2313 for previous changes)
Currently, the arrows isn't grayed out because there :
"EntrySelection->SetRange(0, (int)arCodes.size()-1);"
the start value is 0, and the max value is arCodes.size()-1 but when it's empty,
arCodes.size() = 0 and so the max value is -1, thus the max value is < to the min
value and it's screwed.
changing it to "EntrySelection->SetRange(0, (int)arCodes.size());" will work but will
cause a crash when trying to go on after reaching one of the maximum value.
So you need to check the maximum value, if it's inferior to the minimum then it's the
minimum.
As for the crash when entering blank codes, it's because it was doing the push_back()
before checking the content, sorry :p
Updated by daco65 about 15 years ago
i wonder why ppl haven't commited this then :P
Updated by daco65 about 15 years ago
lol i was busy with it but go right ahead lol.
Updated by marcus about 15 years ago
ok, it's just that pastebin messes up the tabs, so this might take a while...
Updated by marcus about 15 years ago
And, in case you haven't noticed, you're a dev now. Congrats.
Now go apply for the mailing group:
http://groups.google.com/group/dolphin-emu-dev