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

Crash when strategy is modified

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

    Crash when strategy is modified

    NinjaTrader 8.0.22.2 64-bit

    I have set up NT on a server and brought in some strategy code. Everything works fine initially. However, whenever I make changes to the strategy and attempt to compile, NT crashes to the desktop.

    Code:
    [SIZE=11px][FONT=Courier New]2020-11-04 10:34:30:768 *************** unhandled exception trapped ***************
    2020-11-04 10:34:30:768 The system cannot find the path specified
    2020-11-04 10:34:30:772 System.ComponentModel.Win32Exception (0x80004005): The system cannot find the path specified
    at Microsoft.Win32.NativeMethods.CreateDirectory(Stri ng path, SafeLocalMemHandle acl)
    at System.CodeDom.Compiler.TempFileCollection.CreateT empDirectoryWithAce(String directory, String identity)
    at System.CodeDom.Compiler.TempFileCollection.GetTemp FileName(String tempDir)
    at System.CodeDom.Compiler.TempFileCollection.EnsureT empNameCreated()
    at System.CodeDom.Compiler.TempFileCollection.AddExte nsion(String fileExtension, Boolean keepFile)
    at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch (CompilerParameters options, String[] fileNames)
    at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDo m.Compiler.ICodeCompiler.CompileAssemblyFromFileBa tch(CompilerParameters options, String[] fileNames)
    at NinjaTrader.Code.Compiler.Compile(Boolean checkCompileOnly, Boolean debugBuild, IEnumerable`1 filesToIgnore, IEnumerable`1 filesInTmp)
    at NinjaTrader.Gui.NinjaScript.Editor.EditorViewModel .<>c__DisplayClass214_0.<OnCompile>b__1(Object s)[/FONT][/SIZE]
    This is bringing me to a standstill. Please help!

    #2
    Hello aworldnervelink,

    Thanks for your post.

    I may suspect issues with the installation since the exception looks to be attributed to the code editor.

    Could you test running a Repair operation n the installation to see if that resolves? this can be run from an installer which we can find below.

    Download - https://ninjatrader.com/PlatformDirect

    If issues are persisting, could you test setting up a clean environment and testing there?

    Clean Environment Test:

    Creating a clean environment can be done by following the steps below:
    1. Close NinjaTrader 8, and rename the "NinjaTrader 8" folder in My Documents to something like: "NinjaTrader 8 OLD" Do not delete this folder.
    2. Uninstall NinjaTrader from the Windows Control Panel
    3. Delete the C:\Program Files (x86)\NinjaTrader 8 folder
    4. Reinstall using the installer from http://ninjatrader.com/PlatformDirect
    5. Test making changes to new NinjaScripts in this clean environment
    6. Add the required strategies/indicators and test to reproduce the issue
    If you ever need to switch back to your original platform, you may do so by closing NinjaTrader and swapping the platform folder names.

    For example, Close NinjaTrader and rename the new "NinjaTrader 8" folder to "NinjaTrader 8 NEW" and the "NinjaTrader 8 OLD" folder to "NinjaTrader 8." Then restart the platform. Simply put: NinjaTrader 8 will always load the "NinjaTrader 8" folder in My Documents.

    I look forward to hearing back.
    JimNinjaTrader Customer Service

    Comment


      #3
      This is still biting me on a consistent basis. Running the Repair does not fix the problem. My initial situation was essentially a clean environment - I started with a brand new Windows VM, installed NT, and loaded my code into it. This is not an installation that has been running a long time or used for development work. Each time this happens I reload the VM from a backup and I am able to compile my code one time before it gets into the stuck state.

      Regardless of any sort of installation problem the software should not crash because it can't find a directory - that is just poor error handling.

      Comment


        #4
        Hello aworldnervelink,

        Please write in to platformsupport [at] ninjatrader [dot] com with the text "Attn Jim 2819850" and please include a link to this thread.

        I would like to receive any code and specific steps I can take to reproduce this issue on my end from a clean environment.

        If this cannot be done, please set up a Documents\NinjaTrader 8\ platform folder that can reproduce this issue consistently, with only the code necessary to reproduce the issue added, and with all historical data and market replay data removed from that platform folder. Please then zip up this platform folder and share it on a file sharing service and send a link my way so I can test on my end.

        Could you also confirm that you do not have any anti virus software or cloud sharing software that is using the Documents\NinjaTrader 8 folder? These applications may prevent NinjaTrader from properly accessing/creating files and it also would be possible for these applications to mess with NinjaTrader's directory structure.

        I would also like to receive your log and trace files.

        Attaching Log and Trace files

        Please follow the steps below to manually attach your log and trace files to your email so I may investigate this matter further.
        • Open your NinjaTrader folder under My Documents.
        • Right click on the 'log' and 'trace' folders and select Send To> Compressed (zipped) Folder.
        • Send the 2 compressed folders as attachments to an email to platform support
        • Once complete, you can delete these compressed folders.
        I look forward to assisting.
        JimNinjaTrader Customer Service

        Comment


          #5
          I have installed Ninjatrader on a server. Recently, whenever I add or make changes to strategies and compile, I get this frustrating error message and the system crashes: Unhandled Exception: The system cannot find the path specified. How do I solve this problem?

          Comment


            #6
            Hello Godfutures,

            I reviewed the associated case and it appears that the issue had resolved its self for the user and they had closed the case. I was unable to see any underlying cause. I would suggest to do a clean installation as described in post 2. That would be to check if you get this with no modifications to the platform. If so I would suggest to write into [email protected] and include your log and trace files. You don't need to reference this post in your email, the associated case was closed with no resolution. We would instead need your log and trace files to see if anything else is being reported along with that error.

            Please also make sure you are updated to the most recent version of the platform before testing the clean installation.
            JesseNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by usazencort, Today, 01:16 AM
            0 responses
            1 view
            0 likes
            Last Post usazencort  
            Started by kaywai, 09-01-2023, 08:44 PM
            5 responses
            603 views
            0 likes
            Last Post NinjaTrader_Jason  
            Started by xiinteractive, 04-09-2024, 08:08 AM
            6 responses
            23 views
            0 likes
            Last Post xiinteractive  
            Started by Pattontje, Yesterday, 02:10 PM
            2 responses
            22 views
            0 likes
            Last Post Pattontje  
            Started by flybuzz, 04-21-2024, 04:07 PM
            17 responses
            230 views
            0 likes
            Last Post TradingLoss  
            Working...
            X