Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simple custom control (slider) crashes NT8

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

    Simple custom control (slider) crashes NT8

    Attached is a sample displaying the behaviour (in the Indicator list it will be in the Samples folder)

    To replicate open NinjaScript Output and add SampleSliderX01 Indicator to the chart.

    On the Top Right of the chart you have small slider - move it to the left and right (it will output slider values from 1 to 6 in the output window) - if there is more stuff on the chart it will crash quickly if it is by itself move slider quicker for a crash to happen.
    Attached Files

    #2
    Hi gregid,

    Thanks for the report.

    I added this sample to my chart but I was not able to reproduce any crash by moving the slider.

    If by "more stuff on the chart" you mean other user controls, I also added a sample button to the user control collection and could not reproduce the crash either.

    Here is a quick video of what I did:

    Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.


    Please let me know what I may be missing... I also attached the script I used which adds to the user control collection.

    At any rate, since you were able to reproduce on your end - you may want to test again using the ChartControl.Dispatcher, rather than the NinjaScript(this).Dispatcher()

    Please let me know if that helps/does not.

    Is there an exception thrown when it crashes? If so, do you have any messages or inner exception messages you can pass along if you attached you custom project to a visual studio debugger?
    Attached Files
    MatthewNinjaTrader Product Management

    Comment


      #3
      Hmm... On my end what you were doing would definitely result in a crash. There is no exception and trace log is clear, just crash (and it happens every time). I'll come back to you tomorrow hopefully with some some more info.

      Comment


        #4
        I managed to get the exception in the debug mode this time in VS:

        System.AccessViolationException was unhandled
        Message: An unhandled exception of type 'System.AccessViolationException' occurred in PresentationCore.dll
        Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

        Comment


          #5
          If it is of any value - I am running NT8 on Windows 10. Changing dispatcher didn't help.

          I also tried adding DispatcherTimer (with 1 second interval) to decrease the number of time the events are executing changes - it helped a bit but after some more tries it also crashed.

          Comment


            #6
            Ok, thanks - I'm on Win7 myself, I'll check with a colleague who uses Win10.
            MatthewNinjaTrader Product Management

            Comment


              #7
              Originally posted by NinjaTrader_Matthew View Post
              Ok, thanks - I'm on Win7 myself, I'll check with a colleague who uses Win10.
              Unfortunately - he reported the same as me...

              What version of VS are you debugging in? What version of .NET is installed on your system?
              MatthewNinjaTrader Product Management

              Comment


                #8
                Originally posted by NinjaTrader_Matthew View Post
                Unfortunately - he reported the same as me...

                What version of VS are you debugging in? What version of .NET is installed on your system?
                Microsoft Visual Studio Community 2015
                Version 14.0.23107.0 D14REL
                Microsoft .NET Framework
                Version 4.6.00079

                Installed Version: Community

                Comment


                  #9
                  Trying the obvious

                  I decided to try the obvious and restarted my machine and ... Voila!
                  Trying hard to crash it but it seems it works fine now!

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Pattontje, Yesterday, 02:10 PM
                  2 responses
                  15 views
                  0 likes
                  Last Post Pattontje  
                  Started by flybuzz, 04-21-2024, 04:07 PM
                  17 responses
                  229 views
                  0 likes
                  Last Post TradingLoss  
                  Started by agclub, 04-21-2024, 08:57 PM
                  3 responses
                  17 views
                  0 likes
                  Last Post TradingLoss  
                  Started by TradingLoss, 04-21-2024, 04:32 PM
                  4 responses
                  44 views
                  2 likes
                  Last Post TradingLoss  
                  Started by cre8able, 04-17-2024, 04:16 PM
                  6 responses
                  57 views
                  0 likes
                  Last Post cre8able  
                  Working...
                  X