Items with >20 lines of text crash on mouse-over
See original GitHub issueDescription
When you reforge an item, and give it >20 lines of text, the game crashes when you mouseover that item. This happens, specifically (but only because it’s the item i have with the most lines of text), with Cheeze’s Chaos Theory
when you get it to have the mythical
prefix.
I confirmed in Discord #support room, and jopojelly told me to file here.
Steps to Reproduce
- Have Cheeze’s
Chaos Theory
item. - Enchant it with
mythical
- Mouseover the item, and game should crash
Expected behavior
I expect the game should not crash. Although one might reasonably say 20 lines is enough text…
Actual behavior
The game crashes with an IndexOutOfBounds Exception.
Reproduction frequency
100% reliable if you put mythical
on this item.
Versions
tModLoader v0.10.1.5
Mods
Particularly Cheeze’s Content Pack v1.1.2.4. I don’t think the mod matters though. I suspect any item with >20 lines of text would crash.
Additional Information
Game does not crash if I reforge the item to be masterful
, giving it exactly 20 lines of text.
Here’s the stack trace:
Silently Caught Exception: Index was outside the bounds of the array. at Terraria.Main.MouseText_DrawItemTooltip(Int32 rare, Byte diff, Int32 X, Int32 Y) at Terraria.ModLoader.ModCompile.<>c.<ActivateExceptionReporting>b__15_0(Object sender, FirstChanceExceptionEventArgs exceptionArgs)
at Terraria.Main.MouseText_DrawItemTooltip(Int32 rare, Byte diff, Int32 X, Int32 Y)
at Terraria.Main.MouseText(String cursorText, Int32 rare, Byte diff, Int32 hackedMouseX, Int32 hackedMouseY, Int32 hackedScreenWidth, Int32 hackedScreenHeight)
at Terraria.Main.DrawInterface_33_MouseText()
at Terraria.Main.<SetupDrawInterfaceLayers>b__1623_29()
at Terraria.UI.LegacyGameInterfaceLayer.DrawSelf()
at Terraria.UI.GameInterfaceLayer.Draw()
at Terraria.Main.DrawInterface(GameTime gameTime)
at Terraria.Main.do_Draw(GameTime gameTime)
at Terraria.Main.DoDraw(GameTime gameTime)
at Terraria.Main.Draw(GameTime gameTime)
at Microsoft.Xna.Framework.Game.DrawFrame()
at Microsoft.Xna.Framework.Game.Tick()
at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
at Microsoft.Xna.Framework.GameHost.OnIdle()
at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Microsoft.Xna.Framework.WindowsGameHost.Run()
at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
at Terraria.Program.LaunchGame(String[] args, Boolean monoArgs)
at Terraria.WindowsLaunch.Main(String[] args)
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (5 by maintainers)
Interesting. Thank you for getting back to me. I can try and reproduce with a tiny subset of mods to see if it’s just Joost or something.
Closing issue. Thanks again!
Cool! Thanks folks.