Jump to content

Actors stay locked in memory and LabVIEW produces catastrophic crash on repeat calls. Videos of problem included.


Recommended Posts

I've been running into a bizarre issue with some actors.

 

Below are some YouTube links that explain the basic purpose of my code and demo the problem. I've also included some text that describe the issue.

 

VIDEO:

  1. Config Demo: Shows how Config Manager works and its basic purpose.
    http://youtu.be/ZCq6bh_TrfQ
  2. Config Crash: Demonstrates the crash bug. http://youtu.be/OhqLOr4RLaY
  3. Config Code: Shows the basics of the Launch and Stop code. http://youtu.be/f0DBxiM9St0

 

TEXT DESCRIPTION:

 

I have a Controller actor which I launch from my GUI. This Controller actor launches 6 nested actors, each with its own purpose. When the Controller finishes its operations, it calls Send Normal Stop to all 6 nested actors (from within its own Stop Core).

 

I built the Controller using demo launching and shutdown code, then moved the launch/shutdown code into my real application's GUI.

 

When in the demo, everything started up and shut down with no problems.

 

When I moved it into the application GUI, I can observe every Actor's Stop Core being called as expected (via breakpoints). But if I then stop the main application, I find that the Controller code and nested Actor code is locked, as though something is still executing. I also can't close the project, because something is still running.

 

After running the main application once, I can try running it again. The application starts as normal - but calling the Controller actor again causes LabVIEW to crash completely! It's a memory Access Violation, though the exact hex code changes.

 

WHAT I'VE TRIED:

 

I wrapped the demo launch/shutdown code into subVIs and dropped them into my main application to ensure the code was as similar as possible. But the demo runs perfectly and shuts down cleanly, while the main application does not.

 

I have verified with breakpoints that the Stop Core of every Actor is reached.

 

I have verified with breakpoints that all parallel UI loops in Actor Core overrides are stopped.

 

Today I will work on checking the condition of all stopped Actors using Handle Last Ack. This will involve some changes, because right now my Controller sends out the Stop Core message to all nested Actors only RIGHT BEFORE shutting itself down.

 

Any other suggestions for things I can try in debugging? Or anyone seen anything similar and can point to what might be causing the Actors to hang?

 

Thanks.

Link to comment

I've had a few simple actors not let me close the Actor Core.vi override front panel, even after they've stopped. Nothing repeatable, like you have, though.

 

It doesn't help anything, but in the top-level Stop Core.vi override, shouldn't Send Stop be outside the error wire? Instead, perhaps, send normal or emergency stop with the code from Error In?

Link to comment

Hey Todd,

 

Thanks for replying.

 

Do you mean in my "Stop Subpanel Actors" method, where I pass the Enqueuer Array into a FOR loop with "Send Normal Stop" inside?

 

That method is always called with nothing going into "error in." You're right, though; I was lazy in simply wiring "error in" through instead of creating some more intelligent behavior.

 

If that's not what you're talking about, let me know and I'll take another look.

Link to comment

I believe I've solved this problem, but it's unsatisfying because I still don't understand the problem or really understand why the solution works.

 

I am now launching the Config Dialog from my main application using an asynchronous call to a Launch Actor wrapper:

 

XaDgHTm.png

 

Gy4uQla.png

 

I can now repeatedly call the Configuration Dialog from my main application. I can stop the main application and edit the Actor code, as well as restart the main application and launch without a crash.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.