Sequencefileload freezes when calling DLL

Hello

I TestStand 4.1, and when calling a DLL on the MainSequence, everything seems to work fine, but if I call him on a SequenceFileLoad TestStand freezes on this step.

What could be the problem?

Kind regards

Daniel Coelho

Daniel,

In fact, printf() can be the problem.  Because you are calling it in DLLMain, there are additional considerations you need to keep in mind.  Microsoft has a great page on these considerations here: http://msdn.microsoft.com/en-us/library/ms682583 (VS.85) .aspx

Some excerpts:

The entry point function must perform only the tasks of termination or simple to initialization. It should not call the LoadLibrary or LoadLibraryEx function (or a function that calls these functions), as this can create dependency loops in the DLL load order.

Calling functions that require one dll other than Kernel32.dll can cause difficult to diagnose problems. For example, the calling user, Shell and COM functions may cause access violation errors, because some functions to other components of the system load. Conversely, calling functions of these courses of termination can cause an access violation because the corresponding component may already have been unloaded or errors not initialized.

I'm sure that printf() is a shell command.  Also, while loading the file in sequence, it is likely that TestStand loading of DLLs or COM objects at the same time, which could conflict with a code that you have in DLLMain.

Apart from that, Microsoft strongly recommends against any unnecessary code in DLLMain.  If this problem only may not be something to do with the products NOR, but more practical copies creation of DLL in general.

Tags: NI Software

