Project

General

Profile

Actions

Emulator Issues #747

closed

Unhandled exception while clicking arrows in AR codes with no data

Added by knuckles500 about 15 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

What steps will reproduce the problem?

  1. Right click a game you don't have a list of AR codes/cheats of
  2. Go to Properties
  3. Under the GameConfig Tab click the AR Codes Tab
  4. Click Add
  5. 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.

Actions #1

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.

Actions #2

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.

Actions #3

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

Actions #4

Updated by marcus about 15 years ago

well, I hope they add you, it would be a good addition to the team.

Actions #5

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?

Actions #6

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

Actions #7

Updated by daco65 about 15 years ago

i wonder why ppl haven't commited this then :P

Actions #8

Updated by marcus about 15 years ago

ok, I will then...

Actions #9

Updated by daco65 about 15 years ago

lol i was busy with it but go right ahead lol.

Actions #10

Updated by marcus about 15 years ago

ok, it's just that pastebin messes up the tabs, so this might take a while...

Actions #11

Updated by marcus about 15 years ago

  • Status changed from New to Fixed

Done.

Actions #12

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

Actions #13

Updated by sl1nk3.s about 15 years ago

yes, I just noticed that, thanks :)

Actions

Also available in: Atom PDF