1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed Titles Menu Crash

Discussion in 'Archived Bug Reports' started by Tasanar, Feb 12, 2018.

  1. Tasanar
    Offline

    Moderator ServUO Developer

    Joined:
    Oct 16, 2014
    Messages:
    4,390
    Likes Received:
    95
    Code (C#):
    1. Exception:
    2. System.NullReferenceException: Object reference not set to an instance of an object.
    3.    at Server.Misc.Titles.GetTableIndex(Skill skill) in c:\Users\Administrator\Desktop\Heritage\trunk\Scripts\Misc\Titles.cs:line 381
    4.    at Server.Misc.Titles.GetSkillLevel(Skill skill) in c:\Users\Administrator\Desktop\Heritage\trunk\Scripts\Misc\Titles.cs:line 363
    5.    at Server.Misc.Titles.GetSkillTitle(Mobile mob, Skill skill) in c:\Users\Administrator\Desktop\Heritage\trunk\Scripts\Misc\Titles.cs:line 316
    6.    at Server.Gumps.TitlesGump.<>c__DisplayClass4f.<BuildSubtitle>b__3d(GumpButton b) in c:\Users\Administrator\Desktop\Heritage\trunk\Scripts\Gumps\TitlesMenu.cs:line 753
    7.    at Server.Gumps.TitlesGump.OnResponse(NetState state, RelayInfo info) in c:\Users\Administrator\Desktop\Heritage\trunk\Scripts\Gumps\TitlesMenu.cs:line 931
    8.    at Server.Network.PacketHandlers.DisplayGumpResponse(NetState state, PacketReader pvSrc) in c:\Users\Administrator\Desktop\Heritage\trunk\Server\Network\PacketHandlers.cs:line 1458
    9.    at Server.Network.MessagePump.HandleReceive(NetState ns) in c:\Users\Administrator\Desktop\Heritage\trunk\Server\Network\MessagePump.cs:line 187
    10.    at Server.Network.MessagePump.Slice() in c:\Users\Administrator\Desktop\Heritage\trunk\Server\Network\MessagePump.cs:line 121
    11.    at Server.Core.Main(String[] args) in c:\Users\Administrator\Desktop\Heritage\trunk\Server\Main.cs:line 668
    Using newest repo but think this was just a "crash in waiting"
     
  2. Dexter_Lexia
    Online

    Moderator ServUO Developer

    Joined:
    Jul 3, 2014
    Messages:
    3,674
    Likes Received:
    146
    More like an anomoly. How can a skill be null?
     
  3. Dexter_Lexia
    Online

    Moderator ServUO Developer

    Joined:
    Jul 3, 2014
    Messages:
    3,674
    Likes Received:
    146
    Which shouldn't happen since a null check was already done. I'll have a fix, but the root issue will be tough to determine.
     
  4. Tasanar
    Offline

    Moderator ServUO Developer

    Joined:
    Oct 16, 2014
    Messages:
    4,390
    Likes Received:
    95
    No idea how it happened and no one spoke up. Had about 20 on when it happened.

    Maybe if you have the menu up, showing a skill title, while also soul stoning a skill off? Just trying to think outside the box.
     
  5. Dexter_Lexia
    Online

    Moderator ServUO Developer

    Joined:
    Jul 3, 2014
    Messages:
    3,674
    Likes Received:
    146
    Skills should never be null, just 0 value.
     
  6. Tasanar
    Offline

    Moderator ServUO Developer

    Joined:
    Oct 16, 2014
    Messages:
    4,390
    Likes Received:
    95
    haha I was right!

    I can replicate it.

    Fresh download, set taming to 120, spawned a soulstone.

    Double clicked the Titles Menu, clicked on Skills, then clicked on Animal taming.

    Soulstoned the skill off, THEN clicked apply, with the titles menu still open, and BAM

    The Server Has Crashed.
    skill2.png

    Was not running in debug that time was simply just testing on a fresh download.
    Code (C#):
    1. System.IndexOutOfRangeException: Index was outside the bounds of the array.
    2.    at Server.Misc.Titles.GetSkillLevel(Skill skill)
    3.    at Server.Misc.Titles.GetSkillTitle(Mobile mob, Skill skill)
    4.    at Server.Gumps.TitlesGump.<>c__DisplayClass4f.<BuildSubtitle>b__3d(GumpButton b)
    5.    at Server.Gumps.TitlesGump.OnResponse(NetState state, RelayInfo info)
    6.    at Server.Network.PacketHandlers.DisplayGumpResponse(NetState state, PacketReader pvSrc) in c:\Users\danrk\Desktop\ServUO\trunk\Server\Network\PacketHandlers.cs:line 1460
    7.    at Server.Network.MessagePump.HandleReceive(NetState ns) in c:\Users\danrk\Desktop\ServUO\trunk\Server\Network\MessagePump.cs:line 187
    8.    at Server.Network.MessagePump.Slice() in c:\Users\danrk\Desktop\ServUO\trunk\Server\Network\MessagePump.cs:line 115
    9.    at Server.Core.Main(String[] args) in c:\Users\danrk\Desktop\ServUO\trunk\Server\Main.cs:line 670
     
  7. Tasanar
    Offline

    Moderator ServUO Developer

    Joined:
    Oct 16, 2014
    Messages:
    4,390
    Likes Received:
    95
    That crash is a little different so I will re-do it in Debug. The idea is still the same though.
     
  8. Tasanar
    Offline

    Moderator ServUO Developer

    Joined:
    Oct 16, 2014
    Messages:
    4,390
    Likes Received:
    95
    Code (C#):
    1. System.IndexOutOfRangeException: Index was outside the bounds of the array.
    2.    at Server.Misc.Titles.GetSkillLevel(Skill skill) in c:\Users\danrk\Desktop\ServUO\trunk\Scripts\Misc\Titles.cs:line 363
    3.    at Server.Misc.Titles.GetSkillTitle(Mobile mob, Skill skill) in c:\Users\danrk\Desktop\ServUO\trunk\Scripts\Misc\Titles.cs:line 316
    4.    at Server.Gumps.TitlesGump.<>c__DisplayClass4f.<BuildSubtitle>b__3d(GumpButton b) in c:\Users\danrk\Desktop\ServUO\trunk\Scripts\Gumps\TitlesMenu.cs:line 753
    5.    at Server.Gumps.TitlesGump.OnResponse(NetState state, RelayInfo info) in c:\Users\danrk\Desktop\ServUO\trunk\Scripts\Gumps\TitlesMenu.cs:line 931
    6.    at Server.Network.PacketHandlers.DisplayGumpResponse(NetState state, PacketReader pvSrc) in c:\Users\danrk\Desktop\ServUO\trunk\Server\Network\PacketHandlers.cs:line 1460
    7.    at Server.Network.MessagePump.HandleReceive(NetState ns) in c:\Users\danrk\Desktop\ServUO\trunk\Server\Network\MessagePump.cs:line 187
    8.    at Server.Network.MessagePump.Slice() in c:\Users\danrk\Desktop\ServUO\trunk\Server\Network\MessagePump.cs:line 115
    9.    at Server.Core.Main(String[] args) in c:\Users\danrk\Desktop\ServUO\trunk\Server\Main.cs:line 670
    Debuged. This is not a null crash, so weird it DID null crash the first time. No idea exactly what their skill level was.

    Still line 316 in Titles.cs seems to be the issue.
     
  9. Dexter_Lexia
    Online

    Moderator ServUO Developer

    Joined:
    Jul 3, 2014
    Messages:
    3,674
    Likes Received:
    146
    Got it, thanks.
     
    • Two Thumbs Up Two Thumbs Up x 1
  10. Tasanar
    Offline

    Moderator ServUO Developer

    Joined:
    Oct 16, 2014
    Messages:
    4,390
    Likes Received:
    95
    So you can also do the same crash by simply hitting the skill name, without even needing to hit apply, if you already soulstoned the skill off.
     
  11. Dexter_Lexia
    Online

    Moderator ServUO Developer

    Joined:
    Jul 3, 2014
    Messages:
    3,674
    Likes Received:
    146
    Ok, fix is in.
     
  12. Tasanar
    Offline

    Moderator ServUO Developer

    Joined:
    Oct 16, 2014
    Messages:
    4,390
    Likes Received:
    95
    So while we are at it....this also seems to be an issue. I was just looking through the other titles to see if I could think of other ways to crash the shard with it and noticed this:

    titlemenu10000.png

    No idea WHAT this is or what it does. I do not use custom titles, ect on my shard.

    What we also really need is a way for staff to be able to [props and remove titles from players. Crappy if players, who may have, or get, this weird title are able to run around with this showing. Staff would be powerless to fix.
     
  13. Dexter_Lexia
    Online

    Moderator ServUO Developer

    Joined:
    Jul 3, 2014
    Messages:
    3,674
    Likes Received:
    146
    Pushed another one, for the shoot fix. Try it out.
     
  14. Dexter_Lexia
    Online

    Moderator ServUO Developer

    Joined:
    Jul 3, 2014
    Messages:
    3,674
    Likes Received:
    146
    Did you make a custom title deed? That number does not exist on Stock ServUO code.

    2303807
     
  15. Tasanar
    Offline

    Moderator ServUO Developer

    Joined:
    Oct 16, 2014
    Messages:
    4,390
    Likes Received:
    95
    Another titles menu issue. Set my fame to 6000 and karma to 6000 I can now set title to Trustworthy. Set fame and Karma to 0 and that title will always remain. I could be a dread and as long as I do not change it, it will remain.

    No I did the same thing, searched and got nothing. Is it possible it used to exist and got removed at some point? I use no custom titles and never have.
     
  16. Tasanar
    Offline

    Moderator ServUO Developer

    Joined:
    Oct 16, 2014
    Messages:
    4,390
    Likes Received:
    95
    Should I open a new report on the issue of fame and karma and the weird title? Again no custom titles what so ever but have been running this since day one so maybe something happened along the way where it created that weird reward title. Just a way for staff to [props a player and remove it would be great.
     
  17. Tasanar
    Offline

    Moderator ServUO Developer

    Joined:
    Oct 16, 2014
    Messages:
    4,390
    Likes Received:
    95
    The city title's a governor can grant are applied exactly like a custom title would be. I think it could be related. Maybe from when all points were bugged for those few days. Is there a way in the code I can remove these titles?
     
  18. Tasanar
    Offline

    Moderator ServUO Developer

    Joined:
    Oct 16, 2014
    Messages:
    4,390
    Likes Received:
    95
    And while we are testing that I found another bug.

    Go to a town and grant a "test" character the title of "Lord". It obviously adds the "Lord Of Moonglow"

    Now as that player click the stone once and click on Remove Title.

    city10.png

    It removed the Lord part but stays in your rewards title as "of Moonglow".
     
  19. Dexter_Lexia
    Online

    Moderator ServUO Developer

    Joined:
    Jul 3, 2014
    Messages:
    3,674
    Likes Received:
    146
    Fame/Karma work the same way on EA. If you lose it, and you have the title active, you keep it.
     
  20. Dexter_Lexia
    Online

    Moderator ServUO Developer

    Joined:
    Jul 3, 2014
    Messages:
    3,674
    Likes Received:
    146
    Very Possible.
     
Similar Threads: Titles Menu
Forum Title Date
Archived Bug Reports Titles with the newest release Aug 2, 2018
Archived Bug Reports NPCs and titles Jul 30, 2018
Archived Bug Reports Bug with city titles after new election Jan 22, 2018
Script Support How to add a new prefix to the name similar to the Lady and Lord titles? Oct 19, 2017
Archived Bug Reports Crafted items + Fame titles + Crafters name = some issues Aug 20, 2017
Windows Support Skill titles missing? Dec 23, 2016
ServUO Discussion Guild System - Toggle Titles Sep 21, 2016