• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

F# libraries

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

    F# libraries

    NinjaTrader 8 crashes when trying to use any F# library. Are these type of libraries compatible?

    #2
    Hello Optiondreamer,

    Thank you for writing in. I am currently investigating this and will update you as soon as possible.

    Thank you for your patience in the meantime.
    Michael M.NinjaTrader Quality Assurance

    Comment


      #3
      Hello Optiondreamer,

      I can look into this further if you could please provide me with your log and trace files showing the error message you are receiving as well as the specific library you are using.

      You will find the log file on your PC in the (My) Documents > NinjaTrader 8 > Log folder.
      -The log file will be named "log.20150811.txt"
      You will find the trace file on your PC in the (My) Documents > NinjaTrader 8 > Trace folder.
      -The trace file will be named "trace.20150811.txt"
      Then please also include a link to the specific library you are referencing or the library itself.

      Please attach these files to an email to platformsupport[AT]ninjatrader[DOT]com and be sure to include "ATTN: Michael M Ticket No: #1367123" in the Subject line of your email.

      Thank you in advance.
      Last edited by NinjaTrader_MichaelM; 08-12-2015, 06:04 AM.
      Michael M.NinjaTrader Quality Assurance

      Comment


        #4
        Crash with another library(C#)

        Trying to use another library, now with a C# library, NinjaTrader crashes .... Is there any restriction with certain type of libraries?
        Used library: Caliburn.Micro https://github.com/Caliburn-Micro/Caliburn.Micro

        Exception after crash....

        HTML Code:
         An unhandled exception of type 'System.Reflection.ReflectionTypeLoadException' occurred in mscorlib.dll
         Additional information: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

        Comment


          #5
          Hello Optiondreamer,

          Unfortunately there is no way for us to support all C# libraries. There are so many different ways that libraries can negatively interact with the platform, with each other, etc that it is almost impossible to answer this question definitively. I apologize for the inconvenience. I believe in this specific case the errors may be related to the fact that the UI is multithreaded in NT8.

          Please let me know if I may be of further assistance or if you have any further questions.
          Last edited by NinjaTrader_MichaelM; 08-26-2015, 12:56 PM.
          Michael M.NinjaTrader Quality Assurance

          Comment


            #6
            Can you clarify when it crashes? Are you adding the reference and it immediately gives exception or when you use a method of the library?
            BrettNinjaTrader Product Management

            Comment


              #7
              Starting NinjaTrader, while loading libraries....
              In Editor, add reference, close all and re-open, then crash...
              When delete dll from Custom directory, opens without crash...
              Also, copying dll in this folder, whithout add any reference, crashes too

              Regards.

              Comment


                #8
                Interesting will give it a quick try on my side tomorrow to see if I can offer any more help.

                As a rule of thumb any c# library I would expect could be installed with NinjaTrader (This is just .net functionality not specific to NinjaTrader) However if the library uses reflection I have seen where they don't play well with the fact that NinjaTrader 8 has multiple UI threads which may be whats happening here.
                BrettNinjaTrader Product Management

                Comment


                  #9
                  I tested this today and didn't see an issue:

                  * Downloaded the source
                  * Build the .Caliburn.Micro.NET40 project
                  * Copied the DLL to My Document > NinjaTrader 8 > bin > custom folder
                  * Referenced it with NinjaTrader 8 NS editor.
                  * Compiled
                  * Restarted.

                  No problems, suggesting you might have some other issue going on or a bad build or something on your side.
                  BrettNinjaTrader Product Management

                  Comment


                    #10
                    Thank you very much Brett.

                    Compiled dll worked without any issue.

                    Also discovered, ,that any dll in Custom folder with references to other dll that is not in this folder causes NT8 crashes.

                    Comment


                      #11
                      Originally posted by Optiondreamer View Post
                      Thank you very much Brett.

                      Compiled dll worked without any issue.

                      Also discovered, ,that any dll in Custom folder with references to other dll that is not in this folder causes NT8 crashes.
                      I have seen this with the Accord Library as well. It was very difficult to debug as the fault is silent. It give a strange error in the trace file, don't remember, but NT7 use to tell you what it was loading and if there was a problem with the DLL, this would be very handy in NT8.

                      Comment


                        #12
                        Can you post a link to the library or test case I could use to replicate. Since I never was able to replicate with the caliburn micro test case below. I could then ask development to take a look.
                        BrettNinjaTrader Product Management

                        Comment


                          #13
                          Brett,

                          I have attached a ZIP file of the ACCORD .NET library. I have added BAK to one of the files (which is not needed to compile ACCORD files, but required to execute). You will get the error attached upon starting NT8 with these files in your Custom directory.

                          The tricky part here is debugging, it took a long time for me to figure out what files were missing, I thought the TYPE was something in NT8 no the external libraries.

                          You can remove the BAK and NT8 will load fine. If you add most of the ACCORD files you can compile solutions, but the DLLs must like to the AForge.dll and fail upon initialization. Anything you can do to make debugging this easier would be much appreciated. I would include the log files but you will get your own set.
                          Attached Files

                          Comment


                            #14
                            Just to make sure I unzip the attached in My Documents / NinjaTrader 7 / custom / bin directory and delete the AForge.dll.bak file. I add a reference to Accord.dll in NT7 and restart NinjaTrader.

                            NT7 now doesn't load but it gives me a clear error.

                            When I do the same in NT8 it does not give me a clear error.

                            That is the issue or am I off base? Just want to make sure I understand.
                            BrettNinjaTrader Product Management

                            Comment


                              #15
                              That is the issue I was having, took me several hours to track down the cause of NT8 not starting. I don't remember because it was a while ago, but even SAFE Start didn't work... Might be worth trying that as well.

                              I would be nice to know it is one of the added DLLs that cause failed system startup.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by pitifak, Today, 01:01 AM
                              0 responses
                              3 views
                              0 likes
                              Last Post pitifak
                              by pitifak
                               
                              Started by rjafcv, Yesterday, 10:40 PM
                              0 responses
                              4 views
                              0 likes
                              Last Post rjafcv
                              by rjafcv
                               
                              Started by JAtrades, Yesterday, 07:38 PM
                              0 responses
                              3 views
                              0 likes
                              Last Post JAtrades  
                              Started by bouncetherubble, Yesterday, 07:07 PM
                              0 responses
                              3 views
                              0 likes
                              Last Post bouncetherubble  
                              Started by bouncetherubble, Yesterday, 06:12 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post bouncetherubble  
                              Working...
                              X