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:

    http://screencast.com/t/8xZLBh3wtTz

    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 samir, Today, 07:00 PM
                  0 responses
                  9 views
                  0 likes
                  Last Post samir
                  by samir
                   
                  Started by travisloneker, Today, 06:52 PM
                  0 responses
                  6 views
                  0 likes
                  Last Post travisloneker  
                  Started by InfraredBusa, Today, 05:50 PM
                  0 responses
                  3 views
                  0 likes
                  Last Post InfraredBusa  
                  Started by White Fork, Today, 04:56 PM
                  1 response
                  8 views
                  0 likes
                  Last Post White Fork  
                  Started by steveyinyang, Today, 02:48 PM
                  3 responses
                  22 views
                  0 likes
                  Last Post steveyinyang  
                  Working...
                  X