Application crashes with parallel loops

I developed an application that controls a digital fluorometer using a C++ DLL (provided by the seller) via a USB connection. I created specifically as QMH architecture because long scans on the fluorometer may take a few seconds and I want the user to be able to control the façade while the equipment is running in parallel. For some reason any, when the loop of material control is bound to its analysis, the façade hangs. If I click anywhere in the window, I get the «...» "" Message do not answer ' in the toolbar until the scan is finished. " While this happens, memory and processor remain substantially the same so I do not think he is tied up system resources. In addition, Windows normally responds.

I think the DLL is called to a level that affects all vi and when the call of the DLL will be made, each process LabVIEW gets put on hold. I'm leaving basic with this assumption? If this is not the case, how could one breach of this situation?

Yes - your problem is with the loop of wire/root LabVIEW UI. There is a very good article about it here.

Your call library function node is set to 'Run' in the UI thread which means that it will be executed in the same thread as stock user interface or anything else that requires that the user interface thread. In other words, no other action of the user interface can occur when your C++ DLL function runs - it blocks the thread to continue.

You need to know if the DLL is thread-safe, and if this is the case, change the method of appeal of the C++ DLL in the call library function node to 'run in any thread '.

You can make a difference in the color of the COLD LAKE:

Tags: NI Software

