Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
[12:24:34.532] [Main Thread/ERROR] [Terraria]: System.NullReferenceException: Object reference not set to an instance of an object.
at Terraria.ModLoader.ItemLoader.GetAlpha(Item item, Color lightColor) in tModLoader\Terraria\ModLoader\ItemLoader.cs:line 1731
at Terraria.Item.GetAlpha(Color newColor) in tModLoader\Terraria\Item.cs:line 45856
at Terraria.Main.DrawItem(Item item, Int32 whoami) in tModLoader\Terraria\Main.cs:line 28964
at DMD<Terraria.Main::DrawItems>(Main this)
at ParticleLibrary.ParticleManager.DrawParticlesBeforeItems(orig_DrawItems orig, Main self) in ParticleLibrary\ParticleSystem\ParticleManager.cs:line 316
at DMD<Terraria.Main::DoDraw>(Main this, GameTime gameTime)
at TerrariaOverhaul.Core.Time.TimeSystem.OnDoDraw(orig_DoDraw orig, Main main, GameTime gameTime) in TerrariaOverhaul\Core\Time\TimeSystem.cs:line 70
at Terraria.Main.Draw(GameTime gameTime) in tModLoader\Terraria\Main.cs:line 48723
[12:24:34.652] [Main Thread/FATAL] [tML]: Main engine crash
System.NullReferenceException: Object reference not set to an instance of an object.
at Terraria.ModLoader.ItemLoader.GetAlpha(Item item, Color lightColor) in tModLoader\Terraria\ModLoader\ItemLoader.cs:line 1731
at Terraria.Item.GetAlpha(Color newColor) in tModLoader\Terraria\Item.cs:line 45856
at Terraria.Main.DrawItem(Item item, Int32 whoami) in tModLoader\Terraria\Main.cs:line 28964
at DMD<Terraria.Main::DrawItems>(Main this)
at ParticleLibrary.ParticleManager.DrawParticlesBeforeItems(orig_DrawItems orig, Main self) in ParticleLibrary\ParticleSystem\ParticleManager.cs:line 316
at DMD<Terraria.Main::DoDraw>(Main this, GameTime gameTime)
at TerrariaOverhaul.Core.Time.TimeSystem.OnDoDraw(orig_DoDraw orig, Main main, GameTime gameTime) in TerrariaOverhaul\Core\Time\TimeSystem.cs:line 70
at Terraria.Main.Draw(GameTime gameTime) in tModLoader\Terraria\Main.cs:line 48723
at Microsoft.Xna.Framework.Game.Tick() in D:\a\tModLoader\tModLoader\FNA\src\Game.cs:line 562
at Microsoft.Xna.Framework.Game.RunLoop() in D:\a\tModLoader\tModLoader\FNA\src\Game.cs:line 878
at Microsoft.Xna.Framework.Game.Run() in D:\a\tModLoader\tModLoader\FNA\src\Game.cs:line 419
at Terraria.Program.LaunchGame_(Boolean isServer) in tModLoader\Terraria\Program.cs:line 231
[12:24:34.658] [Main Thread/DEBUG] [TerrariaSteamClient]: Send: shutdown
I've tried to reproduce the error by entering hardmode with Terraria Overhaul installed, however I can't seem to reproduce the error described here. I'll continue looking into it further, but from a surface level glance I can't see anything inherently wrong with the code in Terraria Overhaul [github.com] or Particle Library [github.com]. if you happen to be able to reproduce this error yourself, let me know what mods were enabled and what you were doing at the time.
thank you for posting the error log though, it's immensely helpful in determining the root cause with issues like these.
alchemist npc lite
angler shop
auto reforge
autofish
----------------------------------------------------B
banner bonanza
base library
basic automated mining
better blending
better boss health bar
boss checklist
boss cursor
----------------------------------------------------C
calamity mod
calamity mod music
calamity's vanities
catalyst mod
census - town npc checklist
compare item stats
consolaria
container library
custom cursor library
----------------------------------------------------D
dialogue panel rework
----------------------------------------------------E
enemy radar redux
----------------------------------------------------F
fancy lighting
fargo's best of both worlds
fargo's mutant mod
faster ui
----------------------------------------------------H
heart crystal & life fruit glow
hook stats and wing stats
----------------------------------------------------I
imksushi's mod
impact library
----------------------------------------------------K
koko net lib
----------------------------------------------------L
lights and shadow
living world mod
loot beams
lui afk reborn
----------------------------------------------------M
magic storage
mod of redemption
----------------------------------------------------N
no more tombs
----------------------------------------------------P
particle library
portable storage
----------------------------------------------------Q
quality of life
----------------------------------------------------R
recipe browser
----------------------------------------------------S
secrets of the shadows
shoe slot
shop expander
shorter respawn time
smarter cursor
storm's aditions mod
structure helper
subworld library
----------------------------------------------------T
TWAILA
terraria overhaul
the stars above
thorium mod
----------------------------------------------------V
verdant
vitality mod
----------------------------------------------------W
weapon enchantments
which mod is this from?
wiki this
wing slot extra
world gen previewer
----------------------------------------------------
CPU and GPU: ryzen 5 4600g
16 gb ddr4 3200 mhz
[01:55:03.670] [Main Thread/ERROR] [Terraria]: System.NullReferenceException: Object reference not set to an instance of an object.
at Terraria.ModLoader.ItemLoader.PreDrawInWorld(Item item, SpriteBatch spriteBatch, Color lightColor, Color alphaColor, Single& rotation, Single& scale, Int32 whoAmI) in tModLoader\Terraria\ModLoader\ItemLoader.cs:line 1751
at Terraria.Main.DrawItem(Item item, Int32 whoami) in tModLoader\Terraria\Main.cs:line 28965
at DMD<Terraria.Main::DrawItems>(Main this)
at ParticleLibrary.ParticleManager.DrawParticlesBeforeItems(orig_DrawItems orig, Main self) in ParticleLibrary\ParticleSystem\ParticleManager.cs:line 316
at DMD<Terraria.Main::DoDraw>(Main this, GameTime gameTime)
at GravityDontFlipScreen.GravityFlipSystem.Main_DoDraw(orig_DoDraw orig, Main self, GameTime gameTime) in GravityDontFlipScreen\GravityFlipSystem.cs:line 116
at DMD<Terraria.Main::Draw>(Main this, GameTime gameTime)
[01:55:03.844] [Main Thread/FATAL] [tML]: Main engine crash
GravityFlipSystem.cs Line 116 [github.com]
ParticleManager.cs Line 326 [github.com]
with that in mind, the mods are most likely only in the stacktrace because their hooks are called before the original method where the error actually occurred, hence "stacktrace". the mods don't modify anything that would cause this error nor does the error occur within either mod. the error could be due to another mod's item having incorrect drawcode, but since the stacktrace doesn't reveal any more info, i'm afraid i can't say which.
if you want to try to reproduce the error, the best way would be to first figure out what you did that caused it to happen, then slowly disable mods until you've found the culprit.
thank you!
not to my knowledge, sorry. I don't know exactly why it doesn't show the culprit in the stacktrace, but if you were able to narrow it down it may be worth bringing it to the attention of those mod owners. they'll be able to figure out the issue since you were able to reproduce it.
[16:29:44.921] [.NET ThreadPool Worker/INFO] [tML]: Adding Content: JourneyTrend (Journey's Trend: The Community Vanity Mod) v1.0.2
[16:29:45.198] [.NET ThreadPool Worker/INFO] [JourneyTrend]: JourneyTrend Logs:
[16:29:45.351] [.NET ThreadPool Worker/INFO] [tML]: Adding Content: LansUnlimitedBuffSlots (Lan's Unlimited Buff Slots) v2022.9.1
[16:29:45.428] [.NET ThreadPool Worker/INFO] [tML]: Adding Content: LootBeams (Loot Beams) v1.7.3.1
[16:29:45.524] [.NET ThreadPool Worker/INFO] [tML]: Adding Content: MountAndJourney (Mount and Journey) v0.70
^ is where particle lib should appear
Then other times:
[16:23:47.723] [.NET ThreadPool Worker/INFO] [tML]: Adding Content: ParticleLibrary ([c/9ebae2:Pa][c/dafaf4:rtic][c/9ebae2:le][c/e8a272:Li][c/fad3a0:bra][c/e8a272:ry]) v1.1.4.2
[16:23:47.777] [.NET ThreadPool Worker/DEBUG] [tML]: Hook On.Terraria.Main::DrawDust() added by ParticleLibrary
it always hard crashes around this point. Sometimes it manages to pull through but that's around 1 out of 10 attempts? I haven't been able to find any notable reason for this.
im currently looking into it but so far i've had no luck reproducing the error. i fixed some of the static references leftover from mod reloading, can you test these changes to see if you encounter the same error?
[00:32:12.536] [Main Thread/ERROR] [Terraria]: System.NullReferenceException: Object reference not set to an instance of an object.
at Terraria.ModLoader.ItemLoader.PreDrawInWorld(Item item, SpriteBatch spriteBatch, Color lightColor, Color alphaColor, Single& rotation, Single& scale, Int32 whoAmI) in tModLoader\Terraria\ModLoader\ItemLoader.cs:line 1751
at Terraria.Main.DrawItem(Item item, Int32 whoami) in tModLoader\Terraria\Main.cs:line 28965
at DMD<Terraria.Main::DrawItems>(Main this)
at ParticleLibrary.ParticleManager.DrawParticlesBeforeItems(orig_DrawItems orig, Main self) in ParticleLibrary\ParticleSystem\ParticleManager.cs:line 328
at DMD<Terraria.Main::DoDraw>(Main this, GameTime gameTime)
at Terraria.Main.Draw(GameTime gameTime) in tModLoader\Terraria\Main.cs:line 48723
[00:32:12.614] [Main Thread/FATAL] [tML]: Main engine crash
Tip: This is likely a mod's fault. Disable mods one by one and check if the issue persists
System.NullReferenceException: Object reference not set to an instance of an object.
at Terraria.ModLoader.ItemLoader.PreDrawInWorld(Item item, SpriteBatch spriteBatch, Color lightColor, Color alphaColor, Single& rotation, Single& scale, Int32 whoAmI) in tModLoader\Terraria\ModLoader\ItemLoader.cs:line 1751
at Terraria.Main.DrawItem(Item item, Int32 whoami) in tModLoader\Terraria\Main.cs:line 28965
at DMD<Terraria.Main::DrawItems>(Main this)
at ParticleLibrary.ParticleManager.DrawParticlesBeforeItems(orig_DrawItems orig, Main self) in ParticleLibrary\ParticleSystem\ParticleManager.cs:line 328
at DMD<Terraria.Main::DoDraw>(Main this, GameTime gameTime)
at Terraria.Main.Draw(GameTime gameTime) in tModLoader\Terraria\Main.cs:line 48723
at Microsoft.Xna.Framework.Game.Tick() in D:\a\tModLoader\tModLoader\FNA\src\Game.cs:line 562
at Microsoft.Xna.Framework.Game.RunLoop() in D:\a\tModLoader\tModLoader\FNA\src\Game.cs:line 878
at Microsoft.Xna.Framework.Game.Run() in D:\a\tModLoader\tModLoader\FNA\src\Game.cs:line 419
at Terraria.Program.LaunchGame_(Boolean isServer) in tModLoader\Terraria\Program.cs:line 231
[00:32:12.620] [Main Thread/DEBUG] [TerrariaSteamClient]: Send: shutdown
hi there! we've addressed something similar to this above. while the stacktrace might list ParticleLibrary, this is only because ParticleLibrary hooks into the drawing methods to do its rendering. it doesn't perform any code that would cause an error like this to occur in ItemLoader.PreDrawInWorld. usually this is due to a mod adding an item and not handling its draw code defensively.
if you would like, you can try disabling mods one by one to find which mod is crashing your game upon killing Plantera. since this isn't the first occurrence of this issue mentioned here, do you happen to have Fargo's Mod?
what mods are you using? ParticleLibrary shouldn't affect placing tiles
UPD: upon generating new world too...