Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unhandled exception: Stack Empty

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Unhandled exception: Stack Empty

    I physically reconfigured my monitors recently. Since I reconfigured them, I've been having a very odd problem. NT works completely fine on monitors 1 & 2. However, on monitor 3 only, if I click the "indicators" button on a chart that resides on that monitor, NT freezes and eventually throws this exception.

    Do you recognize this? I've restarted NT, PC, and am trying to build out my workspace again from a new fully blank workspace, but I can't resolve it.

    Pop up window error text:
    "Unhandled exception: Stack Empty"


    This is the exception in the trace file:
    2024-01-26 16:01:28:812 *************** unhandled exception trapped ***************
    2024-01-26 16:01:28:812 Stack empty.
    2024-01-26 16:01:28:812 System.InvalidOperationException: Stack empty.
    at System.ThrowHelper.ThrowInvalidOperationException( ExceptionResource resource)
    at System.Collections.Generic.Stack`1.Pop()
    at NinjaTrader.Gui.Tools.NTWindow.EnableAllWindows()
    at NinjaTrader.Gui.Tools.NTWindow.OnClosed(EventArgs e)
    at System.Windows.Window.WmDestroy()
    at System.Windows.Window.WindowFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    at System.Windows.Interop.HwndSource.PublicHooksFilte rMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    at MS.Win32.HwndSubclass.DispatcherCallbackOperation( Object o)
    at System.Windows.Threading.ExceptionWrapper.Internal RealCall(Delegate callback, Object args, Int32 numArgs)
    at System.Windows.Threading.ExceptionWrapper.TryCatch When(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)​

    #2
    I'm finally noticing this now in the trace file and I assume this might be part of the problem, the resolutions don't actually match my monitor configuration...

    2024-01-29 11:13:58:133 DisplayAdapters=2/Intel(R) UHD Graphics 630|NVIDIA GeForce GTX 1060
    2024-01-29 11:13:58:133 Monitors=3/2100x3360|3584x2016|3840x2160​

    That only matches one of my monitors. Windows is showing my monitors as:

    1 - 2560 x 1440
    2 - 1200 x 1920
    3 - 3840 x 2160

    Comment


      #3
      I tried a lot of things to fix this, but ultimately what seems to be causing this is the scaling setting in Windows display settings. If I set this to a number higher than 100%, the indicator window is opening off screen somewhere but I can't get to it (or at least NT thinks the indicator screen is opening, windows doesnt show it anywhere). Either way, when I keep this at 100% everything works as expected.




      Click image for larger version

Name:	image.png
Views:	135
Size:	103.3 KB
ID:	1288908



      FWIW - The resolutions in the trace file are still incorrect, so I'm not sure what affect those have.
      Last edited by NickyD; 01-30-2024, 01:21 PM. Reason: Further narrowed this issue down to my true cause.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      40 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      20 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      27 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      44 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      37 views
      0 likes
      Last Post CarlTrading  
      Working...
      X