Similar Questions

  • All 32-bit applications crash with error 0xc000005 after windows Server 2008 R2 backup

    Hello world...

    I am in a big mess... and really need help!

    I did last night a Backup windows... but one of my users were connected to the server works with applications...

    and this morning No 32 no bits applications... same installer...
    the 64-bit application works very well...

    Others or generating an error 0xc000005 and stop...
    failing Ole32.dll module...

    And I'm sure that the backup is reliable, even if the backup of windows said it was successful...

    I tried to restore only the apps files... but it seems more complicated than that...

    If anyone has an idea...

    Hi, Emeric,.

    Thanks for posting the question on Microsoft Community.

    According to the description, it seems that 32-bit applications crash with an 0xc000005 error code in Windows Server 2008.

    As the question more appropriate forums Technet, write the topic in this forum for better support.

    http://social.technet.Microsoft.com/forums/en-us/WindowsBackup/threads

    Using the windows-related issues feel free to post on Microsoft Community.

  • Several applications crashing with Faulting Module "StackHash_"... »

    Hi, I'm new and this is my first post.
     
    I'm in this nightmare for several months, any help would be more then appreciated.
     
    Keep a huge list of demands on crash again and again, among them are: Windows Media Player - VLC - COM Surrogate - Photo Gallery Windows Live - VirtualBox - Microsoft Silverlight - Windows Explorer - XPS Viewer - Windows Live Mail - doPDF8 - PerformanceTest - HP SimplePass - TeamViewer - Windows support center - and many others.

    When you look in windows "Action center" in the "reliability monitor", most of them were listed in the field 'Fault Module name' something 'StackHash_' followed with four numbers or numbers. for example, "StackHash_7001" or "StackHash_4ac5". A few other applications overwritten is the module failed 'ntdll.dll '.

    IV ' e searched all around solutions to this unfortunate problem, the solution only so-called for it I found some answers so that he could have to do with DEP and they advised to turn off DEP for these applications crashing, but this isn't a solution at all because my system is 64-bit and so are most of the applications , and "you can not set DEP attributes on 64-bit executables."

    IV ' e had already restored my laptop to a factory State. but the same thing again later.

    PLEASE CAN SOMEONE HELP ME?

    I use Windows 7 Home premium edition, on my HP Pavilion dv6-6c13cl.

    UPDATE:

    Already found the cause of the problem, it's an update of windows as an option for the "Advanced Micro Devices, Inc. - Display, other hardware - AMD Radeon (TM) HD 6520 G. Uninstalled, and so far, everything is OK.

  • Application crashes with "Store store = Session.waitForDefaultSession () .getStore ();

    Hello

    I am trying to delete the emails of my device but my application crashes when I try to fulfill the purpose of the Bank to "Store store = Session.waitForDefaultSession () .getStore (); This line.

    He works on a simulator and removes all mails, but on the device, it crashes...

    Why this is happening?

    Any idea?

    Please let me know...

    Thank you...

    Check this thread
    http://supportforums.BlackBerry.com/T5/Java-development/check-if-quot-device-can-send-email-quot-EMA...

  • LabVIEW 8.6.1 AMD Multi Core Crash with call loops

    Hi all

    I tried, but I couldn't find all the messages with my exact situation.  Here it goes:

    I have a multi-core AMD Phenom 64 processor and I'm running Windows 7 64 and I am running an application in LabVIEW 8.6.1 in compatibility mode.  (I know, not a good idea)  I have a pretty complex application with several timed loops and the different ways to talk to FieldPoint (FieldPoint 6.0.6 and experimentation with Modbus talk to cFP-180 x).  You may be wondering why I'm using call loops.  It is an application of RT which can also run on Windows using structures conditional disable, etc.

    I had met sporadic crashing earlier in my files executable for more than a year and used a lvalarms.dll in only patched version my executables.  It was on a totally different processor and we were running Vista at that time.  Now, I notice a very similar behavior on 8.6.1, except now the development environment all crashes or breaks down my executable compiled as well.

    I found this KB, but he was referring to problems observed on LabVIEW 8.5, and the utility of the OS is only for Windows XP.  As recommended in the KB, I used BCDEdit to set the flag onecpu and now everything seems to work normally.  My PC is now significantly slower, however, and I wonder if there is another workaround solution that I might be able to try.

    If you have read so far and who have followed my description you already have my gratitude.  If anyone else has experienced this?  Someone at - it ideas?

    Thank you very much

    Jim

    Alright.  In case someone else runs into this apparently dark scenario, here's workaround solutions I've found:

    1. see if the problem goes away by setting the processor affinity using the Task Manager. Open the Task Manager, look under the "Processes" tab and right-click on the process. (for example LabVIEW.exe or your executable)  Under the context menu which select "set affinity...". "and select only the CPU 0.  In my case, I have a quad-core processor, so I up to four logical processors that are displayed in the dialog box that results.

    Run your application code or the executable file for a while, and if everything seems to be stable, it would seem that you have isolated the problem successfully.

    2. one of the solutions is to disable additional logical processors for the entire operating system, although there may be negative implications on performance.  In this case, try the steps in the lower part of this KB.  I have Windows 7, so I used the utility of command-line bcdedit with no problems.

    3. Finally, a really interesting option that is well worked for me should automatically set the affinity of the processor for each individual process.  There is at least a utility available to achieve this.  I've now changed my LabVIEW 8.6 shortcut to call RunFirst, which sets the processor affinity for LabVIEW to automatically use the first logical processor.  This way I can still use my processor image for all it's worth except in applications that have problems with it.

    I hope this helps someone else out there one day.

    Jim

  • Application crashes with the Exception when using javax.microedition.media.Player

    Hello

    I have an application that processes data from bluetooth and send it to the web service. Recently, there was a request to add sounds to the request. Now when the application processes lots of data and the player plays constantly after a few seconds I get exception "Application is not responding. And then the treatment is finished. In the newspapers, I see many connected after this exception ForcedStackTrace exception.

    The sounds are played in the separate thread. If the app is not play sounds or short sounds - everything works fine. Is it possible to avoid what happens an exception? Why this is happening?

    Thanks in advance,

    Viktor.

    Solved by implementing my own PlayerManager, which running in a separate thread would point the way to the queue rather then the number of threads by using the internal player application.

  • Call any thread DLLs the application crashes

    I have a built in 2015-labview application that acquires spectra of 6 spectrometers via an external dll. The dll triggers an event in labview when data is ready to be pulled from the spectrometers. Since this event, I am running a reentry no void / vi which contains a node function to retrieve the data, that are configured to run in any thread, as it gives a drastic improvement of performance as apposed to run in the UI thread.

    However this can slow down the application crash with a message from windows like the following journal:

    Name of the failing application: axiom 2.0.exe, version: 1.0.0.82, time stamp: 0x5581a6b7
    The failed module name: lvrt.dll, version: 15.0.0.4024, time stamp: 0x5581ac03
    Exception code: 0xc0000005
    Offset: 0x0000000000bec7c0
    ID of the process failed: 0x15c0
    Start time of application vulnerabilities: 0x01d11e6face9febd
    The failing application path: C:\Axiom 2.0\builds\Axiom 2.0\Axiom 2.0.exe
    Path of the failing module: C:\Program NIUninstaller Instruments\Shared\LabVIEW Run-Time\2015\lvrt.dll
    Report ID: 7d4ef3a8-8a91-11e5-94e9-90b11c894ef8

    I don't know if the dll is said to be thread safe or not. Also I do not understand how this causes a problem anyway since it is the only node that accesses the dll at the time, and each of the 6 spectrometers are interviewed in order?

    Is there anyway that I can still enjoy the benefits that the call of any thread dll provides without causing my application crash.

    An example of the increase in performance, it's that I can query the spectrometer from 6 to 70-80 Hz when configured to run in any thread, as opposed to a simple 10 Hz when the Run value in the UI thread.

    Thank you

    Jimmy01 wrote:

    I don't know if the dll is said to be thread safe or not. Also I do not understand how this causes a problem anyway since it is the only node that accesses the dll at the time, and each of the 6 spectrometers are interviewed in order?

    Is there anyway that I can still enjoy the benefits that the call of any thread dll provides without causing my application crash.

    Looks like that the DLL is not thread-safe. If you do not run in the UI thread, there is no guarantee that the DLL will be always called from the same thread, even if you only call it in one no reentrante Subvi. By default, LabVIEW allocates multiple threads by the enforcement system, with the exception of the user interface. If the DLL stores certain information of one call to the other, this context can be lost when run in a different thread.

    Here's a thread that provides two possible solutions; a wrapper DLL is required, use the other the utility 'threadconfig' (or the corresponding INI file settings) to force a subsystem of a thread executing unique http://forums.ni.com/t5/LabVIEW/Force-DLLs-to-tun-in-the-same-thread-expect-the-UI-Thread/td-p/11438...

    Another option would be to put the call to the DLL in a timed loop that runs constantly, and you can use a queue or the notifier to pass data to. A timed loop runs in a single dedicated thread, so I think it will work.

  • Closure of a state machine in queue event with several parallel loops

    I am trying to find the best way to stop a program that consists of an architecture of State machine in line waiting for event with several parallel loops. Can anyone recommend the best way to achieve this in my attached VI? (To browse the forum, this seems to be a frequently asked question, but I have not found a solution that works for me.)

    I look forward to any comments on my as well code, if someone is willing to offer it.

    My program needs:

    If the user press the 'Stop' button, the program should prompt the user with "are you sure you want to stop the program?" and then return to a State of rest or move forward to stop the program. In addition if there is an error, the program should prompt the user to ' clear the error and continue, or stop the program. Then back to the idle state or move forward to stop the program.

    Architectural details:

    The program consists of 3 parallel loops: (1) a loop of event management that places different States of a queue of the State, (2) a State Machine that enters the State that is removed from the queue of the State and (3) a loop error/Shutdown, which deals with errors in the error queue management.

    During normal shutdown, where running handling loop in the case of event 'Program.Shutdown' and 'Shutdown' and the 'Idle' States are added to the queue of the State. In the state machine, the State of 'Stop' is invoked. Special "5000" error code is added to the queue of the error. In the loop of error handling and stopping, "5000" error triggered a prompt that asks the user if they want to stop the program. If the user chooses not to stop, a notifier StopNotif is sent to the State of 'Stop' and 'Program.Shutdown' event case with notification 'Go '. If the user decides to stop, the Notifier sends the notification "Stop". Loop and event management State Machine ends when they receive the notification "Stop".

    In case of error, the program behaves in the same way: If the user chooses to clear the error and continue, the program returns to the status "pending".

    HOWEVER - if the user chooses to stop the program, the program crashes. The author of the notification that is sent to stop the loop of events and State Machine management cannot be read because event Program.Shutdown and the stop State (which contain the function "Waiting to notify") are not active.

    I was able to activate the stop State by Queuing in the loop of error/Shutdown management. But I don't know how to activate the "Program.Shutdown" event by program and thus access the function "Waiting to notify" inside.

    I tried to put the function "Waiting to notify" outside the structure of the event, so the event-handling loop never ends. Placing timeouts on the "wait for declaring" and the structure of the event makes the programme of work, but I want to avoid using timeouts because I don't want to turn my event program into a program of polling stations. I would also avoid using variables or nodes property to stop loops, because that requires the creation of a control/indicator for something that the user does not need to interact with.

    Thank you!

    First of all, close the notifier outside loops with your queues.  Second, you must use a user event to send the message to the event structure loop so that it stop in the case of the stop on an error.

  • Error with parallel while loops

    Hello

    I need to connect 6 different instruments gpib. I am using parallel loops, but the problem is when I try to open 2 or 3 Subvi simultaneously (the intstrument drivers), I just open one because of everything in a loop to run the Subvi. The program should be able to open all the Sub - VI independently.

    Can give you some ideas?

    Thank you

    A. Castillo

    Look at the detailed help for functions to notify.  Then follow the links to the examples included with LV

    Another problem that you have, whether you use your curls greedy or reporting or another technique, is to know how to stop your hand while loop.  All the subVIs must be called before the loop stops.  This is the fundamental paradigm of LV

    You will probably need to rethink your primary architecture to something that will actually do what you want.  Plan and design before your departure from the coding.  Note requirements for the program and determine which parts are dependent on othrer parts, then select a program architecture that can meet the requirements.

    Lynn

  • Means PtbyPt in a loop with parallelism

    Hello

    Can someone explain to me why this does not work as expected? (values 10.5 and 0.5)

    I got 5.5 and 5.5.

    I checked the MeanPtbyPt.vi, everything is cloned, the vi himself is set to pre-allocate clones. I also tried to "Inline", does not help. I tried C of 1 and 2, no luck. If I open ptbypt average during operation, I see that the SR holding the data table is interlaced with 10.5 values and 0.5, as if the two clones use the same space memoty, but on the entrance, I still see only ~0.5 coming. What gives? I thought parallelism will create two clones, no?

    Fomine wrote:

    Hello guys,.

    Thank you very much for your answers!

    The problem with the 2 ptbypts on the block diagram, it is that I have a table of measurements independent of N, where N is large and variable.

    Why a loop with parallelism does not clones? This significantly decreases its value then. I have to rewrite mathematical libraries AND then

    In fact, a loop with the parallelism (or without) CAN create clones.  But he must know the trick.

    Here is an example of what you "really want".

  • LabVIEW application crashes when you exit a VI with one or several clients on remote control

    Hi all

    This is the question that I met with LabVIEW 8.2 and LabVIEW 8.6. I publish one of the screws dynamically launch my application as a Web page. Then I load the application and launch this dynamic VI and connect to this VI by using a web browser from a PC intranet. Then if I try to exit from VI when the client is still connected to it, the application crashes. Please see the attached picture.
    This behavior occurs randomly. Sometimes, everything works as expected when you exit the VI - the main screen of the application appears and in the client side, there is a "remote connection Panel is closed.
    What could be the reason for this?

    Thank you
    Luxama

    Oops... The method of 'Close links' to work correctly. I apologize for the error.

    Regarding the issue of application crash, I did this close relationship, then wait a few milliseconds and then quit the VI. Today, the application seems to work very well.

    In the meantime, I had another doubt. Is there a way to link to the application instead of a VI?

    Thank you
    Luxama

  • With the help of VISA Write in parallel loops (multithreading)

    Hello

    I got the idea to set up four parallel loops on a quad core with four EHR via serial port independently. I use the PXI-8430/8 and I was told that an independent operation of ports is possible.

    What I did was simply to put in place four parallel for loops consisting only of a single entry VISA. With the help of the Tools > profile > find parallelizable loops, they gave me the following warning

    This loop For may or may not be safe to parallelize. Warning (s):
    -A node in the loop For can have side effects.

    This means, that the pilot VISA screws are not suitable for multithreading? With the help of LV2010

    Thanks for your comments!

    See you soon

    Oli

    Here's some good reading on paralleled for loops.

    Regarding the caveat, it's just that - a warning. If you write commands on a device and orders must be received in the order then you cannot parallelize the loop. If the order does not matter then go ahead. But in the case of VISA wrote that a parallelized loop going not buy you anything. They are intended for operations of calculation intnesive.

    Just stick to four loops.

  • Each time after clicking the icon of user account on windows xp to change a password is crashes with this error message: Microsoft (R) HTML Application host has encountered a problem and needs to close.

    Each time after clicking the icon of user account on windows xp to change a password is crashes with this error message: Microsoft (R) HTML Application host has encountered a problem and needs to close.

    There is a Microsoft Knowledge base article which sets up a few steps to perform in the computer in order to solve the problem you are experiencing, read the article that you find on the link I am mentioning below and see if it helps the measures mentioned:

    http://support.Microsoft.com/kb/919751

  • Single application made with Adobe DPS crashes with automatic updates on iPad.

    I've updated my unique application in the app store. When Apple released my update, the application crashes on iPad when automated update is enabled.

    After reinstall the app works again.

    Are there people with the same problem? Is - this Adobe aan or an Apple problem?

    THX

    as u say, in any case remove the application and installing again solved the problem.

  • Application crashes when connecting remotely for debugging

    Hello again all you lovers forum useful!

    I'm debugging a strange behaviour in my application that does occur on a specific computer in special circumstances.  To do this, I have enabled debugging in my application and finally was able to see it as an option in the menu "Debug Application or Shared Library" on my local computer (I had to first find out the hard way that you cannot change the name of the application and have always run in debug mode, even if you change the name of the associated also .aliases and .ini files).

    When I try to connect to my request, the "connection status" displays lists of downloading my subVIs much and then finally downloading my main VI.  At this point, my main VI façade appears on my local computer.  However, everything freezes then, while on the remote computer, my application (waiting for correctly so that the debugger start) crashes with a generic Windows "...". has encountered a problem and needs to close"message.  If I click to more information, I see that the name is lvrt.dll (my application is usually not real-time, but it uses a timed loop or two).

    I would like suggestions as to what may cause this error and how to fix it.  Unfortunately, because it's a working application I can't post my code.  I'm using LabVIEW 2010 SP1, and two computers running Windows XP.

    Thanks in advance for your time!

    -Joe

    Well, I accidentally worked around the problem, although I never found the root cause.

    My applications MS Office had put by my it Department yesterday, and now when I compile my app, it tells me that a VI integrated Excel is broken, somewhere in the NIReport.llb folder, I added to the section 'always include' my construction specification application source file properties.  I removed NIReport.llb temporarily since I do not have the part of my application which is used to make this debugging and debugging now my application works.  Weird!  I was able to successfully debug my original problem that started this whole mess, though, so I'm happy with the final result.

    Now, I just get NIReport.llb working again.  I'm guessing there are probably an updated version to match MS Office 2010, which is my new version.  I had added NIReport.llb to support using "Easy text Report.vi" for printing.  Given that my app size dropped 50% when I got him out earlier, I can get another printing option, however.  I can solicit the opinions about it, but if so I'll so, in another thread to keep this one to.

    To anyone who has been reading this thread and thinking about how to solve my problem, thank you for your time!

    Until next time,.

    -Joe

Maybe you are looking for