Skip to content

Crash when exceeding signed int max. #379

Open

Description

@RaidbotWivesAndMyAxe

Describe the bug
Display is capped as signed 4-byte int, and plugin crashes when encountering it.

To Reproduce
Steps to reproduce the behavior:

  1. Own more than 2147483647 gil
  2. Have a list counts all your gil across characters (best attempt at export below).
  3. View the list.

Expected behavior
The list should show a sum of all your gil across characters.
Alternatively, it would be nice to have this functionality outside of needing to create a list/filter.

Screenshots
System.OverflowException: Arithmetic operation resulted in an overflow.
at System.Int32.System.Numerics.IAdditionOperators<System.Int32,System.Int32,System.Int32>.op_CheckedAddition(Int32 left, Int32 right)
at System.Linq.Enumerable.Sum[TSource,TResult,TAccumulator](IEnumerable1 source, Func2 selector)
at CharacterTools.Logic.Editors.CharacterScopeCalculator.Count(CharacterSearchScope searchScope, UInt32 itemId, ItemFlags itemFlags) in /work/repo/InventoryTools/Logic/Editors/CharacterScopePicker.cs:line 334
at CharacterTools.Logic.Editors.CharacterScopeCalculator.<>c__DisplayClass11_0.b__0(CharacterSearchScope c) in /work/repo/InventoryTools/Logic/Editors/CharacterScopePicker.cs:line 251
at System.Linq.Enumerable.Sum[TSource,TResult,TAccumulator](IEnumerable1 source, Func2 selector)
at InventoryTools.Logic.Columns.QuantityColumn.CurrentValue(ColumnConfiguration columnConfiguration, SearchResult searchResult) in /work/repo/InventoryTools/Logic/Columns/QuantityColumn.cs:line 56
at InventoryTools.Logic.Columns.QuantityColumn.Draw(FilterConfiguration configuration, ColumnConfiguration columnConfiguration, SearchResult searchResult, Int32 rowIndex, Int32 columnIndex) in /work/repo/InventoryTools/Logic/Columns/QuantityColumn.cs:line 138
at InventoryTools.Logic.FilterTable.Draw(Vector2 size, Boolean shouldDraw) in /work/repo/InventoryTools/Logic/FilterTable.cs:line 384
at InventoryTools.Ui.FiltersWindow.DrawFilter(FilterTable itemTable, FilterConfiguration filterConfiguration) in /work/repo/InventoryTools/Ui/Windows/FiltersWindow.cs:line 1742
at InventoryTools.Ui.FiltersWindow.DrawMainWindow() in /work/repo/InventoryTools/Ui/Windows/FiltersWindow.cs:line 1174
at InventoryTools.Ui.Window.Draw() in /work/repo/InventoryTools/Ui/Windows/Window.cs:line 55
at Dalamud.Interface.Windowing.WindowHost.DrawInternal(WindowDrawParameters internalDrawParams, WindowSystemPersistence persistence) in /_/Dalamud/Interface/Windowing/WindowHost.cs:line 358

Dalamud Information:
Testing is enabled

Filter Issues
H4sIAAAAAAAACt1XXZPaNhSd/pOOnj0df2Fjv7FAAtMk7C6bbpvMPgj5GjQVkiPLJHSH/96RZRvjj02f+wSco3t979XRsfjlFT3hHYN1gmLku9if7FI/DCaRT9xg5/ueH4ZB6hAv8kmCLDSXOFXXiKkXkpR4E7JLfN/e2dHUt91pFAGOnNCJPGShFd0fGN0f1EeRAIptC80LiRUkawXHHMW8YMxCW1FIAmt+Aq6EpJCj+OuLhfSaz3SOFeyFPOtH1ugWsCSHLrP8VtBsy4TqEmXJK9B1oNj124300BXgBORcMFFIFL+iP1Fs/2Zb6C/96XuRhb6g2NHIc/l5qSoSsvfYBeSKcqyo4P3e8tW3uv11PheMAVF0x+AKLrMDHEFiVtb1geYKxSlmOVjoEz4CitGMsV/fU4YstCgyRglWkG84O9c53lGmQJajXvNHUJhykPnb7JIXRxQ7FlrQPGP4vOZPeJejWMkCLLTJgM/yZ8oT8b2p5qHAXFF1RjFCFlp/gBMw832bUUnVTnAtF2TqNo81v833p3MGKPYt9DvoHJMAB6HrpGEa2T6OIAonE9dOvdSd2LYbuagWzIyxXlMNsxJFDn34nQSYi2OGOb2yjUqfD8AHQTMV20KfMtIQDfg5h82j6YXyfe+Z8wOWmKhWlS1lDDVxSw+WfLtkqNk1J6xIYC5FnjcVDIS/uU4/+x+YC1Yced4BtSo7TCttdRhot6w+fttKf1jbg8i2wBjl+3tJiRa+lsBBZHfF+Rb8iOXfoGYnkHgPPfxJKMz65BzzO7gTRekD9eGbnTBl2iBm6okeIflU+pdhN985SH3IbQutiegrRrvH0KiHF9Tbr0/4DfGEd8MR2k2kariW5gwz9Mjeonb2FtlgrSRvcctjpk9+lXnPhYTVgz4y2hFbeRsTW0CKC3b1si09ZsyoifK9eU+0BfMsJEtaYimjS7sttYdilE4Db5r6EU791J8kXjQJvInjBKEXEPD8EN2EbWSi9e1UJVU2d30/1Yr++orW+YJK3V1VquEq89U7X5VQO9d/KMQEm16WPzIhVRvZKm0gW1B6FDmKXy8W+ky56iBMdBdpF1/zVGgrbUHvGG5W8HL6nbDqtXQ2L9QtEU14cw671MX6yWDq10FnOBEmbpq44Psk8AOIol1IgsT3Uhx6tpeQ/8Nwft6kllUTrT3E9FaK/PpzRhQ9Qc+NDVyubY5VvaZqzqCNms1Rb/ap8nptYEkFXl4ul5fqLHTc/E4IBpibF9vPZPH2vLR73eQxm3kDrbmCPdwuWwChR8xuML3nPWB+EJRUd4tyJ8odrq4aX52XWhnddU0pA0Tr3vV6/XGdba7fygyUnqW5Hq1oAjXYDL3290dQksIJKgPSXqNzdmjM3qA2hcoKZcyrkBI4Ob+Xosgq4VaR51xh1sPvJRCd9JZwLLQ8gTyrA+X7JcuhF1eX3YsrLx1/AE+EbK83NZZNXo9ryaweHuFbQWWjvUZ25cSo4C3d7iUkFLi6l5CC7hS0wqvZaW9WcHRQPDFn2TWaLb3JEM4Y4Y4R3miqcIyZjhH+aK5R5voQ1x6GnWHYHYanw/DEiaJBxvMixxuJcW17NMZvd2eP9j0+3dGdcka3KhojgtFc40IZ3cTOtr9UNl1eHa+yNP/nvgjewmqZ1sZa/dst//gNKLvtN70zX5H6ATrNfTdKE3fFeRD/KHaD+KJQwwF3QmE+kovy8rLdoczVWldWDec6l1u6HNvmBFJSfchbDROatWZX5b2aRXXrQPXFbXL5F3YVip+4EAAA

Additional context
Once fired, Error prevents opening most of the plugin. Commands like /atcloselists don't back out of the errored view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Projects

  • Status
    Needs investigation/analysis

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions