How to display "Non-Fatal Run-Time Error In Function Panel" dialog?

I'm learning how to develop an IVI-C specific driver using LabWindows/CVI. When I run my function from its function panel and it returns an error, I would like to display a dialog with both the error code and error message (as opposed to simply returning an error code on the function panel). This would save the user from having to call Prefix_error_message() to translate the error code to its error message. NI-DCPower driver is a good example of this behavior (see attached error dialog). How do I show the "Non-Fatal Run-Time Error In Function Panel" dialog? Any help is greatly appreciated. Thanks!
Attachments:
ErrorDialog.png ‏8 KB

Hi Shawn,
Thank you for replying to my post. The checkErr is just an error handling macro defined in ivi.h to goto Error: tag when the function returns a non-zero value. I have been using the checkErr macro (as well as viCheckErr and other macros) in my driver.
Using the same hp34401a specific driver as an example, please allow me to explain my question in more details:
Let's take the hp34401a_close function as an example. It is a simple function with only a few lines of code:
When the hp34401a_close function is run from its front panel using an invalid session handle (e.g. "8" in this screen capture):
You will get three "Non-Fatal Run-Time Error" popup dialogs, one from each of the IVI library functions that it calls: Ivi_LockSession, Ivi_UnlockSession, and Ivi_Dispose. However, there is no "Non-Fatal Run-Time Error" popup dialog from the hp34401a_close itself.
My IVI-C specific driver is behaving identical to the hp34401a specific driver.
In comparison, if run niDCPower_close function from its front panel using an invalid session handle (using the same "8" in this screen capture):
You will only get one "Non-Fatal Run-Time Error In Function Panel" from the niDCPower_close function itself:
I think the behavior of niDCPower driver is much better than the hp34401a driver. It replaces the three "Non-Fatal Run-Time Error" popup dialogs from the IVI library with a single "Non-Fatal Run-Time Error In Function Panel" popup dialog from the driver function itself. I would like to do the same thing with my driver but have not figured out how to display a "Non-Fatal Run-Time Error In Function Panel" dialog. Thanks in advance for your help!

