Why does labview close whilst my program is running?

I am running a program doing data acquisition using the PCI-6602 cards. Everything works fine but somehow after I have been doing acqusition and saving the data for approximately 2 days, I find out that the program has been stopped by LabVIEW and find all the windows closed including labVIEW. In my program I did not use any of the exit functions provided with LabVIEW but somehow, labVIEW exits by itself without issuing any error messages. Why is this happening?

I experienced a problem with LabVIEW 7.0 shutting down unexpectedly.  It may be completely unrelated, but I thought I'd mention it just in case.  My problem was that I was calling a DLL that used a reference handle.  At the end of my test (using TestStand), the test closed, and thus the DLL was unloaded from memory as well.  Because there was still a handle open to this DLL, LabVIEW must not have known how to handle this and shut down (or it confused Windows and it shut down LabVIEW).  In any case, the solution was to have a VI stay in memory which calls this DLL, and put the DLL in a the true case of a case statement wired with a constant false.  Thus, the DLL is never actually called by this VI, but it keeps the DLL in memory.
So if you call any VIs dynamically, etc., where a VI could be unloaded from memory, check those VIs and make sure you aren't leaving any references open or something like that.
Hope this is in some way helpful.
Tom

Similar Messages

  • Why does LabVIEW allow me to have 2 controls with same name

    Here's a general LabVIEW question:
    Why does LabVIEW allow me to have 2 controls with the same name in the same VI?  It seems like this only increases the chances of confusion.  Especially when someone is just looking at a block diagram (or documentation of a block diagram).
    No other programming language that I know of allows this.  I realize that uniqueness of name is not as critical in LabVIEW as it is in any text based language.  For example, in a text based language, if I had 2 variables called abc and I wrote a statement
    abc = 12;
    the compiler would not know which abc was being referred to.  In LabVIEW, if we had 2 controls called abc, the equivalent of doing an abc=12 is writing to a local variable (which is always linked to one of the controls) and there is no ambiguity.  Still, someone looking at the code cannot figure out which abc is linked to unless he does a right click>>Find>>terminal (or a double click).
    Even though I have never and never will name 2 controls the same, I think it would be a nice constraint to see enforced by LabVIEW.
    Any input from NI engineers on this?
    Message Edited by S G on 12-18-2007 03:38 PM
    S G
    Certified LabVIEW Architect, Certified TestStand Developer, Certified Professional Instructor
    Attachments:
    Trial1.JPG ‏21 KB

    I know when you copy and paste a control or indicator, LabVIEW automatically increments the label. But since you can hide the label, and show or hide the caption, there must be another mechanism that LabVIEW uses to keep track of all the controls. I thought I remember back in the "old days" (ver 6 or 6i) LabVIEW would give you an error if you tried to make two controls with the same name. Perhaps that was LabWindows/CVI.
    I don't know where the index is actually stored, but if you look at a property node linked to the Pane, you will see an array of references to the controls and indicators. Since the references are stored in an array, I assume that any local variables are tied to the index of that array. Since the labels themselves are properties of the control, I guess there's no reason to limit what that label is. They all have a unique index number.
    Interestingly, this array of references grows from the beginning. That is, any new control or indicator is put at index 0, not the end of the array.
    B-)
    Message Edited by LabViewGuruWannabe on 12-18-2007 08:45 PM
    Attachments:
    Labels.png ‏12 KB

  • Why does Labview allow a cursor in a indicator?

    Hello,
        Why does Labview allow the user to position the cursor with the mouse inside a numeric indicator? Users think that just because they can put a cursor they should be able to type something and enter data. Is there a way to disable/stop the user from putting the cursor in a numeric indicator?
    Regards,
    Kaspar
    Solved!
    Go to Solution.

    Disabling the indicator satisfies your requirements, but this is funnier.  It would be even better if I calculated the position of the indicator and the "entry point" and just kept the mouse from entering, but I have a project to finish... 
    Message Edited by jcarmody on 03-27-2009 11:58 AM
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
    Attachments:
    move.png ‏4 KB
    test.vi ‏9 KB

  • Why does Safari close each night, overnight?

    Why does Safari close each night, overnight? I leave my iMac computer on overnight and Safari always stayed open until I closed it.  This closing nightly is new within the past two months. I have Safari version 7.1 and OSX 10.9.5. Is this a setting I can adjust? I am not interested in updating to Yosemite at this time for a solution.

    You may have installed the "Genieo" or "InstallMac" ad-injection malware. Follow the instructions on this Apple Support page to remove it.
    Back up all data before making any changes.
    Besides the files listed in the linked support article, you may also need to remove this file in the same way:
    ~/Library/LaunchAgents/com.genieo.completer.ltvbit.plist
    If there are other items with a name that includes "Genieo" or "genieo" alongside any of those you find, remove them as well.
    One of the steps in the article is to remove malicious Safari extensions. Do the equivalent in the Chrome and Firefox browsers, if you use either of those.
    After removing the malware, remember to reset your home page in all the web browsers affected, if it was changed.
    If you don't find any of the files or extensions listed, or if removing them doesn't stop the ad injection, then you may have one of the other kinds of adware covered by the support article. Follow the rest of the instructions in the article.
    Make sure you don't repeat the mistake that led you to install the malware. Chances are you got it from an Internet cesspit such as "Softonic" or "CNET Download." Never visit either of those sites again. You might also have downloaded it from an ad in a page on some other site. The ad would probably have included a large green button labeled "Download" or "Download Now" in white letters. The button is designed to confuse people who intend to download something else on the same page. If you ever download a file that isn't obviously what you expected, delete it immediately.
    In the Security & Privacy pane of System Preferences, select the General tab. The radio button marked Anywhere  should not be selected. If it is, click the lock icon to unlock the settings, then select one of the other buttons. After that, don't ignore a warning that you are about to run or install an application from an unknown developer.
    Still in System Preferences, open the App Store or Software Update pane and check the box marked
              Install system data files and security updates (OS X 10.10 or later)
    or
              Download updates automatically (OS X 10.9 or earlier)
    if it's not already checked.

  • Why does Notes close every time I open it?   I can't access my notes...

    Why does Notes close every time I open it?   I can't access my notes;
    there don't appear to be any.    Help!
    When I check in Settings, Notes has disappeared from the list of Apps
    On my iPhone, yet I didn't delete it.    I had dozens of notes, lots
    of necessary information stored therein. 
    Thanks for any help....

    I was having this issue also. I found this thread and disabling Exchange Notes did the trick. Obviously, this is the solution only if you were using Exchange to begin with.
    If you want to continue to use Exchange notes or perhaps try this to see if it works in general, I found a fix on this site. All works well now.
    1. Delete your exchange account from the Mail, Contacts & Calendars pane in System Preferences.
    2. Go to Finder, click "Go" in the menu bar, click "Go to Folder" and type in "~/Library" (without the quotes) in the box. This will take you to your user Library folder.
    3. Use the search box in the finder and type in "com.apple.notes" and click "Library" in the search bar that appears. This should now find several folders and files related to the Notes app. Rename or delete everything except the help files (with the lifesaver icons on them).
    4. Restart your Mac. Put your exchange account back into System Preferences, you can go ahead and activate the Notes sync service.
    5. Open Notes and it should be working now!

  • WHY DOES PAGES CLOSE QUICKLY AFTER OPENING A DOCUMENT .DOC AND REPORTS ERROR?

    WHY DOES PAGES CLOSE QUICKLY AFTER OPENING A DOCUMENT .DOC AND REPORTS ERROR?

    HAVE YOU UPGRADED PAGES, WHATEVER VERSION THAT MAY BE BECAUSE YOU HAVEN"T TOLD US, TO THE LATEST VERSION WITH SOFTWARE UPDATE…?
    AND WHY IS YOUR CAPS LOCK STUCK DOWN?
    PETER

  • Why does safari close constantly on ipad1?

    why does safari close constantly on ipad1

    Could be any one of many things.  Try these...
    Clearing Safari's history, cookies, cache
    Reset the iPad... press the home and sleep/lock buttons until you see the Apple logo, ignoring the slider. Takes about 5-15 secs of button holding and you won't lose any data or settings.
    Shut down and restart the app...
    - From any Home Screen, double tap the home button to bring up the Recents List
    - Tap and hold any icon in this list until they wiggle
    - Press the red to delete the offending app from this list.
    - Press the home button twice when done.
    - Restart the app

  • Why does it shut down from programs

    Why does it close out from programs

    In the mean time try this:
    1. Double-click the Home button to see all Inactive Apps in Task Bar
    2. Hold the Apps down for a second or two until you see the minus sign
    3. Tap the minus sign to close App
    4. Tap center of screen to return to Home Screen
    5. Reset iPad. Hold the Sleep and Home button down for about 10 second until you see the Apple logo. Ignore the red slider

  • For Experts: Why does LabView cause System reboot while accessing hardware with driver?

    Hello NI Developers!
    I use LabView 7.1 under Windows XP
    I have a programm console application which accesses through Jungo Windriver PCI-E board.
    This program works fine - and performs DMA data transfer between PC and Board's memory.
    In order to implement this console application work together with LabView I did following:
    1) Added this function inside the source:
     _declspec(dllexport) void LVMainFunction(uInt32 *IntValue);
    _declspec(dllexport) void LVMainFunction(uInt32 *IntValue)
        AllocConsole();                   //Open new console window
        SetConsoleTitle(L"Debug Window"); //Set a title for console window
        freopen("CONOUT$","a+",stdout); //redirec standard output stream to current window so
                                        // so we are able to see "printf" outputs
       freopen("CONIN$","a+",stdin);    //redirec standard input stream to current window so
                                        // so we are able pass inputs from keyboard
       main();                          //Call applications main function which does all the work
    2) Compiled this new source as DLL library
    3) Call  LVMainFunction(...) function from LabView using Call Library Node
    In the result: Executing VI - opens new console window, shows debug outputs and receives keyboard inputs.
    It works fine till the last function, which perform DMA data transfer - and reboots PC.
    1) Why does this happen?
    2) I understand that opening console from Call Library Node, attaches together this console window and running VI. So If I close one of them - both windows closes.
         So does LabView have somekind of restrictions of accessing Hardware's functions? 
    I can read Board's resource information and view size of memory on board, interrupt functions and other information about device, but when I try to reach
    DMA my system reboots. And I understand that this should be some kind of LabView problem, cause I tried different implementations, even without use of
    console window - and the result is the same.
    3) Should I split the program in to two separate processes and perform data exchange using Sockets or Pipes techology?
    Thank you in advance!
    ACiDUser
    Message Edited by ACiDuser on 11-13-2008 09:37 AM

    Hello!
    At LAST!!!
    I solved this problem!
    From the beginning I was following National Instruments manual on how to build DLL with external IDE:
      http://zone.ni.com/reference/en-XX/help/371361A-01​/lvhowto/building_library_project/
    Set the Struct member alignment control to 1 Byte.
    Now this option caused my PC to reboot!
    So could someone explain  why this happened? and If it is a bad tip, so it's better to remove from manual. Then other people will not have such problems as I did
    - wasting 2 monthes of time determining the problem. 
    I changed it to  Set the Struct member alignment control to DEFAULT.
    and now everything works fine.
    Regards
    Message Edited by ACiDuser on 11-13-2008 11:14 AM

  • Why does Labview hang when switching from one TestStand application to another?

    I have several 2013 TestStand applications that use a number of LabView 2013 VIs on a test computer.  When the operator closes one TestStand program and opens another often Labview does not close properly and so when TestStand tries to load the LabView VIs it hangs or just runs and every test that is affected by LabView fails.  The only potential issues that I know about are that two of the applications were created in LabView 2009 and then updated to 2013.  Then two other TestStand applications that were created in 2013 use the function "UnloadAllModules". 
    Are there any known issues with LabView 2013 that cause this or any ideas of what I might be doing wrong?
    Solved!
    Go to Solution.

    Hello Michael,
    I did find my issue.  In my case a VI was not getting closed properly in cleanup due to the previous command not passing the handler out correctly.  Thus this VI would remain open and when I ran another TestStand Sequence, when it tried to load that LabView VI it would just hang.  But the result of this error could be seen when I closed TestStand and LabView stayed open (since it was frozen) or when done running the sequence and closing it.  Then if you tried to pop-up LabView it would not show the starting splash screen because it had froze.
    I found the problem by turning on the show VI front panel option in TestStand for all of the VI calls.  The VI that stayed open was the problem VI.
    Thanks everyone who responded for your help!
    Kurtus

  • Why does LabView crash when unloading my DLL (reentrant calls)?

    I have written a DLL in Borland Delphi using multiple threads that exports several functions (stdcall). I am using LabVIEW 6i on a WinXP machine.  All functions in the DLL work as expected and return correct values. Everything works fine if I set all Call Library Function Nodes to 'UI-Thread', but as soon as I set one Function Node to 'Reentrant', LabView crashes when I close the VI after it has been executed. I assume the error is caused by the DLL unloading mechanism of LabView. Other C++/Delphi programs using the DLL reentrantly work fine, this only occurs in LabView. In which thread does LabView call FreeLibrary/DLL_PROCESS_DETACH? Has anyone experienced similar problems?

    I have never run into this situation myself, but I do know that calling a multi-threaded DLL or CIN from LabVIEW does depend upon the following criteria:
    If your CIN/DLL doesn't have any global data storage (global variables, files on disk, etc.), AND it doesn't access any hardware (register-level programming) AND it doesn't call any functions/DLLs/Drivers that are thread-unsafe.
    OR
    Your CIN/DLL protects (with semaphores or mutex's) access to those global resources.
    OR
    Your DLL is only called from one, non-reentrant VI
    OR
    Your CIN is only called from one, non-reentrant VI AND you don't access any global resources from CINInit, CINAbort, CINDispose, etc. procedures.
    Hopefully this information can help you out in some way.
    J.R. Allen

  • Why does closing a .exe cause program to "Not Respond"?

    I have generated an executable using the LabView compiler.  The program runs as expected, but when I close the program Windows prompts me with the program stopped working error.  The error information is as follows:
    Problem signature:
    Problem Event Name: APPCRASH
    Application Name: MegaAwesome.exe
    Application Version: 1.0.0.0
    Application Timestamp: 4e020bac
    Fault Module Name: user32.dll_unloaded
    Fault Module Version: 0.0.0.0
    Fault Module Timestamp: 4a5bdb2f
    Exception Code: c0000005
    Exception Offset: 691c738f
    OS Version: 6.1.7600.2.0.0.256.4
    Locale ID: 1033
    Additional Information 1: 0a9e
    Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
    Additional Information 3: 0a9e
    Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
    Please let me know if I have failed to supply enough information to help in troubleshooting this issue.
    Thanks,
    Jeremy

    Wardjw0 wrote:
    I have generated an executable using the LabView compiler.
    On a side note:
    Just to get some potential confusion out of the way, an executable is created by the application builder, not the compiler.
    A VI is always compiled, even if run in the development system. (More information).
    LabVIEW Champion . Do more with less code and in less time .

  • Why does this reloadData crash my program?

    Can anyone help me figure out why [tableView reloadData] is crashing my program? I have a grouped tableView where I want to allow the user to reorder rows. Each of the rows is dynamically numbered in cellForRowAtIndexPath, so when the cell draws the rows are consecutively numbered. Whenever the user makes a change to the list order such as from:
    1. Name A
    2. Name B
    3. Name C
    to: (switch 1 & 3)
    3. Name C
    2. Name B
    1. Name A
    I want it to say
    1. Name C
    2. Name B
    3. Name A
    Here is the code, but I get * Terminating app due to uncaught exception 'NSRangeException', reason: '* -[NSCFArray objectAtIndex:]: index (1) beyond bounds (1)'
    Here is the Code:
    - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
    if (fromIndexPath.section == 0) {
    NSDictionary *currentName =[[[bNameChoices objectAtIndex:fromIndexPath.row] retain] autorelease];
    [bNameChoices removeObjectAtIndex:fromIndexPath.row];
    [bNameChoices insertObject:currentName atIndex:toIndexPath.row];
    } else if (fromIndexPath.section == 1) {
    NSDictionary *currentName =[[[gNameChoices objectAtIndex:fromIndexPath.row] retain] autorelease];
    [gNameChoices removeObjectAtIndex:fromIndexPath.row];
    [gNameChoices insertObject:currentName atIndex:toIndexPath.row];
    [tableView reloadData];
    Any help on this would be appreciated!

    gpmoore wrote:
    I found a work around which I am a bit embarrassed by but it works (I hate cheating like this but I didn't want to waste time):
    Doing it correctly is not a waste of time. I suspect that you have other things going on that are causing your crash. How far do you want to go with this program? If you want to support drag-n-drop and other fancy things then you'll have to get this resolved.
    There has been some side discussion here that you may or may not have seen. I don't know what is going on with your autorelease. For all I know you are giving your object to some random autorelease pool from the context of whomever is calling this delegate function.
    Full support of drag and drop can be complicated. Essentially, what I do is this:
    1) Remove all selected row objects (which may be a discontiguous set) and move them to a new array.
    2) Find the insertion point. You will need to do some calculations to find where it will be.
    3) Move all the objects from the temp array into the new location.
    Here is an example straight from my code:
    // Move rows to a new row.
    - (void) moveRows: (NSIndexSet *) rows toRow: (unsigned int) row
    // Get an array of the rows I'll be moving.
    NSArray * movedRows = [myData objectsAtIndexes: rows];
    // Remove the rows from the list.
    [myData removeObjectsAtIndexes: rows];
    unsigned int offset = 0;
    // Now that I've removed the rows. I need to calculate the new
    // insert location, taking into account rows that I just removed.
    for(unsigned int i = [rows firstIndex]; i != NSNotFound;
    i = [rows indexGreaterThanIndex: i])
    if(i < row)
    ++offset;
    // Build a new set of rows, taking the offset into account.
    NSIndexSet * newRows =
    [NSIndexSet indexSetWithIndexesInRange:
    NSMakeRange(row - offset, [rows count])];
    // Now put the rows where they need to be.
    [myData insertObjects: movedRows atIndexes: newRows];
    // Redisplay the table.
    [myTableView reloadData];
    // Select the new rows.
    [myTableView selectRowIndexes: newRows byExtendingSelection: NO];
    if(myUndoManager)
    // Allow this operation to be undone.
    [[myUndoManager prepareWithInvocationTarget: self]
    moveRowsAtRow: row - offset toRows: rows];
    // Update the change counter.
    if(myDocument)
    [myDocument updateChangeCount:
    ([myUndoManager isUndoing] ? NSChangeUndone : NSChangeDone)];

  • In iPhoto why does a slide show  from an album run in reverse?

    Under OSX 10.9 in iPhoto why does a slideshow from an album run in reverse?

    Two tests: 
    A:
    As a test launch iPhoto with the Option key held down and create a new, test library.  Import some photos and test to see if the same problem persists. Does it?
    B:
    Log into another user account and try a slideshow from there.  Does the problem persist there?
    OT

  • Why does subVI open when a VI is run without highlighting execution

    When running the VI Proc Recipe Array without highlighting execution the subVI VPTS Proc Cmnd gets a green arrow over its icon and opens. I want to run the main VI without opening any of the subs. Why does that subVI open? All sub are in the attached LIB file and the test file needed is also attached. You should place the input file in the C:\VPTS\Recipe folder.
    Attachments:
    Vacuum_Pump_subVI.llb ‏949 KB
    test_rcp_011402.txt ‏3 KB

    This is because the SubVI VPTS Proc Cmnd has an option "Suspend when called".
    To cancel this
    1.open the subVI,
    2.click with the right mouse button on the subVI icon in the up-right corner of the window,
    3.select "VI properties...",
    4.choose category - Execution
    5.and uncheck the option "Suspend when called".
    Good luck.
    Oleg Chutko

Maybe you are looking for

  • ITunes making duplicates in second user account

    I hope I can describe my issue properly. First of all let me start off by telling everybody that I am a new Mac user making the switch from PC so please be patient with this Mac noob. That being said, I proceeded to setup my new Mac with all the soft

  • A few question from a contemplating "user/buyer"

    I am very interested in purchasing the AEBS w/ modem and an airport card for my G4 PowerBook. I did have some questions as I contemplate this purchase, and I apologize if this has been covered somewhere else: 1. I'm still only using a dial-up connect

  • Adobe Premiere Elements. Crash at transcode

    Dear Adobe Community, i got every time on ~66% a crash on transcoding. I will export (AVCHD/Bluray) my movie on a Disc/Computer but there is always the same problem with a movie longer than 1h. If i cut this movie to half. It works without a problem.

  • Any ideas for when the ipod touch will come out? Thanks!:)

    Any ideas for when the ipod touch will come out? Thanks!:)

  • How to reset users and groups in Server.app?

    Recently after change settings in the Server.app (like turn off/on open directory, delete/add certificates), I got a strange problem: In the users and groups list, it display all local users and groups (looks like system users and groups, about 100 u