06-27-2006 07:05 PM
Hi JLS,
I have uploaded my code there, named "Code from Kris.rar", I also attached the compiled program.
The following is some information that I sent NI Australia:
"
What this program does is to acquire some bit of
sound by using the onboard microphone of the PDA and work out the
fundamental frequency of the soundwave. So after compiling, you need to
enter a value under density (make it 600), length (make it 3.5), and then
make some noise around the microphone. (You can use a pencil, simply hit
around the mic hole or table, the program will then tell you a fundamental
frequency and MoE after a few seconds.
The crash happens when you do a few tests, especially when the frequency is
very high. You need to do a few tests until the program crashes. That's why
it's confusing me, it's not crashing all the time but sometimes.
"
Regards,
Kris
06-28-2006 06:49 PM
06-28-2006 07:38 PM
06-30-2006 07:58 PM - edited 06-30-2006 07:58 PM
Message Edited by JLS on 06-30-2006 07:58 PM
Message Edited by JLS on 06-30-2006 08:00 PM
07-02-2006 05:05 PM
Hi JLS,
That was great to hear from you, I appreciate for your help.
I downloaded the code you attached and found the error only occurs when the array constant is empty. And when I removed the indicator, the app crashed at 121667006. Then I had a look at my original code and tried to replace the sort and reverse array VIs; as the program attempts to find the max value from a 2D cluster, I simply replace them with "Array Max & Min VI", and the error seems disappeared! SO either sort or reverse array VI has bugs when they are targeted on PDA, running fine on desktop.
I will keep an eye on that do a few more tests. Thanks a million for your help again.
Best regards,
Kris Zhu
07-05-2006 12:19 PM
Hello,
Wow, that's very interesting! I also tried it without an empty array and it didn't change the outcome on the PDA here or in the emulator. Do you see this behavior with your emulator as well? I hope we can see consistent behavior with our emulators - if there are small differences in error messages on different PDAs in this case I wouldn't be totally surprised - I have yet to see error 121667006. In any event, we do seem to have correlated this with the sort and reverse array functions (although if I remove one of them the error disappears), in a variety of ways. The seemingly sporadic behavior across our different PDAs could be due to memory mismanagment, which may cause slightly different problems on different devices, although this is purely speculation at this point.
With that said, I am very glad to hear that another function can serve the purpose without the error! As a workaround which I didn't mention in the previous post (it didn't hit me at the time), if necessary, we can implement those functions (sorting and reversing arrays) in LabVIEW as subVIs (and not use the primitives). So if you need that functionality specifically, we should be able to program it pretty easily. On the other hand, if you were really only looking for the max of an array, the min/max function is slicker.
Definitely repost with whatever else you find - it sounds like we'll definitely get you to a working, stable solution with a little more effort. On the other hand, it'll be very interesting to learn what's really going on so we know what our efforts were really over 😉
Best Regards,
JLS
07-06-2006 07:55 PM
07-07-2006 01:19 PM
Hello,
I would love to tell you what's going on with those functions, but I don't know quite yet. I filed the corrective action request to R&D, and I know it has been assigned for review and exploration, but there hasn't been any relevant technical information posted in the investigation section yet. It is possible that they have later development builds of PDA which don't show the problem, and as a result may not fully explore what was wrong, since it would then be technically "fixed in the next version." Unfortunately, I don't have much influence on that process, but I have specifically requested that the problem be explored in detail to determine the cause, particularly because we are seeing slightly different, although similarly erroneous behavior. This leads me to believe that the problem could be rooted in how memory is handled, and the fact that it doesn't occur on a given system at a given time could only be luck.
If and when I learn more (and I do receive all updates on all such actions I file), I will post more information here if I am authorized to do so!
Thank you, and I am very glad to hear that we could work around the problem at least for your current application!
Best Regards,
JLS
08-29-2006 09:29 PM
Hi Folks:
I wish I found this thread 2 weeks ago because I've been pulling my hair out on this one problem. Instead of starting a new thread, I believe this problem is somewhat related.
I'm using LV Pocket PC 8.01f1 with the PDA Controls memory leak fix patch and low and behold, one of my subVIs uses the sort array and reverse array primitive in sucession. I am downloading my app to a Windows Mobile 5.0 phone and when I try to use both those primitives, I don't get an error but my program just hangs.
I am using 2 parallel loops with the upper loop using an event structure to perform actions such as load, exit etc. The bottom while loop has the this attached subVI which uses these primitives. This subVI parses messages and sorts them accordingly. I initialze an array of clusters, replace an element in the array then perform the sort. My element in the array is a cluster with the first cluster element as a string type in which I use as a timestamp. Lets say, the first message with a timestamp (string type) is already sorted in the array. If the second incoming message is older than the first message, the subVI crashes.
The attached VI is used as a subVI in my main program and my program hang. Since this is not in the event loop, my program just hangs until I press the exit button in my main program. (I have to press the exit button a number of times though). Whats baffling is this subVI, if run standalone crashes my Window Mobile 5.0 device.
The attached VI is used as a subVI in my main app (with some front panel modifications). In order to see what I'm doing, first select 15:20 timestamp and press GO. One element is put into my array. Now select 15:35 timestamp and press GO. My array of clusters is sorted correctly (press the digital display to view the elements).
Now exit the VI and do the reverse. Select 15:35 timestamp, press GO. Then select 15:20 time stamp and press GO. CRASH, CRACKLE, POP!!!
I placed a Sort option however, it seems to not matter. I will look into this option a bit further.
Can anybody else confirm?!!!!
Thank you
Robert
08-29-2006 10:39 PM - edited 08-29-2006 10:39 PM
Message Edited by Kris_worm on 08-29-2006 10:42 PM