Similar Messages

  • Newbie question NON-FATAL RUN-TIME ERROR IN TUTORIAL (PlotY)

    I'm a first time user, following the tutorial and when when I click on Acquire I get the following error "NON-FATAL RUN-TIME ERROR:   "sample1.c", line 85, col 13, thread id 0x00000D54:   Library function error (return value == -10 [0xfffffff6]). The control is not the type expected by the function"
    Code is as follows (line 85 is PlotY......:
        case EVENT_COMMIT:                                                                                                       
            srand (time(NULL));                                                                                                  
            amp = rand ()/32767.0;                                                                                               
            SinePattern (100, amp, 180.0, 2.0, sine);                                                                            
            PlotY (panelHandle, PANEL_Waveform, sine, 100, VAL_DOUBLE, VAL_THIN_LINE, VAL_EMPTY_SQUARE, VAL_SOLID, 1, VAL_RED);  
            break;    
    Its not obvious why it crashes on this line, any help would be appreciated.
    Thanks
    Jeff

    Happy to hear that you have solved your problem.
    Just to be clear, there is no problem in using lowercase letters for control ID, but since the usual CVI behaviour is to use uppercase letters I was wondering if you created the control by yourself and if it could be a wrong one.
    CVI does not really address controls by name: if you see in the include file associated to the UIR you'll see that PANEL_CONTROL is really a macro with an associated value, which is the one the program really uses (see my first post to understand how PlotY operates; the same happens for all functions that operate on control like Get/SetCtrlVal or GetSetCtrlAttribute for example).
    Neither CVI operates any cross check between the panel handle and the control you are addressing: that's why I pointed you to the panel handle value, to be sure that you are not operating on a control using the handle of a different panel, a situation that may happen if you are using more than one panel at a time.
    These are the reasons that may rise an 'incorrect control type' error.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Non-Fatal Run-time Error "%%s"

    This was shown yesterday by an non-debug program written with CVI 9.01 and run-time 9.1 (the current "428" build) on the target.
    I was trying to fix "-12: Out of memory" popups (maybe a race condition inside ProcessSystemEvents/GetUserEvent?) and now this.
    Any idea what this is?
    /* Nothing past this point should fail if the code is working as intended */

    A couple updates:
    From all indications, this dialog should only be shown if your binary (exe) is built in release mode.  If you build in debug mode, you should be able to see the error message that is trying to display.  Also, if our preliminary investigation is correct, the error should be in your release mode exe, and not any loaded dlls.
    From all indications, this dialog should only be shown if your binary (exe) is built in release mode and loads dlls that are build in debug mode.  If you build your dependencies in release mode, no dialog should be displayed at all (because this is a non-fatal error).
    Are you able to verify these statements?
    Thanks -
    NickB
    National Instruments

  • Fatal Run Time Error - unknown source position thread id

    Hi All,
    I am using LabWindows CVI 2013 in order to display data from my controller.
    I have defined some functions to activate the communication with the controller and read data from it.
    The communication activation with the controller is being done inside the Main block before loading the UI panels.
    I created a command button that activates the data reading function (Get Register) from the controller.
    When calling the reading function I received a Fatal Run Time Error. Attached please find.
    When I moved the reading function to the main block before loading the UI, the program didn't crush.
    What is the cause for that?
    Thanks for your support.
    Haim 
    Attachments:
    CVI.png ‏168 KB

    Hi Haim,
    Could you explain what you mean by moving the function to the main block? Does that mean instead of having a callback, you added the four lines in that callback (according to the attached image) to the main function? When you do this, does the code execute correctly?
    And can you tell me what DLL package you are using that contains the Jet32Functions.GetRegister function?
    The error is very generic, so it is hard to say what is causing it without seeing the entirety of the code, but it appears that there is a conflict in the thread control. Does the error occur only when you activate the callback by clicking the command button? Which lines are executed in the callback before the error occurs?
    It would be helpful if you could attach your source file or at least a screenshot of the working code so I can see the entire main function.
    Steven

  • INI instrument driver and fatal run time errors

    Hey everyone, I'm experimenting with the INI instrument driver and running into a fatal run time error.  Here's what I know so far:
    The runtime error only happens during the very first Ini_Putxxx
    It only happens if the target INI file does not yet exist.  After the file is created with a Ini_WriteToFile, then the program will proceed with all my Put functions without any errors.
    Ideas?
    Solved!
    Go to Solution.

    Are you sure about that? I just tried calling these functions in the Interactive Execution window without errors (the destination file wasn't there before the call and has been created without errors):
    #include "inifile.h"
    static int error = 0;
    static IniText T = 0;
    T = Ini_New (0);
    Ini_PutString (T, "General", "Item 1", "Test string");
    Ini_PutInt (T, "General", "Item 2", 123);
    Ini_PutDouble (T, "General", "Item 3", Pi ());
    error = Ini_WriteToFile (T, "C:\\test.ini");
    Ini_Dispose (T);
    Ini_PutXX functions do not make any disk access, they work entirely in memory; the only functions where the instrument accesses the disk are Ini_WriteToFile and Ini_ReadFromFile. Which error are you receiving? Can you post a sample code that exhibits the error?
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Fatal run time error: unknown source position

    I am getting a fatal run-time error when using CVI 8.0.1.  I get the error when any program I write is exiting.  Here's an example source:
    #include <ansi_c.h>
    int main(void)
        char buf[512];
        printf("press enter to exit\n");
        gets(buf);
        return 0;
    after I press enter to exit, the program hangs for a few seconds and then I get the error.  This only started happening after I upgraded to CVI 8.0.1.  I have tried uninstalling / reinstalling / going back to earlier versions and I always have the problem now.

    It sounds like something went wrong with the initial install or possibly there was problems with removing previous versions. Since uninstalling and reinstalling did not fix this, I would suggest you to use a utility called MSI Blast. This will show all installations that are on your machine and allow you to remove these installations. This is a last resort program and should never be used to replace Add/Remove Programs, but since something sounds as if it is corrupt, I feel it is best to use this. Here is the link.
    ftp://ftp.ni.com/outgoing/msiblast.zip
    You will need to remove and reinstall all NI components to assure that we remove the corrupt file. It is definitely something local to your machine as I was not able to replicate the problem with your provided code. Please run this utility and let me know once you have pick this up off of the ftp, as we do not leave this utility up for long.
    Message Edited by Brandon V on 10-10-2006 02:22 PM
    Brandon Vasquez | Software Engineer | Integration Services | National Instruments

  • How do I fix this run time error crash on start up?

    Whe I start Elements 10, it stops and waits at the "Organize" or "Edit" choice. (normal operation.) I chose edit and it crashes with a C++ run time error.

    See if this Adobe troubleshooting document helps:
    http://helpx.adobe.com/x-productkb/global/troubleshoot-c-runtime-errors-products.html
    Ken

  • How can I see a run time error?

    When I run the VI in development mode the VI works just fine. But after I compile and run the VI I get an error that flashes across the screen and then disappears. Arggg! How can I stop the process to see my error?

    Steve,
    There are a few possible solutions to this.
    One, I am writing an article about right now. It involves writing a Loader. This is a simple VI that loads and runs your main program, so that it can remain as a VI. If this is a viable solution for you (your VIs remain as VIs), then it is probably a great solution, as you won't have to worry about why your VI runs differently as an executable than in development.
    The second is a lot more involved. You need to troubleshoot this error. First, you should already have in place some good error handling. If you don't, get it. Once you have it, or if you already do, you need to determine about where the error is coming from, and start putting in some troubleshooting. I always like to create a singl
    e Global Variable (this to me is the ONLY good use for a global) with all sorts of indicators to act as a runtime probe (since you can't probe a built application.) You just write values to various controls as you need them, when you need them, and this allows you to view those values. Since this is designed primarily to view data in reentrant VIs, you will have to create a viewer for your built application. Simply create a VI that loads when you run your app that displays all of the global values.
    Those are the only suggestions I can offer for now. Without knowing the nature of the error, etc, I can't give you any further advice.

  • FATAL RUN-TIME ERROR: The program has caused a 'General Protection' fault at 0x6846680A.

    Dear all,
    I have some troubles with LabWindows CVI. Sometimes (maybe 2 or 3 times by week) my application crash with General protection error in cvirte adress. This crash never happens in the same part of the code is always happens in random way. The problem is that in debug mode we don't have any information about where the problem occurs in cvirte. This bugs can happens with differents application from very simple application to very complex applications.
    Do you have some ideas that how can I solve these problems?
    Thanks

    Hello J. Romero!
    Thank you for the crash information you provided!
    Hover you managed to collaborate with NI France more in order to determine the cause of this crash?
    Unfortunately, the information you provided is still not sufficient for us to determine the exact cause and circumstance of this crash:
    The provided event logs only contain relative addresses of the locations. An absolute crash address can better suggest the exact location. Please provide a screenshot of the crash window dialog, which contains the exact absolute address of this crash.
    In your original post, you mentioned that you can reproduce the crash with a "very simple application". Is it possible for you to send us the application on our incoming FTP server, so that we can build and run the program on our side?
    Do you have a suspicion for any particular libraries, components or UI controls that you are using, which reproduce the crash. E.g. "whenever I perform this action in a Numeric Control, the crash occurs...". This will further help us to narrow down on the problem!
    If #2 is not possible, one other solution would be to send us a crash dump of the application. Please follow the steps in this Developer Community post, in order to generate and send us a crash dump: https://decibel.ni.com/content/docs/DOC-1496
    Best regards!
    - Johannes

  • How can I correct a "Run time error" on my mac mini?

    On one web site in my book marks I have suddenly got this message -"Runtime error" How can I fix it?

    Please post a screenshot that shows what you mean.
    To take a screenshot, follow the instructions linked below. Be careful not to include any private information.
    Shortcuts for taking pictures of the screen
    Start a reply to this message. Click the camera icon in the toolbar of the editing window and select the image file to upload it. You can also include text in the reply.

  • Why do I get a "Fatal Run Time Error: Out of Memory" after an hour while using RT on a PXI 8186?

    When I run this code with high speed DAQ+proccessing+control for over an hour in RT on an 8186, I get the above error. There were some arrays being built really quickly, etc. So I replaced these array initializations followed with "replace arrays subset" blocks. Still ,No luck.
    I'd really appreciate it if anyone could help me. the code can be posted here as well if reqd.
    I'm Running LV RT 7.1, and the target is a PXI-8186.
    Also, is there any way of allocating extra virtual memory in RT?

    Let me second everything that Aaron mentioned.
    Please post some code that demostrates your trouble and we will take a look.
    Gnerally I have to say that RT applications are rather demanding in the area of memory.
    I find myself avoiding data types that can vary in size, like strings. These can demand increases in buffer allocations such that the buffer previously allocated are insufficient, are tossed on the heap and another larger block is allocated. Too much of this happening can kill you in RT. Building strings is bad.
    Building arrays is just not allowed.
    LV2 globals (when properly coded) are useful in keeping memory useage static or diminishing. This dovetails with Aarons circular buffer.
    Review all code that is executed repeatedly using
    Tools >>> Advanced >>> Show Buffer Allocations
    In a nutshell, one or more of thes is killing you.
    Post your code so we can make specific suggestions.
    Trying to help,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How can I solve my 'run time error' accessing MySpace?

    For the last 4 days, everytime I try to log in to my MySpace account I get the same 'runtime error' message as follows....
    'Runtime Error
    Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
    Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
    <!-- Web.Config Configuration File -->
    <configuration>
    <system.web>
    <customErrors mode="Off"/>
    </system.web>
    </configuration>
    Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
    <!-- Web.Config Configuration File -->
    <configuration>
    <system.web>
    <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>'
    Other people who have tried to log into different MySpace accounts on my page get the same message. however, all other websites are working fine.
    Help! I am totally computer illiterate so any help would be much appretiated!
    BEX83
    MacBook   Mac OS X (10.4.6)  

    Hi tranzrock69,
    Welcome to Apple discussions:)
    I don't think it had anything to do with an MS dnld.
    Glad resetting Safari worked for you thanks for letting us know.
    I didn't recommend resetting Safari, unless it proved necessary,
    Resetting does all of the below, & some folks rather not lose one or the other
    of the items listed, for me it would be my saved names & passwords.
    "Resetting Safari clears the history, empties the cache, clears the Downloads window, and removes all cookies. It also removes any saved user names and passwords or other AutoFill data and clears Google search entries." "
    If your mac is acting oddly & are concerned about the ms dnld, you may want to post in one of the apple fdiscussions forums. OS Tiger forum for instance.
    Enjoy both, your mac & my space!
    Eme'~[)

  • Run-time error handling without popup

    I'm searching for a way to make a CVI executable more robust by performing an automatic routine if any run-time error occurs.  Basically I don't like the fact that a popup is displayed and the program is halted in the event of a fatal run-time error.  I cannot prevent a fatal run-time error from ever occurring so I was hoping there was a way to handle it automattically when CVI detects it.  So far though, the only thing that I've found is the CVI run-time error popup which suspends the program until user input or in release mode, a Windows popup that suspends the program in a similar manner with more cryptic OS level exception info.  I'm using Windows XP and CVI 2009, thanks.

    Ok, well, the source of the fatal run-time error seems to be within a function call to imaqSnap within the NI Vision library.  imaqSnap() is a function that just grabs 1 frame of video.  We're using NI Vision 8.5 with a PCI-1422 Imaq card and whenever there is no signal present at the input of the card, we get the following error:
    FATAL RUN-TIME ERROR:   "Imaq_support.c", line 187, col 18, thread id 0x000004F8:   Function : (errorCode = -1074397150 [0xbff60022]). A timeout error occurred while waiting for the specified event.  If waiting for an image, verify that all video data is acquired within the timeout period.  If waiting for a signal, verify that the signal assertion occurs within the timeout period.
    Line 187 is the line with the call to imaqSnap shown below:
                                                /* Initialize the Image Capture system */
                                                /* Open an interface and a session */
          ApplErrChk(imgInterfaceOpen ("img0", &Iid));
          ApplErrChk(imgSessionOpen (Iid, &Sid));
                                                /* set aquire mode */
        /* Snap a picture : ImaqBuffer is NULL, memory will be allocated by NI-IMAQ */
          AcqImage = NULL;
          AcqImage = imaqSnap (Sid, NULL, IMAQ_NO_RECT);
          if (AcqImage == NULL) {
            ErrNull = TRUE;
            iErrCode = imaqGetLastError();
            if (iErrCode != ERR_SUCCESS) goto tst_exit;
    It seems to me that this should not be a fatal run-time error, it should instead throw a non-fatal timeout error and allow our calling code to handle the null reference to the image.  Since it's a fatal error though, it doesn't allow me to ignore the run-time error and handle it gracefully.  The Sid and Iid references look fine when it throws the error so I'm unable to detect the problem before the function call.  Any thoughts on how to fix this issue?

  • Run time error in "'CX_SY_MESSAGE_ILLEGAL _TEXT "

    Hi all,
    the below is the detail message of my run time error occuring when creating one new enhancement implementation thru se38 for "LFDCBFI0".
    Pls help me by posting ur comments,how to resolve it.
    Run time Error.
    The Exception 'CX_SY_MESSAGE_ILLEGAL _TEXT ' was raised but it was not caught anywhere along the call hierarchy.
    Since exceptions represent error situation and this error was not adequately responded to, the running ABAP program 'CL_MESSAGE_HELPER========CP' HAS TO BE TERMINATED.
    Error Analysis.
    AN exception occured that is expalined in detail below.
    The exception which is assigned to class ''CX_SY_MESSAGE_ILLEGAL _TEXT ' was not caught in procedure "ACTION" (FORM)", nor was it propogated by raising clause.Since the caller of the procedure could not have anticipated that the exception would occur,the curent program is terminated.
    The reason for the exception is:
    the text parameter in MESSAGE cannot be an initial reference.
    Trigger location of exception
    Program:'CL_MESSAGE_HELPER========CP'
    include:''CL_MESSAGE_HELPER========CM003
    Row 3
    Method type: method
    Module name:SET_MSG_VARS_FOR_IF_T100_MSG.
    SOURCODE:
    IF TEXT IS INITIAL.
    >>>>>>>>>RAISE EXCEPTION TYPE..
    Hope it;s enought for ur reference...
    Pls post ur comments
    regards
    sankar.
    Message was edited by: Sankar
            sankar babu

    hi Amandeep,
    Sorry for the delayed reply....im on off for today and tomorrow to my office...so u pls...post me the detail...how to check all this and do the work,hope dont mind me asking u now.
    thanks & regards
    sankar.

  • Fatal Run-Time - Unknown Fault - on any CVI program close

    I have been trying to track down a few what seem like phantom Fatal Run Time Errors on my program closes.
    I am running LabWindows/CVI 2010 Full 10.0.1 (419)
    I originally posted here -> http://forums.ni.com/t5/LabWindows-CVI/EasyTab-ConvertFromCanvas-memory-leak/m-p/3084769#M69465
    As I thought this was related to tabs, where my resource tracker shows 'unclosed' resources.
    Now I am opening a different program and have found that even though I put my return 0; at the top of my main loop, I still get a fatal run time error.
    The error is exactly:
    FATAL RUN-TIMe ERROR
    Unknown source position, thread id 0x00001BB4 
    The program has caused a 'Unknown' fault at 0x748A4F11
    This occurs every time I run my program in the CVI IDE.
    There are no allocated resources in my resources window.
    Searching for either address in my map file brings no results.
    Thanks,
    Nick

    Hi ngay528,
    I have attached a link below to one of our discussion forums that walks through using the Resource Tracking feature of LabWindows/CVI. Again, sometimes this particular error is caused by leaving resources open at the end of an application, so this feature can help us identify those resources if that is the case. Please follow the steps listed in the solution of the thread (message number 4, marked in green). 
    FATAL RUN-TIME ERROR: Unknown source position, thread id 0x00000EB4: The program has caused a 'General Protection' fault at 0x00459B9D:
    http://forums.ni.com/t5/LabWindows-CVI/FATAL-RUN-TIME-ERROR-Unknown-source-position-thread-id/m-p/16...
    Thomas N.
    Applications Engineer
    National Instruments

Maybe you are looking for