Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

B8 export fails with more than a couple of files, crashes NT

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

    B8 export fails with more than a couple of files, crashes NT

    If more than two or three files are exported in a compiled assembly, whether using code protection or not, NT will crash, leaving the following stack trace in the log.

    If one or two files are included in the export it will succeed some times, crash NT others, same stack trace in the log.



    2016-01-21 12:54:33:191 *************** unhandled exception trapped ***************
    2016-01-21 12:54:33:197 The process cannot access the file 'Filename.cs' because it is being used by another process.
    2016-01-21 12:54:33:202 System.IO.IOException: The process cannot access the file 'Filename.cs' because it is being used by another process.
    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()

    #2
    Hello RanchoDinero,

    I am not seeing the same behavior on my end as I can export 16 files in a compiled assembly with no issues.

    We would need to be able to reproduce the issue on our end with steps we can recreate and understand what the source of the behavior you are seeing is.




    If you can provide us with any further details, files or screen shots to help us recreate the issue. I can submit a bug report to have this behavior reviewed by our development team.
    Shawn B.NinjaTrader Customer Service

    Comment


      #3
      OK, obviously I can't provide you with my source code to reproduce the issue. Short of that, please let me know what I can give you to help you reproduce.

      If nothing else, checking whether the file is locked - or at least catching the exception if it is - would be the bug I think. Because the stack trace clearly shows what's happening, reproducible on your end or not, right?

      EDIT: screenshot of the export crash and trace file attached.
      Attached Files
      Last edited by RanchoDinero; 01-22-2016, 09:40 AM.

      Comment


        #4
        Hello RanchoDinero,

        We are not able to reproduce.

        The trace you provided says that the file you are trying to save is being used by another program.

        You could restart your PC to ensure no program is still running that may be interfering and retry to export.
        Last edited by NinjaTrader_ShawnB; 01-22-2016, 09:51 AM.
        Shawn B.NinjaTrader Customer Service

        Comment


          #5
          The export process is trying to delete a temporary directory it created during the export itself, pretty clearly. There is no other program using this directory, but another thread used by NT might be. Looks like a race condition to me.

          I attached a screenshot and full trace for you to the previous reply.
          Last edited by RanchoDinero; 01-22-2016, 09:46 AM.

          Comment


            #6
            Hello RanchoDinero,


            Thanks for the trace and screen shot.


            After reviewing trace and image, my colleagues and I agree that restarting your PC would be ideal to troubleshoot this behavior.


            Please test by restarting your PC and then retry to export.
            Last edited by NinjaTrader_ShawnB; 01-22-2016, 09:58 AM.
            Shawn B.NinjaTrader Customer Service

            Comment


              #7
              Restarted... same result.
              Attached Files

              Comment


                #8
                Hello RanchoDinero,

                Is there any security software or backup software that is running in while you are trying to export?

                If so, could you try disabling them temporarily and then retry to export?
                Shawn B.NinjaTrader Customer Service

                Comment


                  #9
                  Windows defender was running, same result with it off.
                  Attached Files

                  Comment


                    #10
                    Hello RanchoDinero,

                    Are there any steps you took just before trying to export?

                    If so, please list these steps. This may help us to gain more information about what is happening.
                    Shawn B.NinjaTrader Customer Service

                    Comment


                      #11
                      No steps. Those traces I sent you I literally started NT and went right to the export in the screenshots.

                      Comment


                        #12
                        OK, I did a completely clean install of B8, tried the same export again, which still fails and puts the same unhandled exception in the trace file.

                        But now it will toss up 2 message boxes before crashing, which it didn't before. One of which may help. Looks like there's a null reference somewhere in the export code also. Though this - "unable to write wrapper file" - is a null reference exception and not a file IO exception. It also happens BEFORE the IO exception. I can tell this by the order the message boxes appear.

                        Hope this one helps peel the onion..
                        Attached Files

                        Comment


                          #13
                          I assume in the export routine
                          Filename
                          should be replaced by a value, and not the literal string "Filename".

                          Do you need to specify your own filename before export starts?

                          So, if Export is trying to write to a file that does not exist, and Win10 thinks it's a fileIO error, it's puking.

                          if you open file explorer to that folder, do you see any files being created during the export?

                          does this not occur during a single file export?

                          and my ultimate curiosity, are you spinning up new virtual machines with Win10 images with a fresh install of NT8, when you need to retest this, or are you doing the uninstall / reinstall manually, and could that be the reason you tweeted "I give up" late Friday afternoon

                          Comment


                            #14
                            None of what you're saying here applies. Filename.zip is default output name, results the same regardless.

                            This thread has zero to do with my tweets.

                            Comment


                              #15
                              I made sure at least 1 indicator was on a chart after switching workspaces.

                              No issue here with NT8B8.

                              I too have windows defender, but I turned it off for NT8 process and NT8 folder in My Documents. This is on Win10.
                              Attached Files

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by algospoke, Yesterday, 06:40 PM
                              2 responses
                              24 views
                              0 likes
                              Last Post algospoke  
                              Started by ghoul, Today, 06:02 PM
                              3 responses
                              15 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Started by jeronymite, 04-12-2024, 04:26 PM
                              3 responses
                              46 views
                              0 likes
                              Last Post jeronymite  
                              Started by Barry Milan, Yesterday, 10:35 PM
                              7 responses
                              23 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Started by AttiM, 02-14-2024, 05:20 PM
                              10 responses
                              181 views
                              0 likes
                              Last Post jeronymite  
                              Working...
                              X