Patch for crash on linux 64-bit

May 11, 2012, 8:42 am
#1
Joined: May 11, 2012
Posts: 5
Hi everyone, I started playing IVAN again recently and decided to try the CVS download on this site with the 64-bit fixes. Everything compiled great, but the game crashed when going up and down dungeons. I've attached a small patch that fixes the issue. I haven't tested too much yet, I'll let you know if there's more problems with it.

I don't know if the problem is only on linux or only on 64-bit, but that's the platform I had problems on.

Thanks for keeping this site going!
May 11, 2012, 8:46 am
#2
Joined: May 11, 2012
Posts: 5
I didn't attach properly, sorry
May 11, 2012, 10:30 am
#3
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,204
Hi dlbeswick and welcome! It's a great day when someone works on IVAN.
Can you explain how you fixed the bug?
Batman? wrote
its been so long since i had gotten that far i didnt think it through. arrrr!!!!!!
May 11, 2012, 10:48 am
#4
Joined: May 11, 2012
Posts: 5
Sure. The character's save method was saving out the result of GetTeam as a ulong type, but the load method was assuming the team was saved as an "int" type when that data was being restored, which gives the wrong result. That bad number got passed to game::GetTeam, which meant that the character's Team object was set to an invalid memory location. The patch makes sure the data gets loaded as a ulong.
May 14, 2012, 4:37 pm
#5
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,204
Thanks D. This is one of those crazy bugs that tempts you to code more IVAN.
Batman? wrote
its been so long since i had gotten that far i didnt think it through. arrrr!!!!!!
Jump to