Prevent a rs232 crash when "operation completed succesfully"

Dear all,
A certain test set-up should run for long times (months) and makes good use of RS232 comunication (over USB). Data rates are not high, but frequent, to four different devices.
Very occasionally the application crashes (in debug mode, running from CVI, not as stand-alone application).
It crashes in the ComWrtByte function, with error code -1, and CVI reports:
NON-FATAL RUN-TIME ERROR: "c:\FlexHeadControl\Relay_RLY08.c", line 105, col 9, thread id 0x00000ABC, function id 1: Library function error (return value == -1 [0xffffffff]). The operation completed successfully.
Well, if it completed succesfully anyway, why doesn't it continue to run?
I wonder if there is a way to handle this very occasional error, such that the application can continue (after some apropriate error handling) without manual interruption.
The program crashed on the first of the following two lines (which have been executed before hunderds of times):
ComWrtByte(device[iB], byte);
ComWrtByte(device[iB],13);
How does error handling work? Will it prevent crashes if I follow the error handling suggestions by CVI-help:
int ret = 0;
ComWrtByte(device[iB], byte);
ret = GetRS232Err();
if (ret<0)
   //error handling (for example resending, or reconnecting)
Will running in normal mode (as a .exe) instead of debug mode, outside of CVI SDK work?
I ask this since the error occurs very infrequent but may still ruin an experiment of months...
Many thanks for any explanations, tips and programming examples!
Karel

First of all, a return value of -1 means "Unknown system error". The operation completed with errors, so it's good to have a warning. A negative value always indicates an error, as you can see in the help.
Dealing with the popup error message is wuite simple: go to Run >> Break On menu item and deselect "Library errors" item. With this, the popup message won't show any more, but you will need to add the proper error handling based on the return code from the function like you have already shown in your post.
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?

