Build #137 - Inventory UI crashes when certain items are present [RESOLVED]

User avatar
NikitaTheTanner
Posts: 366
Joined: Sun Oct 18, 2015 7:57 pm

Re: Mouse cursor not showing when item menu is openned

Post by NikitaTheTanner »

It's definitely this one:

Code: Select all

(Filename:  Line: -1)

NullReferenceException: Object reference not set to an instance of an object
  at DaggerfallWorkshop.Game.Items.ItemHelper.ResolveItemName (DaggerfallWorkshop.Game.Items.DaggerfallUnityItem item) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.Items.ItemHelper.ResolveItemLongName (DaggerfallWorkshop.Game.Items.DaggerfallUnityItem item) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.Items.DaggerfallUnityItem.get_LongName () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.ItemListScroller.UpdateItemsDisplay () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.ItemListScroller.ItemsScrollBar_OnScroll () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.VerticalScrollBar.RaiseOnScrollEvent () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.VerticalScrollBar.SetScrollIndex (Int32 value, Boolean doNotRaiseScrollEvent) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.VerticalScrollBar.set_ScrollIndex (Int32 value) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.ItemListScroller.ItemsListPanel_OnMouseScrollUp (DaggerfallWorkshop.Game.UserInterface.BaseScreenComponent sender) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.BaseScreenComponent.MouseScrollUp () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.BaseScreenComponent.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.Panel.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.Panel.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.Panel.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.Panel.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.UserInterfaceWindow.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterfaceWindows.DaggerfallBaseWindow.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterfaceWindows.DaggerfallPopupWindow.Update () [0x00000] in <filename unknown>:0 

User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Mouse cursor not showing when item menu is openned

Post by Hazelnut »

Found this in the log, shortly followed by lots of other examples:

Code: Select all

NullReferenceException: Object reference not set to an instance of an object
  at DaggerfallWorkshop.Game.Items.ItemHelper.ResolveItemName (DaggerfallWorkshop.Game.Items.DaggerfallUnityItem item) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.Items.ItemHelper.ResolveItemLongName (DaggerfallWorkshop.Game.Items.DaggerfallUnityItem item) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.Items.DaggerfallUnityItem.get_LongName () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.ItemListScroller.UpdateItemsDisplay () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.ItemListScroller.set_Items (System.Collections.Generic.List`1 value) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterfaceWindows.DaggerfallInventoryWindow.Refresh (Boolean refreshPaperDoll) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterfaceWindows.DaggerfallInventoryWindow.OnPush () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.UserInterfaceManager.AddWindow (DaggerfallWorkshop.Game.UserInterface.UserInterfaceWindow window) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.UserInterfaceManager.PushWindow (DaggerfallWorkshop.Game.UserInterface.UserInterfaceWindow window) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.DaggerfallUI.ProcessMessages () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.DaggerfallUI.Update () [0x00000] in <filename unknown>:0 
Looking at the code (without line numbers it could be any statement in this method) it seems likely connected to item template loading. I know that you said that restarting the game and reloading made the issue go away, but would still be interesting to get a savefile. (clutching at straws a bit)
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

Lautrec of Graymont
Posts: 12
Joined: Sun Oct 21, 2018 10:40 pm

Re: Mouse cursor not showing when item menu is openned

Post by Lautrec of Graymont »

Savefile.
Attachments
SAVE3.rar
(167.6 KiB) Downloaded 80 times

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Mouse cursor not showing when item menu is openned

Post by pango »

I noticed that

Code: Select all

Item index out of range: Group=Jewellery Index=-1
earlier in the log, and it seems to come from that item with no shortname...

Code: Select all

                {
                    "uid": 33554564,
                    "shortName": null,
                    "nativeMaterialValue": 0,
                    "dyeColor": "Unchanged",
                    "weightInKg": 0.0,
                    "drawOrder": 0,
                    "value1": 0,
                    "value2": 0,
                    "hits1": 0,
                    "hits2": 0,
                    "hits3": 0,
                    "stackCount": 1,
                    "enchantmentPoints": 0,
                    "message": 0,
                    "legacyMagic": null,
                    "playerTextureArchive": 0,
                    "playerTextureRecord": 0,
                    "worldTextureArchive": 0,
                    "worldTextureRecord": 0,
                    "itemGroup": "Jewellery",
                    "groupIndex": -1,
                    "currentVariant": 0,
                    "isQuestItem": false,
                    "questUID": 0,
                    "questItemSymbol": null,
                    "trappedSoulType": "None",
                    "className": null,
                    "poisonType": "None",
                    "$version": "v1"
                },
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

Lautrec of Graymont
Posts: 12
Joined: Sun Oct 21, 2018 10:40 pm

Re: Mouse cursor not showing when item menu is openned

Post by Lautrec of Graymont »

You might want to interact with an item container and then open the F6 menu to activate the bug, here's another save.
Attachments
SAVE4.rar
(165.2 KiB) Downloaded 80 times

User avatar
NikitaTheTanner
Posts: 366
Joined: Sun Oct 18, 2015 7:57 pm

Re: Mouse cursor not showing when item menu is openned

Post by NikitaTheTanner »

And I suggest equipping various clothes. At least in my case it does trigger the same bug. Not all the time, but often enough. I've never experienced this bug when it wasn't connected to equipping clothes.

Even in the uploaded save, I can equip clothes, but when I exit the inventory and go back in, I still get the same error.

Also, in the save file, when you open clothing/misc section, it appears like there are only two letters, but you can scroll it down and the items will appear. Not sure if this is related, just looked strange.

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Mouse cursor not showing when item menu is openned

Post by pango »

I think this is all caused by that mysterious "jewellery" that has no name and lands in "cloths & misc" list. If you remove exactly the lines I quoted previously from SaveData.txt inside the save directory (or just change "shortName": null by "shortName": "some name"), the game should behave again.
The question is now, how this item get there. Maybe people with deeper knowledge of Daggerfall Unity may know how to extract more info from the savegame itself...
Do you remember what you were doing before there problem occurred? Do you have a previous savegame of the same character without the issue?

Image
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
NikitaTheTanner
Posts: 366
Joined: Sun Oct 18, 2015 7:57 pm

Re: Mouse cursor not showing when item menu is openned

Post by NikitaTheTanner »

To me, it happens with newly created characters, so... Not sure, maybe one of the bonus items given?

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Mouse cursor not showing when item menu is openned

Post by Interkarma »

Thanks for all the detective work guys. I'll chase this one down soon and get out some new builds with fixes.

Lautrec of Graymont
Posts: 12
Joined: Sun Oct 21, 2018 10:40 pm

Re: Mouse cursor not showing when item menu is openned

Post by Lautrec of Graymont »

pango wrote: Mon Oct 22, 2018 8:43 pm I think this is all caused by that mysterious "jewellery" that has no name and lands in "cloths & misc" list. If you remove exactly the lines I quoted previously from SaveData.txt inside the save directory (or just change "shortName": null by "shortName": "some name"), the game should behave again.
The question is now, how this item get there. Maybe people with deeper knowledge of Daggerfall Unity may know how to extract more info from the savegame itself...
Do you remember what you were doing before there problem occurred? Do you have a previous savegame of the same character without the issue?

Image
It happened since the very start of the game when you wake up at the first dungeon, back then I just ignored it because I wanted to see the outside world in Daggerfall Unity first. A few moments later the bug started to get annoying so I came here. :D
So I assume it has to do with an item I get from the background building questions at character creation?
I have a save from the starting dungeon:
Attachments
SAVE0.rar
(101.7 KiB) Downloaded 79 times

Locked