tyfon7 / UIFixes

Small QOL fixes for SPTarkov
MIT License
8 stars 1 forks source link

Crash on ctrl+click sell immideately after modified item with opened inspection #5

Closed MonstraG closed 2 months ago

MonstraG commented 3 months ago

Repro:

  1. Open sell interface for trader.
  2. Inspect equipment that has slots (e.g. rifle or armor) -- time-sensitive part begins --
  3. drag one of the parts outside into the stash to detach it
  4. immediately after that, ctrl+click on the original equipment (as if attempting to sell it) (trader can be uninterested in the equipment, crash still happens)
  5. crash.

I randomly guess that this is related to recent change in Fika that made all inventory interactions server-synced, as if you wait between 3 and 4, crash doesn't happen.

I cannot find any errors in game/Logs or in ../LocalLow/.../Escape From Tarkov/Player.log

SPT-AKI 3.8.3 Fika Release 0.9.8905.28577 UIFixes 1.4.2

If my guess is correct, I'm not sure if the problem is on Fika's side or here, but if this plugin is removed, I couldn't repro

tyfon7 commented 3 months ago

Nice catch. Looks like some of the inspect window patches are confusing the window dependencies, resulting in the following stack overflow. This repros without Fika.

StackOverflowException: The requested operation caused a stack overflow.
  at ItemContextClass.CloseDependentWindows () <0x176a770b350 + 0x00008> in <448e567fc8c849f8a66327014c6f134c>:0 
  at ItemContextAbstractClass.CloseDependentWindows () [0x0000a] in <448e567fc8c849f8a66327014c6f134c>:0 
  at ItemContextClass.CloseDependentWindows () [0x00010] in <448e567fc8c849f8a66327014c6f134c>:0 
  at ItemContextAbstractClass.CloseDependentWindows () [0x0000a] in <448e567fc8c849f8a66327014c6f134c>:0 
  at ItemContextClass.CloseDependentWindows () [0x00010] in <448e567fc8c849f8a66327014c6f134c>:0 
  at ItemContextAbstractClass.CloseDependentWindows () [0x0000a] in <448e567fc8c849f8a66327014c6f134c>:0 
  at ItemContextClass.CloseDependentWindows () [0x00010] in <448e567fc8c849f8a66327014c6f134c>:0 
  at ItemContextAbstractClass.CloseDependentWindows () [0x0000a] in <448e567fc8c849f8a66327014c6f134c>:0 
  at ItemContextClass.CloseDependentWindows () [0x00010] in <448e567fc8c849f8a66327014c6f134c>:0 
  at ItemContextAbstractClass.CloseDependentWindows () [0x0000a] in <448e567fc8c849f8a66327014c6f134c>:0 
  at ItemContextClass.CloseDependentWindows () [0x00010] in <448e567fc8c849f8a66327014c6f134c>:0 
  at ItemContextAbstractClass.CloseDependentWindows () [0x0000a] in <448e567fc8c849f8a66327014c6f134c>:0 
  at ItemContextClass.CloseDependentWindows () [0x00010] in <448e567fc8c849f8a66327014c6f134c>:0 
<snip>
tyfon7 commented 2 months ago

Actually way more obscure. One of the classes I was using has a massive bug in it from BSG that if a certain method is ever called, it causes this stack overflow / crash. Making sure to Dispose() the class when I'm done with it ensures this won't happen.

Fix will be in next release (1.4.3 or 1.5.0)