Similar Messages

  • Is there a way to prevent Adobe from crashing when ocring multiple documents?

    I'm using Adobe Acrobat 9 Standard.  I am trying to OCR multiple documents, Adobe crashes when it hits a document that cannot be OCR'd. How can I prevent Adobe from crashing and to skip that document and continue the OCR'ing process with the next document in the list?

    Moving this discussion to the Enterprise Deployment for Creative Cloud, Creative Suite forum.

  • Crashes when operating via Go-Global

    Hello,
    our customer works with Go-Global which is not supported by SAP. Now he has crashes with business One and gets dump files but these files are unreadable. Does somebody has the possibility to read such files so the customer can maybe solve his issue?
    When the customer opens Business One on the server no crashes happens. Can somebody help me?
    Thanks,
    Stefan

    Hi mike_coreit,
    To rule out any software issue on your BlackBerry® Pearl™ 8120 smartphone that may be causing this, please try to back up your data using the BlackBerry® Desktop Software and perform a clean reload of your BlackBerry® Device Software. For further steps, please see the following KB articles.
    For Windows®: "How to perform a clean reload of the BlackBerry Device Software for Windows" http://bbry.lv/GI9beY
    For Mac: "Perform a clean reload of BlackBerry smartphone application software using BlackBerry Desktop Software on a Mac computer" http://bbry.lv/J0UN1U
    Please test to make sure the issue has been resolved before restoring any data from your backup file.
    Hope this helps.
    -FS
    Come follow your BlackBerry Technical Team on Twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.
    Click Solution? for posts that have solved your issue(s)!

  • MacBook Pro crashes when not plugged in.  Battery holds a charge, so I don't think that is the problem. Thoughts?

    2009 MacBook Pro on Snow Leopard crashes when operating on battery only.  Works fine when plugged in.  The battery holds a charge as indicated by the battery monitor in the menu bar and the green lights on the side.
    Is this a hardware issue/battery issue/software issue??
    Thanks!

    Hi s,
    Sounds like battery. Go to Apple menu > About This Mac > More Info > Hardware > Power and see what it says for batt condition and also cycles.

  • Does anyone know how to display (in LabVIEW) the memory use during execution of an image and data acquisition VI to predict when it is time to cease the acquisition to prevent the program crashing?

    Does anyone know how to display (in LabVIEW) the memory use during execution of an image and data acquisition VI to predict when it is time to cease the acquisition to prevent the program crashing?
    I am acquiring images and data to a buffer on the edge of the while loop, and am finding that the crashing of the program is unpredictable, but almost always due to a memory saturation when the buffers gets too big.
    I have attached the VI.
    Thanks for the help
    Attachments:
    new_control_and_acquisition_program.vi ‏946 KB

    Take a look at this document that discusses how to monitor IMAQ memory usage:
    http://digital.ni.com/public.nsf/websearch/8C6E405861C60DE786256DB400755957
    Hope this helps -
    Julie

  • 10.2 crashes when I try to convert old libraries for use in the new software. Is there a workaround for this? Or will i have to continue using the previous version to complete older projects?

    Final Cut Pro X 10.2 crashes when I try to convert old libraries for use in the new software. Is there a workaround for this? Or will I have to continue using the previous version to complete older projects? the only foreseeable solution is to begin any new projects on 10.2 or importing footage on 10.2 and starting form scratch--which is something i definitely don't want to do or have time to do. ANY advice, thoughts, or opinions would be greatly appreciated! Thank you!
    Running 10.10.3 // MacBook Pro (Retina, 15-inch, Early 2013) // 2.4 GHz Intel Core i7 // 8 GB 1600 MHz DDR3

    Exactly the same problem with me.
    Some other threads advice to remove fonts, clean the caches, remove add ins but nothing works consistenty, for some it looks like it works, for me it failed.
    What I did not try yet, was to move the Render files out of the malicious library to trash.

  • Does anyone know how to display (in LabVIEW) the memory use during execution of an image and data acquisitio​n VI to predict when it is time to cease the acquisitio​n to prevent the program crashing?

    Does anyone know how to display (in LabVIEW) the memory use during execution of an image and data acquisition VI to predict when it is time to cease the acquisition to prevent the program crashing?
    I am acquiring images and data to a buffer on the edge of the while loop, and am finding that the crashing of the program is unpredictable, but almost always due to a memory saturation when the buffers gets too big.
    I have attached the VI.
    Thanks for the help
    Attachments:
    new_control_and_acquisition_program.vi ‏946 KB

    got these vi's off ni site a while ago - see if they help
    Attachments:
    Memory_Monitor.zip ‏132 KB

  • Opera mini crashes when scrolling

    ANYONE ELSE HAVE AN ISSUE WITH OPERA MINI CRASHING WHEN SCROLLING? ANY FIX SUGGESTIONS? SEESM TO EFFECT THE 5800 TO.
    CesarCesar
    LOVE my 5700 ExpressMusic, HATED my N97, Salivating for a N900
    Like my post? Kudo me Please!

    The only Opera Mini crash that I've seen was one that reported an "Out of Memory" error just before it exited. 
    I had left the Web Browser open (used it to find and load Opera Mini) and had forgotten to close it.
    Since then I've had no problems with it, but then I mainly use it for RSS feeds as it is friendlier than the Web Browser's RSS feed reader.

  • Illustrator crashes when I use the move tool. No help here in the forums. Ridiculous problem that is so basic and that completly ruins workflow.

    Illustrator (CS6, Creative Cloud) crashes when I use the move tool. No help here in the forums that I can see.
    As far as I'm concerned this is a ridiculous problem that is so basic - it should not happen for the price Adobe charges.
    Completely ruins workflow.
    Please help.

    Emily,
    Just to make sure, are all the faces of the Verdana and Tahoma fonts installed and enabled/activated through the OS (not font mangement) as TTF (not OTF)?

  • Fireefox3.6.3 crashes when opened. did complete un/reinstall and still crashes. starts in safe mode. reinstalled few addons. flagfox will not install.

    firefox3.6.3 crashes when started. before the .3 update it didn't crash. un/reinstalled completely - only essential addons - still crashes. flagfox doesn't install.numberous crash reports sent. using XP3. i have multiple browers. what's up? also firefox now uses alot of cpu time. thanks
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; GTB6.5; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MSN Optimized;US; AskTB5.3)

    Hello A. Turner.
    You may be having a problem with some Firefox add-on that is hindering your Firefox's normal behavior. Have you tried disabling all add-ons (just to check), to see if Firefox goes back to normal?
    Whenever you have a problem with Firefox, whatever it is, you should make sure it's not coming from one of your installed add-ons, be it an extension, a theme or a plugin. To do that easily and cleanly, run Firefox in [http://support.mozilla.com/en-US/kb/Safe+Mode safe mode] and select ''Disable all add-ons''. If the problem disappears, you know it's from an add-on. Disable them all in normal mode, and enable them one at a time until you find the source of the problem. See [http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes this article] for information about troubleshooting extensions and theme. You can troubleshoot plugins the same way.
    If you want support for one of your add-ons, you'll need to contact its author.

  • My ipad mini keeps on crashing when i play games (eversince i updated it)...can anybody tell me what i need to do to prevent this?

    My ipad mini keeps on crashing when i play games (eversince i updated it)...can anybody tell me what i need to do to prevent this?

    _Jet wrote:
    My ipad mini keeps on crashing when i play games (eversince i updated it)...can anybody tell me what i need to do to prevent this?
    Try this First...
    Close All Open Apps...  Sign Out of your Account,,,, Perform a Reset... Try again...
    Reset  ( No Data will be Lost )
    Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
    http://support.apple.com/kb/ht1430
    If no joy...
    Connect to iTunes on the computer you usually Sync with and “ Restore “...
    http://support.apple.com/kb/HT1414
    Note:
    Also consider Deleting any Apps you have Purchased / Downloaded but you now never use..

  • Opera crashed when using gmail after upgraded

    After upgraded 3 days ago,I got the problem of opera crashed when I am using www.gmail.com.
    Don't know what's wrong.Does anyone have the same problem?

    I am  one of the men who moved form firefox to opera,because opera launch faster than firefox,so I will wait another version that fix the crash problem.
    Someone said the opera8.52 is faster than opera9,is that true?
    I don't like the bt in the opera,I have my bt client better than him.

  • IE 10 Crashes When Printing using Oracle/Micros Opera PMS 5.0

    When printing using IE 10 and the Oracle/Micros Opera PMS 5.0 IE 10 crashes. The event viewer description is as follows:
    Log Name:      Application
    Source:        Application Error
    Date:          3/26/2015 8:06:46 AM
    Event ID:      1000
    Task Category: (100)
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      HxLKPNYDTxxx010
    Description:
    Faulting application name: IEXPLORE.EXE, version: 10.0.9200.17267, time stamp: 0x54e7f156
    Faulting module name: ntdll.dll, version: 6.1.7601.17514, time stamp: 0x4ce7ba58
    Exception code: 0xc0000374
    Fault offset: 0x000ce653
    Faulting process id: 0xd9c
    Faulting application start time: 0x01d0678301c31079
    Faulting application path: C:\Program Files (x86)\Internet Explorer\IEXPLORE.EXE
    Faulting module path: C:\Windows\SysWOW64\ntdll.dll
    Report Id: 92b5b0a1-d3b0-11e4-b5e3-c4346b66e134
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Application Error" />
        <EventID Qualifiers="0">1000</EventID>
        <Level>2</Level>
        <Task>100</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2015-03-26T12:06:46.000000000Z" />
        <EventRecordID>607</EventRecordID>
        <Channel>Application</Channel>
        <Computer>HxLKPNYDTxxx010</Computer>
        <Security />
      </System>
      <EventData>
        <Data>IEXPLORE.EXE</Data>
        <Data>10.0.9200.17267</Data>
        <Data>54e7f156</Data>
        <Data>ntdll.dll</Data>
        <Data>6.1.7601.17514</Data>
        <Data>4ce7ba58</Data>
        <Data>c0000374</Data>
        <Data>000ce653</Data>
        <Data>d9c</Data>
        <Data>01d0678301c31079</Data>
        <Data>C:\Program Files (x86)\Internet Explorer\IEXPLORE.EXE</Data>
        <Data>C:\Windows\SysWOW64\ntdll.dll</Data>
        <Data>92b5b0a1-d3b0-11e4-b5e3-c4346b66e134</Data>
      </EventData>
    </Event>
    Can anyone help with this issue?

    Hi lan9710,
    What is the present windows version you are using ?
    "the Oracle/Micros Opera PMS 5.0 IE 10 crashes"
    Is the Oracle/Micros Opera PMS 5.0 a system developed by Oracle or a web application ?
    Do you mean the Internet Explorer 10 is installed in the Oracle/Micros Opera PMS 5.0 and the Internet Explorer will crash when we try to print or it is a web application and the Internet Explorer 10 will crash when we try to print from this application
    ? Can we print from the Internet Explorer 10 before ?Can we print from other websites ?
    We can try the following steps to have a troubleshoot :
    1.Clear the temporarily files cache to have a check .
    Tools\Safety\Delete Browsing History
    2.To verify whether it is caused by add-ons ,we can open the Internet Explorer 1o without add-ons to have a check .
    To open the Internet Explorer 10 without add-ons :run “iexplore.exe -extoff”.
    If it is caused by the add-ons ,we can enable the add-ons one by one to navigate the culprit.
    3.If the issue persists ,reset the Internet Explorer 10 to have a check .(Tools \Internet Options\Advanced \Reset)
    Considering this issue may be related to the Oracle/Micros Opera PMS 5.0 and we are not familiar with it ,there may be compatibility issue here.It is recommended to look for help from the Oracle Forum  .
    Best regards

  • Why does Firefox keep crashing when I use it on my Dell Precision computer w/XP operating system?

    Well, this is embarrassing.
    Firefox is having trouble recovering your windows and tabs. This is usually caused by a recently opened web page.
    You can try:
    Removing one or more tabs that you think may be causing the problem
    Starting an entirely new browsing session

    If Firefox crashes frequently but stops crashing when you are in Safe Mode that is a pretty sure sign that there is something wrong with your individual setup of Firefox on your Windows 7 machine.
    (The 99 others claiming to have the same problem this week probably have their own distinct and separate problems - if you are one of those 99 it may make sense to start your own questions about your problems, if you do not see suitable answers).
    Many malware problems would continue even in Firefox's [[safe mode]], so the good news is that malware may not be your problem.
    Note that safe mode does not disable plugins, you may wish to consider testing with your plugins disabled, just in case they are interacting with something. To temporarily disable plugins use
    * '''Firefox button -> Add-ons -> |Plugins|'''
    You do not list the Firefox extensions that are in use, maybe one of them is a problem. I suggest you try Firefox with half of them disabled, if that solves the problem, the troublesome add-on may be in the other half, disable them all and then try with half of the other half enabled. (If you have more than a handful of add-ons it is faster testing like that than enabling or disabling one at a time)
    One very important question is how do you know Firefox is crashing ? <br/>will you please explain exactly what happens, and what if any error messages you are seeing. (If firefox freezes/hangs that may be different from Firefox or the OS crashing, and require different solutions).
    On a general note the following articles may help with troubleshooting:
    * [[basic troubleshooting]]
    * [[troubleshooting extensions and themes]]
    * [[http://kb.mozillazine.org/Standard_diagnostic_%28Firefox%29]]
    and if the problem is a true crash
    * see [[firefox crashes]]

  • Acrobat X Pro crashes when I try to scan

    I recently upgraded my computer to Windows 7 (32-bit).  I used to have Acrobat Pro 6 when I was running WinXP, but I knew that wouldn't be compatable with Win7, so I went out and got Acrobat X Pro.
    My scanner is part of my multifunction device: Samsung SCX-4720F
    Acrobat X Pro installed fine, as did my scanner driver.  When I attempt to Create a PDF from my scanner, Acrobat X crashes every time.
    I've searched the web for the problem, and have seen posts by lots of other people who have the same or similar problem with Acrobe Pro 9 using Samsung scanners, but I found no solution.  Haven't seen any posts about it for Acrobat X Pro yet, but I know it hasn't been out all that long.
    My scanner works fine. I have used it with Omnipage Pro 17 with no problems.
    Anyone have any ideas?

    Hi
              The crash seems to be happening because of DEP (Data execution prevention) on Win 7. The issue happens when Acrobat tries to communicate with scanner drivers which are not DEP compliant. It seems Samsung driver is not DEP compliant. To verify the same you can turn OFF DEP on Win 7, although it is not recommended.
    To turn off DEP follow the steps mentioned below:
    -          In the Start Menu, navigate to All Programs, thenAccessories.
    -          In the Accessories menu, right click on “Command Prompt” and select “Run as administrator.“
    -          You may need to provide Administrator credentials at this point.
    -          In the Command Prompt window, type “bcdedit.exe /set {current} nx AlwaysOff” and press Enter.
    -          You should see “The operation completed successfully.“
    -          Close the Command Prompt.
    -          You must then reboot your computer.
    Turning DEP is not recommended, so please raise this issue with Samsung also. Let us know if these steps help.
    -Ravish

Maybe you are looking for

  • QUERY_PARAMETER

    How to use QUERY_PARAMETER in oracle forms 10g?

  • CKeditor and cfm

    This is probaly a begineers question so apologies if it is a bit basic. It could also be a MySql fix rather than Colfusion! I have a textarea field on a web form using the popular text editor ckeditor. The form is posted to a Coldfusion page and the

  • Get out of group message

    Hi guys, I have this big problem with group message. So the story is like A send a group message to B, C, and D. If B reply to A, both C and D can receive the message. If I was C, and I don't wanna B and D know what I get back to A, How can I do it?

  • Unlocking a locked iPhone without iTunes or computer access

    Hi all, Sorry in advance for the umpteenth "locked out of my iPhone" question, but it's for my sister... I understand from reading around that if I don't have access to a computer to restore my locked-out iPhone, I need to force the phone into recove

  • Troubles with Java Comm API

    I am trying to use the Java Comm API with Windows 2000 and I can enumerate the ports (I am almost sure that the problem is the dll). Do anybody knows a solution?