Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Threading exception

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

    #16
    I'm adding this report because I am including the entire call stack, not just the part for my object. Things hung for quite awhile (minutes) so I did a "Break All". The stack was at the "Wait()" location -- consistent with the hung appearance. I continued, waited a while longer, and then got the usual exception
    An unhandled exception of type 'System.Threading.ThreadAbortException' occurred in WindowsBase.dll
    Looking at the stack here is what happened:
    • I was in the Set() function
    • I single-step through the function; both statements execute as expected
    • I Continue or Single-Step out of Set() (either produces the same result)

    I do not understand what happened at that point -- my single step resulted in "Evaluation of: Unknown evaluation" -- whatever that is -- and then a call to ToString(). I have no idea why that happened instead of unwinding the call stack that got to the Set() call. The system appeared "hung" -- presumably at the Wait() call. (FWIW: I looked at the multiple call stacks view just to be sure and this is all happening on the same thread.)

    Note: Sometimes I get the above result, and sometimes NT just goes away. That is consistent with results when running without VS -- sometimes NT just vanishes, and other times Windows says NT is unresponsive.
    Code:
                public int MA_VerticalShiftLength
                {
                    get { PrintGetEntry(); return ma_PeriodLength; }
                    set {
                        PrintSetEntry();
                        ma_PeriodLength = value;
    SS here => }
                }
            }   // class MA_VerticalShift
    #endregion // MA_VerticalShift expandable object
    Here is the stack. Bold is my code. First part of the stack removed to comply with forum length requirements; that was all various Windows code.
    Code:
         [Managed to Native Transition]    <=== Exception here
         WindowsBase.dll!System.Windows.Threading.DispatcherSynchronizationContext.Wait(System.IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout)    Unknown
         [Native to Managed Transition]    
         [Managed to Native Transition]    
         NinjaTrader.Gui.dll!NinjaTrader.Gui.NinjaScript.NinjaScriptOutput.OnCodeOutputEvent(object sender, NinjaTrader.Code.OutputEventArgs e)    Unknown
         NinjaTrader.Core.dll!NinjaTrader.Code.Output.Process(string message, NinjaTrader.NinjaScript.PrintTo outputTab)    Unknown
     
    [B]NinjaTrader.Custom.dll!NinjaTrader.NinjaScript.Indicators.VsaPropertyBase.PrintPropertyEntry(string getSet, string message, string property) Line 138    C#
         NinjaTrader.Custom.dll!NinjaTrader.NinjaScript.Indicators.VsaPropertyBase.PrintGetEntry(string message, string property) Line 127    C#
         NinjaTrader.Custom.dll!NinjaTrader.NinjaScript.Indicators.VsaMA.MA_VerticalShift.MA_VerticalShiftLength.get() Line 775    C#
         NinjaTrader.Custom.dll!NinjaTrader.NinjaScript.Indicators.VsaMA.MA_VerticalShift.ToString() Line 709    C#[/B]
         Evaluation of: Unknown evaluation    
    
    SS here ==>[B] NinjaTrader.Custom.dll!NinjaTrader.NinjaScript.Indicators.VsaMA.MA_VerticalShift.MA_VerticalShiftLength.set(int value) Line 778    C#
         NinjaTrader.Custom.dll!NinjaTrader.NinjaScript.Indicators.VsaMA.MA_VerticalShift.Clone() Line 672    C#
         NinjaTrader.Custom.dll!NinjaTrader.NinjaScript.Indicators.VsaMA.Clone() Line 173    C#
         NinjaTrader.Custom.dll!NinjaTrader.NinjaScript.Indicators.AAExpandablePropertyDemo.Clone() Line 81    C#[/B]
         NinjaTrader.Gui.dll!NinjaTrader.Gui.Tools.IndicatorSelector..ctor.AnonymousMethod__7_0(object selected)    Unknown
         NinjaTrader.Gui.dll!NinjaTrader.Gui.Tools.ObjectDialogViewModel<NinjaTrader.Gui.NinjaScript.IndicatorRenderBase>.OnAddItem(object selected)    Unknown
         NinjaTrader.Gui.dll!NinjaTrader.Gui.Tools.ObjectDialogViewModel<NinjaTrader.Gui.NinjaScript.IndicatorRenderBase>.OnAvailableDoubleClick()    Unknown
         NinjaTrader.Gui.dll!NinjaTrader.Gui.Tools.ObjectDialog.OnAvailableDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)    Unknown
         PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target)    Unknown
         PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object target, System.Windows.RoutedEventArgs routedEventArgs)    Unknown
         PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised)    Unknown
    For context, the code above is for the Length property of the VerticalShift expandable object. This problem -- whether it is my bug or whether it is an NT bug -- seems to be associated with expandable objects. When I comment out all of the properties using expandable objects I no longer see the problem. The issue comes back when I restore any one of them.
    Last edited by ETFVoyageur; 08-18-2016, 02:54 AM.

    Comment


      #17
      n/m -- question answered
      Last edited by ETFVoyageur; 08-20-2016, 11:58 AM.

      Comment


        #18
        Thank you for the additional details. We will update you when we have additional information for you.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Graci117, Today, 11:40 PM
        0 responses
        5 views
        0 likes
        Last Post Graci117  
        Started by BIOK.NT, Today, 01:56 PM
        2 responses
        11 views
        0 likes
        Last Post BIOK.NT
        by BIOK.NT
         
        Started by i2ogu3, Today, 11:31 PM
        0 responses
        4 views
        0 likes
        Last Post i2ogu3
        by i2ogu3
         
        Started by RDTrader16, Today, 10:19 PM
        0 responses
        10 views
        0 likes
        Last Post RDTrader16  
        Started by gemify, 03-08-2023, 08:02 AM
        9 responses
        150 views
        0 likes
        Last Post culpepper  
        Working...
        X