LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV silent crash with threading and oop on LV2009 f2

Solved!
Go to solution

Ben and AQ,

 

With the changes suggested by AQ and some more features in my ExecutionBase class the crashes are still reproducible.

 

I attach the code for the project with the updated ExecBase class.

 

/Roger

 

0 Kudos
Message 31 of 38
(1,644 Views)

I'm playing with it more. After the workaround I gave you earlier, I'm pretty sure I ran the code without crashing... but I am seeing the crash with the new version you've posted. Did you change anything else between the first version you posted and this later version other than the AlwaysCopy node on the Create VI? 

 

1) It is reasonable to believe that the same bug affects the bottom input of the BundleByName node as well. You're sticking an object inside itself. LV2009 isn't duplicating the object properly. I did this but I'm still seeing the crash. If you've got other instances of this on your other VIs, you'll need to add the AlwaysCopy primitive as a workaround. I searched all your diagrams but didn't see any similar situations, so there may be something else at play here. In related news, I'm not going to be able to get a fix for "doesn't copy" bug into the LV2009 SP1. We're too close to having the service pack finished for me to make further fixes there. The fix will have to wait for LV 2010.

 

2) Tangent topic: You do not need the To More Generic nodes on your Create diagram. I mention this only because their presence made the diagram hard to read. One of them I can understand if you're passionate about hiding coercion dots, although when upcasting, coercion dots are no-ops -- pure visual feedback to the user with no runtime impact whatsoever. But the other one, the one that is casting the General.lvclass object into LabVIEW Object so you can connect it to the Obtain Queue primitives, is completely unnecessary. Just wire the LabVIEW Object constant directly. All you're setting on that terminal is the type of the queue -- the data on the wire is entirely ignored.

Message 32 of 38
(1,617 Views)

AQ,

 

My speculation is that it has something to do with recursion?

 

If you keep a close eye on the processor load you will see it increase to 100%, even if you set loop rates to more moderate figures than what I have in my example.

 

My guess is that some LV runtime method will recurse to infinity as I am sticking references of objects inside themselves?

 

Have a merry christmas!

 

/Roger

 

Message Edited by RogerI on 12-18-2009 04:19 PM
0 Kudos
Message 33 of 38
(1,611 Views)
I'm not seeing infinite recursion. I'm seeing a crash on destruction of data where an object has a pointer to itself. I can't pinpoint where the cycle is being created. Is there somewhere else in your code that you know of where the "place item inside itself" is being done other than that Create function?
0 Kudos
Message 34 of 38
(1,567 Views)
I'm still working on this, but today is the last day before I leave on vacation... won't be back until Jan 4. I'm going to try to find a workaround before the end of today. No promises, but I just wanted you to know this didn't get lost in the shuffle.
Message 35 of 38
(1,548 Views)

Alright. I figured out a chunk of what's going on.

Bad news: I cannot come up with a  workaround for your particular VIs. I know the general problem -- it's that inplaceness bug I told you about before. I found that one by luck, and I have a sense that there's a second one somewhere on one of your VIs but I cannot find it. 

Good news: The bug should be fixed in the 2009 SP1. I verified this today. That bug fix release will be available sometime in Q1 2010 (that's the most specific date I know). When I run your VIs there, there is no crash.

 

It's not what I'm sure you were hoping to hear, but it's the best I can supply at this point. 

 

0 Kudos
Message 36 of 38
(1,537 Views)

Great news then! Thanks AQ!

 

/Roger

 

0 Kudos
Message 37 of 38
(1,400 Views)

I have re-run my program on the "f3" update, with the same result (crashes). AQ, did you intend the fix to be in LV2010 or in LV2009 SP1?

 

I've also cleaned up and clarified on how I intend to use the framework

 

The new code is attached.

 

BR,

 

/Roger

 

0 Kudos
Message 38 of 38
(1,339 Views)