Similar Questions

  • Error 1097 when calling DLLS in LabView

    I get an error 1097 when calling the LabVIEW provider library. Curiously, the error, the DLL routines still seem to do what is asked of them.  This is the test code.  It opens an Ethernet connection to a controller of axes Galil, he asks (possibly) the value of its internal clock, and then closes the connection.  Each call library function returns error 1097 but "valve function" I32 error number is always zero. Open function causes the connection to be opened, the command function causes the send command and receives a reasonable answer, narrow funtion seems to cause the connection to be closed.

    Here is what I see when I run the test:

    Also directly configure call-library functions, as I did in this VI, I also tried using the import-shared-library Wizard to create a vilib of functions of the DLL and I get the same behavior and errors when I use these functions.  I tried to tweak some of the data types in my configured manually call library functions to see if I could find a combination that worked better with the library, but had no luck there.

    I use the x 86 version of the DLL with v2014 LabVIEW 32-bit on a 64 bit windows system 7.  I see that the error on the two computer systems of different work configured in this way. I see a similar error on a home computer with just the RTE of 2014 installed. The manufacturer says they can not reproduce the error. I always saw the error over multiple versions of their library DLL.

    In the attachment ZIP it has a link to the DLL library on the manufacturer's website. There is also a copy of the VI, the DLL and a large part of how-to-use documentation that accompanies the DLL.

    I was hoping that someone who was familiar with the use of the call-library function might take a peek at what I do and see if an error could be spotted.

    Unable to find an error, I did, I would be happy to suggestions on how I could solve this. Little seems to me like there may be a problem with the library. The manufacturer, Galil, said that they have opened a log with OR to see if NEITHER could help but since Galil said they can not reproduce the problem and provide an example of the NC, it really went anywhere.

    Given the decoration of symbol names as exported by the DLL I "m convinced that you must change the stdcall calling convention.

  • TestStand freezes when calling user interface

    Hello

    I did a bit of seraching but the problem I have is intermittent for one of the positions that I have found useful. I have a built in CVI user interface that is called the part edit-a type of step in time. When I call the UI for several times now (same step over and over) TestStand eventually freezes. Sometimes I get error messages, most of the time that it just hangs. When she throws and error, it is usually a one .NET. I received this message before the "object reference is not attached to an instance of an object", so that system level exceptions. I can't figure out exactly what is the cause. I posted my code below. If I comment on either of the two sections "BOLD" no error occurs. Also, if I do not change the setting in the user interface between the calls to the user interface I have never it freezes. So he definitley has something to do with the fill/adjustment control of the ring, or even reading the property 'ThisContext.Step.ConfigProperties.ParameterID' of TestStand. If I get more descriptive errors, I will update this post.

    Code:

    ----------------------------------------------------------------------------------------------------------------------------------------------------

    void __stdcall __declspec(dllexport) ReadParameterTSEdit (CAObjHandle seqContextCVI, char reportText [1024], short * errorOccurred, long * errorCode, char errorMsg [1024])
    {
    ErrMsg errMsg = {'\0'};
    int hpanel;
    int executed;
    int index;
    int count;
    int numParams;
    char paramIDs [100] [64];
    char param [64];
    char indexparam [64];
    char * ActCntrlTLA = NULL;
    char * temp = NULL;
    char activecntlr [23] = "active controller: ';"
    VBOOL CntrlExists;
    TSObj_Property paramids = NULL;
    TSObj_PropertyObjectFile propObjFile;
    CAObjHandle seqfileobj;
       
    Check that the system has been initialized and a profile was loaded!
    TS_PropertyExists (seqContextCVI, NULL, "ThisContext.FileGlobals.ActCntrlTLA", 0, & CntrlExists);
    If (!.) CntrlExists)
    {
    MessagePopup ("read setting", "no profile has been loaded for this sequence!");
    GoTo error;
    }
    TS_PropertyGetValString (seqContextCVI, NULL, "ThisContext.FileGlobals.ActCntrlTLA", 0, & ActCntrlTLA);
    Initializes the parameter reading UI
    hpanel = LoadPanelEx (0, "ReadParamUI.uir", READ_PARAM, __CVIUserHInst);
     
    TS_PropertyGetPropertyObject (seqContextCVI, NULL, "ThisContext.FileGlobals.ParamIDs", 0, & paramids);
    TS_PropertyGetNumElements (paramids, NULL, & numParams);
     
    for (count = 0; count)< numparams;="">
    {
         TS_PropertyGetValStringByOffset (County of paramids, NULL, 0, &temp);)
    strcpy (param, Temp);
    InsertListItem (hpanel, READ_PARAM_PARAMETERS, count, param, count);
    }

    Build a string them of active controller
    strcat (activecntlr, ActCntrlTLA);
    SetCtrlVal (hpanel, READ_PARAM_ACTIVETLA, activecntlr);
     
    TS_PropertyGetValString (seqContextCVI, NULL, "ThisContext.Step.ConfigProperties.ParameterID", 0, &temp);)
    strcpy (param, Temp);
     for (count = 0; count)< numparams;="">
    {
    GetLabelFromIndex (hpanel, READ_PARAM_PARAMETERS, count, temp);
    strcpy (indexParam, Temp);
    If (strcmp (indexParam, param) == 0)
    {
    SetCtrlIndex (hpanel, READ_PARAM_PARAMETERS, count);
    GoTo done;
    }
    }
    Fact:
     
    The display panel and run the user interface
    Does not return until that of RunUserInterface until the
    you press the Finish"" button.
    DisplayPanel (hpanel);
    Run = RunUserInterface ();
    Get the index of the selected parameter
    If (run<>
    {
    GetCtrlIndex (hpanel, READ_PARAM_PARAMETERS, &index);)
    GetLabelFromIndex (hpanel, READ_PARAM_PARAMETERS, index, param);
    TS_PropertySetValString(seqContextCVI,,"ThisContext.Step.ConfigProperties.ParameterID",0,param);
    }
     
    Output:
    / * Release resources and return * /.
    DiscardPanel (hpanel);
    TS_PropertyGetPropertyObject (seqContextCVI, NULL, "ThisContext.RunState.SequenceFile", 0, & seqfileobj);
    TS_SeqFileAsPropertyObjectFile (seqfileobj, NULL, & propObjFile);
    TS_PropertyObjectFileIncChangeCount (propObjFile, NULL);
    If (& ActCntrlTLA)
    {
    CA_FreeMemory (ActCntrlTLA);
    }
    If (& temp)
    {
    CA_FreeMemory (temp);
    }
    If (& paramids)
    {
    CA_DiscardObjHandle (paramids);
    }
    CA_DiscardObjHandle (propObjFile);
    CA_DiscardObjHandle (seqfileobj);
     
    Error:
    }

    /*---------------------------------------------------------------------------*/
    / * Callback functions * /.
    /*---------------------------------------------------------------------------*/

    int CVICALLBACK Done(int panel, int control, int event, void *callbackData, int eventData1, int eventData2)
    {
    If (event is EVENT_COMMIT)
    {
    QuitUserInterface (0);
    }
    return 0;
    }

    int CVICALLBACK CLOSEPANEL(int panel, int control, int event, void *callbackData, int eventData1, int eventData2)
    {
    If (event is EVENT_COMMIT)
    {
    QuitUserInterface (1);
    }
    return 0;
    }

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------

    Thank you

    Josh

    The problem was with this line:

    GetLabelFromIndex (hpanel, READ_PARAM_PARAMETERS, count, temp);

    I shouldn't have been past at the time to write the label that I had previously used temp with functions of API of TS. Who should have caught before posting... but it's been a long day.

  • error when calling NtSetTimerResolution in NTDLL 1097. DLL

    I get 1097 error when calling NtSetTimerResolution in NTDLL. DLL. why?   I scoured most of the posts on this forum describing the 1097 error and tried the solutions without success.

    This is a link to the function prototype (copied below) that I adapted in the node call the attached vi library (you will be asked to locate NTDLL. DLL on your system when opening it)

    NtSetTimerResolution and NtQueryTimerResolution are defined as follows. All hours are stated in hundreds of nanoseconds.

    NTSTATUS NtSetTimerResolution (
    IN ULONG RequestedResolution,
    IN BOOLEAN
    defined.
    ON PULONG ActualResolution
    );

    Parameters

    RequestedResolution

    The desired timer resolution. Must be the legal scope of the system timer values supported by NT. The standard x 86 systems it's 1 to 10 milliseconds. The values that are within the acceptable limits are rounded to the next higher standard x 86 HAL millisecond limit. This parameter is ignored if the Set parameter is set to FALSE.

    Set

    This is TRUE if we ask a new resolution of the clock, and FALSE if the application is indicating that he hasn't needed a resolution already implemented.

    ActualResolution

    The resolution of timer in effect once the call is returned in this parameter.

    Woohoo! I solved the problem.

    I was using a copy of NTDLL. DLL C:\Drivers\I386\SYSTEM32\NTDLL here. DLL (version 5.1.2600.1106)

    instead of C:\WINDOWS\system32\ntdll.dll here (version 5.1.2600.5755).

    An observation aside Interestingly enough, I did, when I tried to put the old version in C:\WINDOWS\system32 to see if it was just a problem of dependence, rather than a version number, I couldn't do it!  I tried renaming C:\WINDOWS\system32\ntdll.dll C:\WINDOWS\system32\ntdll.dll.old and immediately a replacement c:\windows\system32\ntdll.dll pop up would be in his place! I even tried to drag / drop of C:\Drivers\I386\SYSTEM32\NTDLL. DLL C:\WINDOWS\system32\ntdll.dll, it seemed to replace, but a system of security immediately replaced it with the latest version.   WinXP is smarter than I thought, or maybe something like Microsoft Windows Defender Antispyware installed by our company does this.

    In any case, I've confirmed lateer version is necessary because when I copied C:\WINDOWS\system32\ntdll.dll to C:\Drivers\I386\SYSTEM32\NTDLL. DLL, it also solves the problem.

    You might well ask why I did not use the correct version in the first place - well not knowing where he was, I only noticed the old version when I searched for it with my Google Desktop.

    Rgds

  • Skype freezes when I make a call from the 6.0 versions

    I need help, my Skype on my pc freezes when I try to close Skype. I need help because I talk through Skype to friends I play with.

    I suggest to update the following drivers to see if anything changes:

    Latest AMD generic display drivers
    http://www2.ATI.com/drivers/14-4-Win7-WIN8-WIN8.1-64-DD-CCC-WHQL.exe

    Latest drivers for generic Intel HD display (3000) *.
    http://downloadmirror.Intel.com/23764/A08/win64_152822.zip

    Provided Setup.exe cannot install. If this is the case, you must install them manually by navigating to the graphics drivers in the package. Intel has even done a FAQ on this type of procedure. http://www.Intel.com/support/graphics/sb/CS-033916.htm

    Last Realtek generic drivers audio - High Definition Audio codecs (software) - 64 - bit driver Vista/7/8/8.1
    http://www.Realtek.com/downloads/

  • Why my game Center freezes when I go by parameters or directly by clicking on the center of games? Can I know which method is the best to use to solve this problem? Also, I use an iPhone 6 s, iOS 9.3.1

    Why my game Center freezes when I go by parameters or directly by clicking on the center of games? Can I know which method is the best to use to solve this problem? Also, I use an iPhone 6 s, iOS 9.3.1

    Have you ever tried to force reboot the phone by holding down the button sleep and home for 10 seconds, until the call logo comes back again?

    You won't lose data, but it can cure a few glitches.

    If this does not work, the initial Setup would be the next step:

    Use iTunes to restore your device to factory settings - Support Apple iOS

  • 7.10 Skype crashes when called or calling on Windows 10

    After the recent update, Skype has started planting when calling or called.

    Here is the error message record:

    Name of the failing application: Skype.exe, version: 7.10.0.101, time stamp: 0x55e99095
    Name of the failed module: KERNELBASE.dll, version: 10.0.10240.16384, time stamp: 0x559f3b2a
    Exception code: 0xe0fafac1
    Offset: 0x000b3e28
    ID of the process failed: 0x32b0
    Start time of application vulnerabilities: 0x01d0ef1d1febf028
    The failing application path: C:\Program Files (x86)\Skype\Phone\Skype.exe
    Path of the failing module: C:\WINDOWS\SYSTEM32\KERNELBASE.dll
    Report ID: b4ff52ed-8537-403a-a595-49c9c1a74ab3
    Faulting full name of the package:

    The text DxDiag file is attached.

    I see I'm not the one with this issue, but I wasn't able to find a reason for Skype crashing in my case.

    Updated to version 7.11.0.102 solved the problem.

  • Efficiency call DLLS in Labview

    Hello

    I'm working on a labview program for the treatment of the data in real time.  Thus, code running efficiency will be critical.  I wonder how about the cost of calling DLLs.  Similarly, what the call cost of the subprogrammes.

    To implement the same function, the call of a Subvi will be faster than calling a DLL?

    If I can develop all screws Sub in the main program and delete all the calls, which will be much faster?

    Can someone give me any clue or guideline?

    Thank you.

    CRXX wrote: [...]

    I'm working on a labview program for the treatment of the data in real time. [...]

    What is the OS you are using?

    Since you ask in general, I answer in general:

    This question cannot be ansered. This is a case-by-case-thing and must be assessed individually.

    Most of the effect will be the memory management: which allocates the amount of memory? When it's done?

    Memory of ESP. allocation mess up determinism, if a DLL can perform worse than pure code LV (given a BONE of RT LV). But it might be preferable for some algorithms encapsulated... no one can say in general.

    Perhaps the most important question is:

    How many times is that the code (DLL vs Sub - VI) called and how short is its runtime? If the load of execution: calling code relationship is very low (-online 1:1), it is best to "solve" the subcode. SubVI Inling is a valid way in pure BT (from 2010).

    If the code is called rarely, this whole discussion is somehow obsolete as the overload of calls will be negligible, even if it would be quite high...

    And no, C is not faster as LV by definition. It also depends on the task and how you implement it...

    hope this helps,

    Norbert

  • call dll issue

    Hello

    now I need to call a dll named SajetConnect.dll, this dll will create logfile and ini file automatically when I call.

    Attached VI call this dll, there is no log file and ini file created, but the exe file that I'm building this VI work well for her.

    I also call thie dll using c# and it still work fine.

    So it seems that some path setting question went from me, thanks for your help to take a look for my trouble, thank you!

    attached list

    2. without title vi VI

    New Folder\123\Application.exe create JOURNAL SAJET. INI SajetConnect.ini when you run this exe to call DLLs

    Without seeing the source code of the DLL there is very little we can do, but shooting in blue. And I have no balls to spare in this at the moment, except maybe the DLL tries to create these files in the directory where the executable. This would be the directory where the labview.exe deveopment environment. But given that Windows Vista users don't have write access to this directory more. Some features of the INI file are virtualized in these versions of Windows and redirected to a specific shade of the user location, but only if your application uses files INI of Windows API functions. Otherwise write access fails just and you won't see them unless you manage these errors in some way and proceed to the appellant.

  • Problem in the call dll c ++

    Hello

    I have problems to make a dll written in c ++ to work when called in LabView. I don't have the source code, but I know it works because I tested it with a demo of Visual C++. I get an error of 1097 the first time I call and no error at any time after that. However, the dll does not seem to do anything. I have attached the header file and my code labview below.

    Edit: I can't download attachments so I'll post screenshots

    relevant part of the header file:

    #ifndef

    #define

    #include

    using

    #ifdef

    extern

    #endif

    #pragma pack (1)

    typedef

    } LicenceDate;

    LicenceDate displayed;

    } SoftwareLicence;

    LicenceDate displayed;

    } EsessionLicence;

    #ifdef

    SoftwareLicence & PSoftwareLicence,

    EsessionLicence & PESessionLicence);

    You cannot really the interface call this function directly to the library node. The problem here are the string parameters. Who are the C++ object model classes, something only the C++ compiler that created the DLL can guarantee to manage properly.

    People using C++ must understand that the use of C++ objects in the interfaces parameter takes a DLL basically almost certainly unusable for any other compiler that was used to create the DLL. It can be even as bad as requiring the same version of the compiler, because there is basically no binary standard on how to pass objects C++ functions. Maybe that C11 sets something but most modern C compilers are struggling even to conform fully to the C99 standard which, as its name suggests, came out in 1999 (with a few addenda released in 2001, 2004 and 2007).

    string to a type of C++ template was even more complicated than just the binary object interface, as every compiler comes with its own header designed template classes.

  • LabVIEW crash when calling matlab script?

    My version of labview 8.6, Matlab is 7.1. In the beginning, I always get error 1047 when calling matlabscript, then I downloaded recommended matscript.dll (7.1.0.2) and replace the original one (8,6) with this one. 1047 error does not happen. And the matlabscript code can be executed. However the labview crashes after that Matlab is called.

    In fact my matlab file works well. At the end of the matlab code, data must be included on the photo. And it is. But after the image is shown, my labview breaks down, and when I reload the labview, it only invites me 'the last time you run labview, it is not stopped normally. The following files are automatically saved and are available for recovery.

    I used same monitor recommended treatment. But I can't find any reason. I've removed the scriptnode output, it does the same thing.

    anyone has a suggestion. I really appreciate your help.

    Jessie

    I would say the matscript DLL that you copied on the removal and run a repair on the LabVIEW installation to see if that replaces the missing files.

  • Why TB does not freeze when I click on account settings? (Goes from bad to worse!)

    A few days ago, I posted a question about migration backup emails in TB. I got help, but not a definitive answer to my problems. Unfortunately, my wife and I seem to have created an additional problem which must be resolved before we return to the issue of migration of file. Now, TB freezes when I try to check the settings of an account. This may be due to our attempt to copy an old e-mail folder (file .sbd), in my current profile. That's how it happened:

    We copied a saved .sbd folder to
    C:\Users\FF\AppData\Roaming\Thunderbird\Profiles\pnp8j2nf.default\Mail\Local records
    We have not seen any change in TB.

    Then, in TB, we created a folder under local folders, giving it the same name as the .sbd that we had copied. The content become so visible in TB.

    When I tried to check the settings of an account, TB has frozen. Restart TB did not help. Then we tried to go back to our previous steps by deleting the folder newly created in TB and .sbd file in local folders. I restarted TB and PC, but TB still freezes when we try to check the account settings.

    Think that we could have corrupted profile, we also renamed the 8 character profiles .default under C:\Users\FrankF\AppData\Local\Thunderbird\Profiles and C:\Users\FrankF\AppData\Roaming\Thunderbird\Profiles, hoping TB would generate a new profile, but now the TB does not start without the profile.

    We wonder if we should remove profiles.ini or remove its contents to force TB to create a new profile. Any advice on which are originally the gel and how to fix? Thanks in advance.

    Apparent victory! I copied my saved files (trrevilc.default) to

    C:\Users\FF\AppData\Roaming\Thunderbird\Profiles and edited profiles.ini, changing -
    

    [Agroalimentaire1]
    Name =TB difficulty
    IsRelative = 1
    Path = Profiles /kdtnv197. Fix TB
    Default = 1

    TO

    [Agroalimentaire1]
    Name =PlanetXP
    IsRelative = 1
    Path = Profiles /trrevilc.default
    Default = 1

    and Voila! my darlings old emails and accounts reappeared... even though I have an e-mail account w a problem.

    I'm still wondering (after I backup C:\Users\FF) the best way to remove the other profiles. Suggestions would be appreciated. Thanks again.

  • Firefox crashes when loading websites, freezes when I try to download any file and completely freezes when I try to access the Options menu. Help!

    As he says, I had a difficult time with Firefox lately, and I think that it's corrupted. I tweaked the settings according to the suggestions on this forum and others like him, but they made the problem worse. I've updated to the latest version of the browser that has not helped, and I finally tried the "Reset Firefox" button, which was worse than anything. I lost my custom settings and Add-ons for nothing, the problem persists.

    More frustrating is that it completely crashes whenever I click on tools > Options, so I'm not able to make changes to this new configuration. If I export my favorites safely, I will try to uninstall the browser and re - install an older version of it, but of course it now freezes when I try to export the bookmarks file.

    Thus, apart from trashing it and starting over... any suggestions?

    For the record, it's Firefox 28.0 (do not know what version it was the beginning of the sentence), and the window "On Firefox" said that it is up-to-date. I am running Windows XP.

    Thanks for any help or enlightenment, you might be able to provide.

    Hello

    Some Firefox problems can be solved by performing a clean reinstall. This means that you remove Firefox program files, and then reinstall Firefox. Please follow these steps:

    Note: You can print these steps or consult them in another browser.

    1. Download the latest version of Firefox from http://www.mozilla.org office and save the installer to your computer.
    2. Once the download is complete, close all Firefox Windows (click on quit in the file menu or Firefox).
    3. Remove the Firefox installation folder, which is located in one of these locations, by default:
      • Windows:

        • C:\Program Files\Mozilla Firefox
        • C:\Program Files (x 86) \Mozilla Firefox
      • Mac: Delete Firefox in the Applications folder.
      • Linux: If you have installed Firefox with the distribution-based package manager, you must use the same way to uninstall: see Install Firefox on Linux. If you have downloaded and installed the binary package from the Firefox download page, simply remove the folder firefox in your home directory.
    4. Now, go ahead and reinstall Firefox:
      1. Double-click on the downloaded Setup file and go through the steps in the installation wizard.
      2. Once the wizard is completed, click to open Firefox directly after clicking the Finish button.

    More information on the resettlement of Firefox can be found here.

    WARNING: Uninstaller or the use of Firefox and not run a third remover as part of this process, because who could permanently delete your Firefox data, including but not limited to, extensions, cache, cookies, bookmarks, personal settings and passwords saved. These can be recovered, unless they have been backed up on an external device!

    Please report back to see if this helped you!

    Thank you.

  • When calling from my iphone, I get a busy signal, but it does not

    Iphone5S: when calling from my Iphone, they get a busy signal, but I do not use it.

    Is do not disturb on? (icon of Crescent Moon in the right line at the top)

  • Mac freezes when I go on facebook

    My Mac freezes when I go on facebook

    Hi there obxbes,

    It seems that all of your computer does that when you go on the FaceBook site. I would start by starting in safe mode, to erase a few caches as well as system-level to perform a disk check and repair if necessary:

    Follow these steps to start in safe mode.

    1. Start or restart your Mac.
    2. As soon as you hear the startup tone, hold down the SHIFT key.
    3. Release the SHIFT key when you see the logo Apple appears on the screen.

    After the Apple logo appears, this may take longer than usual to reach the login screen or your office. This is because your Mac performs a check of directory of your drive to boot in safe mode.

    To leave safe mode, restart your computer without pressing any keys during startup.

    From: try safe mode if your Mac does not start-up

    If this does not resolve the issue I would like to use then these two articles to fix Safari:

    If Safari does not load a page or a page Web elements are missing

    If Safari is slow, unresponsive, which closes unexpectedly, or has other issues

    Thank you for using communities of Apple Support.

Maybe you are looking for