Mike Le Posted April 29, 2013 Report Share Posted April 29, 2013 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: Config Demo: Shows how Config Manager works and its basic purpose.http://youtu.be/ZCq6bh_TrfQ Config Crash: Demonstrates the crash bug. http://youtu.be/OhqLOr4RLaY 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. Quote Link to comment
todd Posted April 29, 2013 Report Share Posted April 29, 2013 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? Quote Link to comment
Mike Le Posted April 29, 2013 Author Report Share Posted April 29, 2013 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. Quote Link to comment
todd Posted April 29, 2013 Report Share Posted April 29, 2013 Yes, the Send Normal Stop. I've been working through the details of proper error and last-ack handling, so it jumped out at me. Quote Link to comment
todd Posted May 1, 2013 Report Share Posted May 1, 2013 (edited) Premature report... Edited May 1, 2013 by todd Quote Link to comment
Mike Le Posted May 1, 2013 Author Report Share Posted May 1, 2013 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: 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. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.