Multiple odd bugs

  • Sascha
  • Sascha's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 1 month ago #7873 by Sascha
Multiple odd bugs was created by Sascha
I don't even know what category to put this in... We just tested a new adventure and here's a run-down of weird stuff.

1) Quest to get an item. As soon as the player picked up the item, the game crashed.
2) Game came back up, player had been magically gifted 10 levels.
3) Player re-does the quest sequence, goes to pick up the item, the game crashed again.
4) Game came back up, player now has 20 new extra levels, for a total of 30 free levels.
5) I set the player's levels back, but now the character shows negative exp and 3x the amount of hp, mana and moves it should have even under normal circumstances.
6) The crash file did not save, so the character loaded naked.
7) As I reload gear for the player's character, we crash again.
8) Game came back up, reloaded all that gear, no issues with the gear load, but the character came back with 16 free levels.
9) Player kills something minor and is auto-levelled all the way back up to those 46 free levels.

[ Liv advanced 46 levels to level 51. ]

Has anyone seen anything like this before? So many crashes happened that I don't even have a clean core to share.

Will you stand against the coming Storm? After the Breaking: STORMRIDERS MUD - atbmud.dune.net port 4000

Please Log in or Create an account to join the conversation.

More
3 years 1 month ago #7875 by lacrc
Replied by lacrc on topic Multiple odd bugs
Whoa haha, now that sounds nasty.

Even though I can't help with as how or why the crashes happened without looking at some logs or core dump, I think I can help with some stuff that happened after:

5) I set the player's levels back, but now the character shows negative exp and 3x the amount of hp, mana and moves it should have even under normal circumstances.

If you used the SET command then it really only sets the character level, the EXP and HP must be set manually after that. I'm not sure but I think if you use ADVANCE with negative levels it would remove hp and mana maybe? I'm really not sure about that and can't check it right now, sorry.
As to why it was negative maybe some mob (or quest?) gave the char too much EXP and it blew up the experience variable limit? Just a guess here.
In stock TBA the EXP variable is of int type (signed), you can check yours in structs.h in the struct char_point_data{}, and can hold values from −32,767 to +32,767. If you go beyond the positive limit then it will show as negative cause of bits being set where they shouldn't. You think that could be the case in your mud?

9) Player kills something minor and is auto-levelled all the way back up to those 46 free levels.

I think what happened is that since the player had an invalid amount of EXP from before at the moment it killed something the functions that check if the player should level fired up and gave him/her all the levels he/she the function thought it should have.

Do any of these make sense? lol
Sorry if I weren't of any help.

Please Log in or Create an account to join the conversation.

More
3 years 1 month ago #7876 by thomas
Replied by thomas on topic Multiple odd bugs
First off - disable that quest!

Second - no, never seen anything remotely like that. I suggest copying your whole game directory (mkdir ../backup && cp -R . ../backup) and then try to recreate the bug there. This could give you a core file and you'd at least have something to work with.

My initial thought, based just on what you've told here, is that there's stack poisoning in the quest code. So, the object is free'd or read as another struct type or there's integer overflow in the reward variable.
There are so many things it could be, though...

Please Log in or Create an account to join the conversation.

  • Sascha
  • Sascha's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 1 month ago #7877 by Sascha
Replied by Sascha on topic Multiple odd bugs
I disabled that quest right away. It's our tutorial quest line, and each quest only gives 500 exp as a reward, so there isn't a mega payout. I ran a test character through the entire 10-quest scenario last night and nothing untoward happened, but this morning when I woke up there had been a crash. I'm going to pull that core and see what's reflected there.

I'll follow all your advice, and report back.

Will you stand against the coming Storm? After the Breaking: STORMRIDERS MUD - atbmud.dune.net port 4000

Please Log in or Create an account to join the conversation.

Time to create page: 0.086 seconds