From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Exe Crash Error: Exception Unknown (0xE0434352), Humidity Sensor Sensirion

Solved!
Go to solution

Hi,

 

I created a LabVIEW *.exe file and during long runs (more than 24 hours) it always crashes at some point. I uploaded the error message (error_LV_RHonly.png) and the error log file (lvlog.txt).

 

I kind of figured out that the problem came from my humidity sensors from Sensirion (SHT21 with EK-H4).

I created a program only with this sensor(s) and it crashed again (this time after only ~1 hour I think). I uploaded this simple program (MultiRH_Only.vi) and the sub-programs (in .zip folder, downloaded from Sensirion website, see VI Tree).

 

After a quick search about the error message I found that there could be some problems with a .NET assembly. But that didn't really help me (Link). Probably something with the "EKH4API.dll"?

 

Also, when I end my program the EK-H4 doesn't shut down so if I restart the program (without closing the window) I cannot access the EK-H4. To do so I have to close the window and restart the Labview *.exe file.

 

Thanks a lot in advance! Please let me know if you need additional information.

Tobias

0 Kudos
Message 1 of 9
(5,826 Views)

Hi PTobias,

Crashes can be pretty difficult to track down and locate the root cause of the issue. But the Log files you provided and the Log files that were in the other forum you linked seem pretty similiar, so it seems like a good idea to start looking into the .NET or .dll's of your program. 

 

For starters, What versions of LabVIEW are you using? Have you tried running this .exe on another computer? Do you get the same error when running this code in the development windows instead of an .exe?

0 Kudos
Message 2 of 9
(5,759 Views)

How about memory usage?  Windows has the Performance Monitor which is quite handy for logging various aspects of a process over time.  Does your code open VI references without closing them?  .NET? ActiveX? Are you using build array for a long time without bounding the size of the array somehow?

0 Kudos
Message 3 of 9
(5,755 Views)

Actually the memory of the program is increasing a lot with the time. That might cause an overload of my RAM.

 

But how can I change my program to stop this behavior? Is there a problem with the SubVIs from Sensirion? I think that the Connect.vi opens a reference to a .Net file.

 

And I think the destroy reference SubVI doesn't work because the EK-H4 never shuts down unless I close the program by closing the window.

Download All
0 Kudos
Message 4 of 9
(5,742 Views)

Hi Sekine108,

 

My Labview version is 2015 SP1.

I haven't tried to run the program on another computer yet.

How do I run the code in the development windows?

 

0 Kudos
Message 5 of 9
(5,741 Views)

Not enough information is given.  And there is a flaw with the close function.  If an error is passed in to that close VI then no close will happen.  Most close functions will still operate if an error is passed in, to help ensure memory issues like this don't happen.  I'm unsure how likely it is that the close is called with an error, but a more common issue developers have is calling the open multiple times, but only calling the close once, or never.  Again not that this is your issue, or that .Net is the issue at all, it is just something to look at.

 

NI has several tools to help track down memory issues but none of them I've found work quite as well as just disabling part of the code and seeing if the memory issue remains, or goes away.  Tools >> Profile >> has a few things for tracking memory usage.  There's also the Desktop Execution Trace Toolkit, but I've never really used it, I just know NI suggests it for finding memory issues.

0 Kudos
Message 6 of 9
(5,722 Views)

The development window I'm reffering to is just your traditional window that you create your code in, prior to making an .exe out of it. I'm only suggesting this because you might be able run in Highlight Execution mode to probe areas on your simplified code and determine when/where you are getting errors/corrupt data. 

0 Kudos
Message 7 of 9
(5,708 Views)

Hi Hooovahh,

 

I saw that problem with the error but I checked and couldn't see any error.

I am now using the Connect.vi with false input and after that I use the destroy reference function and now the EK-H4 shuts down without closing the window!

 

I think the reason why my memory usage increased that quickly with the simple program was that I didn't have a loop timer so the loop was too fast. However, my memory usage is still increasing with the time with my simple program. That does not happen with the RH_GUI program Sensirion provided (also in the zip folder I uploaded in post #1).

 

Now, in my simple program I put everything possible out of the loop (see uploaded file). Only the read measurement.vi(s) are in the loop.

My memory usage is still increasing but not sure if it's less than before. I will let my main program run over the weekend with the same modification and see if there are any changes (if it runs longer without error).

0 Kudos
Message 8 of 9
(5,696 Views)
Solution
Accepted by topic author PTobias

Hi,

 

Just a quick update. I did not really solve the problem but my program does not crash anymore.

Now that I know how to shutdown the EK-H4, I do so once every hour and restart it after 20 seconds.

I won't have RH data for 20 seconds but that is OK. That prevents the program from eating too much RAM.

 

 

0 Kudos
Message 9 of 9
(5,643 Views)