Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

NinjaTrader crashes when exporting an indicator open source

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

    NinjaTrader crashes when exporting an indicator open source

    NinjaTrader 8.0.5.2.:

    I have coded an indicator and tried to export it open source (no DLL, no protection).

    The export worked, but NinjaTrader 8 crashed (shut down) on an unhandled exception.

    2017-03-19 14:37:25:192 *************** unhandled exception trapped ***************
    2017-03-19 14:37:25:192 Access to the path 'Butterworth Filter.dll' is denied.
    2017-03-19 14:37:25:192 System.UnauthorizedAccessException: Access to the path 'Butterworth Filter.dll' is denied.
    at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound)
    at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
    at NinjaTrader.Gui.NinjaScript.ExportNinjaScriptViewM odel.<>c__DisplayClass26_0.<DoExport>b__0(Object x)
    at System.Threading.ExecutionContext.RunInternal(Exec utionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.QueueUserWorkItemCallback.System. Threading.IThreadPoolWorkItem.ExecuteWorkItem()
    at System.Threading.ThreadPoolWorkQueue.Dispatch()
    The error message points to a path "Butterworth Filter.dll", which is strange, as there is no such path. "Butterworth Filter" is simply the name of the zip file that I have chosen for exporting the indicator. Also the indicator is pretty simple and does not reference or call any other NinjaScript files.

    #2
    The issue is not 100% reproducible.

    When exporting 40 indicators, I had 4 crashes with 4 different indicators. When exporting the same indicator a second time, the crash may repeat or not.

    The issue is not related to specific indicators, but may occur with both simple and complex indicators.

    It is a random occurence that happens in about 10% of all cases.

    Comment


      #3
      Hi Harry,

      Do you have any custom dlls in the Documents\NinjaTrader 8\bin\Custom folder?

      Trying exporting from a clean settings folder and let me know if you get the same behavior.

      To create a clean temporary NinjaTrader folder:
      • Shutdown NinjaTrader
      • Rename (My) Documents\NinjaTrader 8\ to (My) Documents\NinjaTrader 8.original\
      • Download the NinjaTrader installation package from the link below
      • https://account.ninjatrader.com/welcome-download
      • Run the repair from this (if the repair is unsuccessful, uninstall and then re-install NinjaTrader)


      This will recreate the NinjaTrader 8 folder in (My) Documents

      To switch back to your original environment:
      • Shutdown NinjaTrader
      • Rename (My) Documents\NinjaTrader 8 to (My) Documents\NinjaTrader 8.secondary\
      • Rename (My) Documents\NinjaTrader 8.original to (My) Documents\NinjaTrader 8\
      • Start NinjaTrader
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        I have no custom DLLs. The only DLLs are NinjaTrader.Custom.dll, NinjaTrader.Vendor.dll and VendorLicensing.dll.

        Repairing the installation is a complex task, as I would need to reenter license number, reconfigure data feeds, copy the data base, copy indicators and workspaces and then reinstall the vendor licensing module. This will take up to 10 hours, so I cannot do that now.

        I think you should be able to find out, why NinjaTrader searches for an inexistant path "Butterworth Fillter.dll" - the path being derived from the name I have chosen for the exported file - when I try to export a simple indicator as non DLL.

        Something is wrong here, and the guy who committed the crime should immediately know, what is going on.

        Also it is important to understand that NinjaTrader tries to access the inexistant path, after the export has already been completed.The export actually works, and it is only afterwards that NinjaTrader crashes.

        Comment


          #5
          Hello Harry,

          None of these things would be necessary to test exporting a script in a clean environment.

          You can use the Free Simulation License. No connection is necessary. No Database is necessary. Any indicators called by the script would be necessary. No strategies would be necessary.

          We are only testing exporting a script.

          I can say that I am able to export scripts on my end without issue using the latest version of NinjaTrader. This means the issue is with the script or with something you have imported in NinjaTrader.

          If you can demonstrate you are unable to export without any custom scripts we can submit this as a bug report to our development.

          How would you like to continue?
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            Originally posted by NinjaTrader_ChelseaB View Post
            Hello Harry,

            None of these things would be necessary to test exporting a script in a clean environment.

            You can use the Free Simulation License. No connection is necessary. No Database is necessary. Any indicators called by the script would be necessary. No strategies would be necessary.

            We are only testing exporting a script.
            When testing, I would need to to test it under different scenarios. For example I would need to add the vendor licensing module to find out whether it has an impact on exporting files. Basically, I would need to add elements of my current installation until the bugs shows again.

            As it is not 100% reproducible, I would need to export 30 to 40 indicator files each time, before a new occurence might happen.

            Also I would need to test it on my second machine. We are talking about several hours at least.

            Again, the key element is that the crash occurs after the file has been exported successfully. What does NinjaTrader do after the zip file has been written to the selected directory?

            Why does NinjaTrader include a non-existant DLL in the path?

            Comment


              #7
              Hello Harry,

              I am not able to reproduce this behavior on my end.

              From my understanding NinjaTrader does not include a Butterworth Filter.dll file in either NinjaTrader 7 or NinjaTrader 8.
              I am expecting that this is something you have imported. Possibly a reference to the file is causing an issue when compiling and exporting. For now I am unsure.

              I am also expecting that if you export just this script in a clean environment folder without any other 3rd party of custom scripts that the behavior will not be reproducible.

              However, if you are able to reproduce, I want to reproduce on my end as well and make sure we get this reported to our development.
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                Originally posted by NinjaTrader_ChelseaB View Post
                Hello Harry,

                I am not able to reproduce this behavior on my end.

                From my understanding NinjaTrader does not include a Butterworth Filter.dll file in either NinjaTrader 7 or NinjaTrader 8.
                I am expecting that this is something you have imported. Possibly a reference to the file is causing an issue when compiling and exporting. For now I am unsure.

                I am also expecting that if you export just this script in a clean environment folder without any other 3rd party of custom scripts that the behavior will not be reproducible.

                However, if you are able to reproduce, I want to reproduce on my end as well and make sure we get this reported to our development.

                Hello Chelsea,

                I had explained it below. I do not have any "Butterworth Filter.DLL" in any of my subdirectories.

                When I export an indicator open source and save the zip file as "Elefant", NinjaTrader 8 crashes and the error message on the trace file reads that it could not find "Elefant.dll".

                When I export the same indicator open source and save the zip file as "Butterworth Fillter", NinjaTrader crashes and the error message on the trace file reads that it could not find the path to "Butterworth Filter.dll".

                None of these DLLs exists, the name of the path is nonsense, as it is just derived from the name I had chosen for the zip file. This explains that the access is denied, as no such path exists.

                The question here is:

                Why does NinjaTrader try to access a non-existant path after the zip file has been exported? NinjaTrader probably performs an operation that should only be performed when a DLL has been exported, but this operation is also erroneously performed, when an indicator file has been exported open source.
                Last edited by Harry; 03-21-2017, 11:43 AM.

                Comment


                  #9
                  Hello Harry,

                  I believe NinjaTrader is referencing the non-existant file because something in the settings folder is not correct. I think this may also be responsible for the crashes (unhandled exception from not finding the file).

                  I think creating a new settings folder would correct the behavior.
                  Chelsea B.NinjaTrader Customer Service

                  Comment


                    #10
                    Originally posted by NinjaTrader_ChelseaB View Post
                    Hello Harry,

                    I believe NinjaTrader is referencing the non-existant file because something in the settings folder is not correct. I think this may also be responsible for the crashes (unhandled exception from not finding the file).

                    I think creating a new settings folder would correct the behavior.
                    I also believe that it would correct the behavior. But then I did not post to correct the behavior, but to find the bug, I have no assemblies installed - with the exception of the vendor assembly. My installation is as clean as it can be.

                    In order to find the bug, I would need to slowly migrate from a fresh installation to my current installation. As the issue is not 100% reproducible, but only occurs in about 10% of all cases, this would take a lot of time. I cannot currently do that.

                    I have reported the bug, and when I find some time to further enquire into that issue, I will do it. But it is hours of work.

                    Comment


                      #11
                      Hello Harry,

                      If this is a bug and not an issue with the settings of your local computer, then I would need to be able to reproduce this on my end before I can report the behavior to our development.

                      If I am not able to reproduce the behavior on my end and I am not able to provide a single simplified script or set of steps to reproduce the behavior I will not be able to report this.

                      Do you have a reduced script that can reproduce the behavior in a clean settings folder?

                      Do you have a set of steps I can use to reproduce the behavior?

                      (The point of the clean settings folder is not to correct the issue but to test to see if the issue can be reproduced. Your original folder is renamed so that we can switch back to this once we've tested in a clean environment. I have not asked you to copy any other scripts, templates, or other items into the clean environment as this would no longer be a clean environment.)

                      Please let me know if you would like to proceed.
                      Chelsea B.NinjaTrader Customer Service

                      Comment


                        #12
                        Originally posted by NinjaTrader_ChelseaB View Post
                        Do you have a reduced script that can reproduce the behavior in a clean settings folder?

                        Do you have a set of steps I can use to reproduce the behavior?

                        (The point of the clean settings folder is not to correct the issue but to test to see if the issue can be reproduced. Your original folder is renamed so that we can switch back to this once we've tested in a clean environment. I have not asked you to copy any other scripts, templates, or other items into the clean environment as this would no longer be a clean environment.)

                        Please let me know if you would like to proceed.
                        As I had already reported in the beginning the issue is not reproducible. It only occurs from time to time. This makes it particularly difficult to test the behaviour. I told you that this will take hours, as I need to migrate from the clean folder to the current folder, until I can observe the behavior again.

                        I would also need to test it on my second machine.

                        I will do it, once I find a bit of time. I simply do not have the time to start testing it right now.

                        The issue as such is easy to understand. When exporting an indicator file open source, NinjaTrader "thinks" that is has exported an assembly, somehow looks for the assembly that does not exist and crashes. All this happens after the indicator file has been successfully exported to the selected directory. That is all.

                        Comment


                          #13
                          NinjaTrader Crash

                          Further crashes today witn NT 8.0.6.0.

                          I am just exporting simple indicators (no assembly, no protection) and NinjaTrader crashes and shuts down automatically.

                          2017-04-19 11:16:56:444 *************** unhandled exception trapped ***************
                          2017-04-19 11:16:56:444 Access to the path 'ADXR Enhanced.dll' is denied.
                          2017-04-19 11:16:56:446 System.UnauthorizedAccessException: Access to the path 'ADXR Enhanced.dll' is denied.
                          at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound)
                          at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
                          at NinjaTrader.Gui.NinjaScript.ExportNinjaScriptViewM odel.<>c__DisplayClass26_0.<DoExport>b__0(Object x)
                          at System.Threading.ExecutionContext.RunInternal(Exec utionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
                          at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
                          at System.Threading.QueueUserWorkItemCallback.System. Threading.IThreadPoolWorkItem.ExecuteWorkItem()
                          at System.Threading.ThreadPoolWorkQueue.Dispatch()
                          NinjaTrader seraches for ADXR Enhanced.DLL. There is no DLL that can be accessed, as I have only exported a simple add-on open source and named the zip file containing the indicator file ADXR Enhanced.

                          There are so many programming bugs in NinjaTrader 8 and I feel that there are not being fixed at all.

                          Comment


                            #14
                            Originally posted by Harry View Post
                            Further crashes today witn NT 8.0.6.0.

                            There are so many programming bugs in NinjaTrader 8 and I feel that there are not being fixed at all.
                            This is still beta softwares. I'm still in nt7 for production. Nt8 is unreliable.

                            Comment


                              #15
                              I tried about 7 times with my simple indicator and nothing frame happened. 8052. Even tried to network share and d: drive.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Fran888, 02-16-2024, 10:48 AM
                              3 responses
                              45 views
                              0 likes
                              Last Post Sam2515
                              by Sam2515
                               
                              Started by martin70, 03-24-2023, 04:58 AM
                              15 responses
                              114 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by The_Sec, Today, 02:29 PM
                              1 response
                              7 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by jeronymite, 04-12-2024, 04:26 PM
                              2 responses
                              31 views
                              0 likes
                              Last Post NinjaTrader_BrandonH  
                              Started by Mindset, 05-06-2023, 09:03 PM
                              10 responses
                              265 views
                              0 likes
                              Last Post NinjaTrader_BrandonH  
                              Working...
                              X