Jump to content

Cat

Members
  • Posts

    815
  • Joined

  • Last visited

  • Days Won

    15

Posts posted by Cat

  1. QUOTE (ElijahRock @ May 9 2009, 08:56 PM)

    I saw it on Thursday at the IMAX theater in Austin. I grew up a huge Trekkie, and I've got to say, this movie ROCKS.

    IMAX! I'm jealous!

    Yes, run, do not walk, to your nearest movie theater (even if it's not IMAX) and see this movie. This one does not disappoint.

    It had an actual plot (with only a one real artifice offered up via disruptions in the space/time continuum :P ), great acting (I was worried about watching Sylar, too, but after a couple minutes forgot about it; Simon Pegg was brilliant as Scotty), good special effects, etc.

    The non-ST fans I was with enjoyed it, and for those of us big Trekkies, there were plenty of obscure references to keep us happy. :)

    GO!

  2. QUOTE (normandinf @ May 6 2009, 09:12 AM)

    I won't have a good night of sleep until I figure out if Spock is going to crack Kirk's skull open...

    You can hardly blame him if he does.

    QUOTE

    (for those who saw the trailers)

    I've been attempting to avoid the trailers. These days it seems like every good scene/line from a movie is in the trailer, and then there's nothing left in the movie. Still I go (did anyone other than me actually see the last ST in a movie theater? Or see it at all??).

    I have high hopes for this one, tho. Good director, good writers, and actually good reviews (not that that really matters). I'm keeping my fingers crossed...

  3. QUOTE (Ernest Galbrun @ May 6 2009, 08:03 AM)

    First of all, sorry for my long silence, I have broken my clavicle last sunday and they wouldn't tell me their wifi access code in the hospital.

    Sorry to hear about your injury.

    QUOTE

    I have no local variable, no fork or anything. An object goes it, I unbundle, take the array, multiply by a scalar constant (for example), and rebundle,
    et voilà
    , 20 MB used that I will never get back.

    Isn't this exactly what the In Place Element Structure is for? Or are you using it and it's still creating a copy where it shouldn't be?

    As a side note, I just "discovered" this structure myself awhile ago (yes, I'm a little slow) and am going thru old code inserting it where possible. I do a lot of manipulations on large data sets and I have been able to see reductions in memory use.

  4. QUOTE (Yair @ May 4 2009, 12:29 PM)

    I love TIM! My 13 yr old daughter is hooked on a more recent variant and is chewing thru the levels at light speed. Makes a mama proud. :)

    I've forwarded the link to Electric Box to my home email account, because if I start it now, I'll never get any work done today...

  5. QUOTE (neBulus @ Apr 28 2009, 08:43 AM)

    What was the method you used to narrow it down to the lvsound.dll?

    Not that I question that as the reason but I am curious what signs other than the memory jumping that got you looking at that dll?

    Sadly, the method I used was trying everything else, first. :blink:

    First, while I was out in the field, I finally saw the error occur; that helped make a believer out of me! Not that I didn't believe something that had been reported more than once, it was just that -- as it turned out due to the computer I was using -- I had never seen the actual conditions under which it was occuring myself.

    After that I spent a bit of time trying to figure out all the things that were different between how I run the software in the lab during development, vs. how the users run it in the Real World. I set up a matrix of the 5 main differences, and rewote/ran my software in several different configurations to test them all. I actually went into it thinking that it could have been multiple things interacting, so I probably ran a few more tests than I actually needed.

    Once I pinpointed the problem to running sound, I wrote an exe that would:

    Output to sound 1 second worth of data, 2 channels, i16, via an array constant (pre-generated with the random number generator and scaled to the card's output range), at a rate of 44100. Repeat in a while loop until you are bored, or until you get an out of memory error.

    I was running Task Manager and would record the memory usage of my little sound routine every half an hour. On my main test computer, it would be flat for 4 hours, and then around 4 1/4 hours start increasing at the rate of about 1Mb every few seconds. Very noticable. I then added a reset button to the routine. I would poke that button after the memory usage started spiking to reinitialize the sound, and it would run fine for another ~4 hours.

    I then took out the old sound functions and put in the new ones. I ran that overnight and it was still chugging away the next morning.

    That's pretty much it. As I said, I've tried this on multiple relatively new platforms (mostly varieties of IBM/Lenovo and Dell boxes) and gotten the same out of memory error. I've only tested it on one IBM T43, but from my experience of the past 5 years, I'm pretty sure it will run fine on all of them.

    Cat

  6. After many many days of testing with multiple different setups, the problem is solved. Or rather, I don't know *exactly* what is causing the problem, but I do know the circustances under which it will occur.

    Turns out the problem wasn't with all the TCP traffic, and it wasn't with continually moving large amounts of data around in memory (tho I will have to admit I was using a global to do that -- now it's all properly Q'd up :) ).

    I am using old functions from lvsound.dll to output the time series data to sound. For some (as yet) unknown reason, on certain computers, after approx 4.25 hours of continually writing 2 channels of I16 data to the sound card, something in the system starts grabbing memory at a huge rate.

    These "certain computers" are from different manufacturers and have all been purchased in the past couple years, so I'm assuming there is something in newer computers that doesn't play well with the old LabVIEW sound functions. This is even true within a single brand. My old IBM/Lenovo T-43 works fine, but my newer T-61 doesn't. Unfortunately, because I need to use the old machines in order to develop code on a least common denominator, I've been using the T-43 and of course could never replicate this problem there. That made the whole debugging process even more interesting.

    I've done a quick fix to the problem by reinitializing the sound output every half hour. This action clears out whatever buffer is building up and the code will run fine for at least 3 days (my longest test). The longer fix is to incorporate the newer LV sound functions (lvsound2.dll), which from my preliminary tests work fine in both the old and the new systems. I'm just not sure if everyone is going to have DirectX8.0 on their computers. Yes, it's been around forever, but so have some of our laptops.

    I'm not really sure whether or not to report this as a bug, since you have to look really hard to even find lvsound.dll anymore -- all the LV sound functions point to the newer version. Plus, I haven't identified exactly what's causing the problem; whether it's a sound card hardware or software issue. Any thoughts on this as a reportable bug?? Or maybe someone has already reported it and I just wasted 2 weeks. Luckily I have enough other laptops I didn't come to a complete halt on my other projects.

    Thanks again to everyone who weighed in on this with suggestions and encouragment!

    Cat

  7. I'm not sure if this is a bug or just really really annoying, but...

    Open Project A and edit A.vi. Realize there's some code in Project B you can reuse. Open Project B. Find and open B.vi and copy some code from it (Ctrl-C). Close B.vi. Close Project B. Attempt to paste (Ctrl-V) code into A.vi. It's not available anymore to be pasted.

    Note that if code is copied directly from B.vi without going thru Project B, it still exists on the clipboard even after B.vi is closed. Unfortunately, B.vi could be buried several directories down, and accessing it from the Project is usually much faster.

    What gives? Does each project maintain its own clipboard??

    Now I just need to write 100 times, "Do not close Project B until code is copied to Project A. Do not close Project B until code is copied to Project A. Do not close Project B until code is copied to Project A..."

  8. I've dealt with this a few different ways. I seem to come back to having, in essence, 2 state machines. One that drives the set up (for me usually frequency and amplitude) and as its last state, an internal state machine that deals with the actual data -- cycling thru channels, collection, processing, saving, etc. All of this is driven by arrays of setup parameters and a pointer variable to each one of those arrays that get updated at the end state. I don't really see any reason why this couldn't be all one state machine, but it's easier for me wrap my brain around it all if I break it up. Plus, there have been a few situations where the setup part was quite easily satisfied with a couple nested for loops, like you mentioned.

    I would love to post some code, if I could figure out how to get it from my real computer to this Big Brother controlled email machine. :thumbdown: If this method sounds useful to you, but I haven't explained it well enough, let me know and I'll see what I can do about getting some code or at least screen shots.

  9. I understand ini files can be very useful. I do actually use them with a few of my tools. I always code an editor for them, because my users aren't usually up to hand-editing anything. And under some circumstances, I move the ini files to a different directory, because of other users who *think* they know how to edit them and decide to go mucking around when they're bored. So all of that adds up to me needing the ini files where I need them when I need them. Having LV write to those same files makes me a tad bit nervous. And having it create an ini when I've got the real one stashed away some place safe is needlessly (and perhaps dangerously) redundant.

    For the record, the solution jpdrolet suggested to use the -pref switch seems to be working fine. It's definitely the easiest solution, tho the batch file idea would have been more technically interesting to implement. :)

    Thanks for all the ideas!

  10. I understand ini files can be very useful. I do actually use them with a few of my tools. I always code an editor for them, because my users aren't usually up to hand-editing anything. And under some circumstances, I move the ini files to a different directory, because of other users who *think* they know how to edit them and decide to go mucking around when they're bored. So all of that adds up to me needing the ini files where I need them when I need them. Having LV write to those same files makes me a tad bit nervous. And having it create an ini when I've got the real one stashed away some place safe is needlessly (and perhaps dangerously) redundant.

    For the record, the solution jpdrolet suggested to use the -pref switch seems to be working fine. It's definitely the easiest solution, tho the batch file idea would have been more technically interesting to implement. :)

    Thanks for all the ideas!

  11. QUOTE (jpdrolet @ Apr 14 2009, 01:54 PM)

    You can forbid creation of files in a folder by some or all users in the advanced Access Control Settings:

    (attachment deleted)

    However it is not very convenient if you use/modify some of the ini files.

    The second option may be more useful. If the application users start the applications using shortcuts anyway, modify the command line to use a pref file from an inexistent location. The switch -pref \\DEV\NULL was a wink to linux but -pref nofile would also prevent the creation of the file because it is an unusable relative path; nofile is not a special keyword. Of course, the third option was a joke.

    Ah-ha! I was looking all over for those permission settings when you first mentioned this. I finally just figured out that I can't access them anyway, since we have to run with simple file sharing enabled. But at least I now know I wasn't imagining things, and I used to be able to set permissions like that.

    I got the non-windoze file reference. :) I'll give the -pref switch a try, since I do run the apps from shortcuts.

    What? The 3rd option was a joke?!? :o

  12. QUOTE (PJM_labview @ Apr 14 2009, 01:34 PM)

    I like this! I haven't had a reason to use system exe (let alone write a batch file) in years.

    QUOTE (neBulus @ Apr 14 2009, 01:45 PM)

    Turn that idea inside out.

    Sub-VI writes then invoke bat file that runs the app and the after the app is done the next line in the bat file deletes the ini.

    Now *you're* making me all ~~ :wacko: ~~ !!

    Okay, I get the idea. When I get a chance I'll play around with this a bit and see what works best.

  13. QUOTE (jpdrolet @ Apr 14 2009, 12:26 PM)

    Indeed the file is created as application exits

    I can only see some workarounds:

    • Change folder access properties to forbid creation of files
    • Start the application specifying the -pref switch to some inexistent location e.g. myapp.exe -pref \\DEV\NULL (requires a shortcut)
    • Put the line CreateThisFile=FALSE in myapp.ini ;)

    I'm working in the Windows world... is it possible to forbid *creation* of files in a folder?? I know I can make a folder read-only, but that's a different thing, and I need to be able to edit the couple ini's I do use in that folder.

    As for your last suggestion, I agree with what Ben said...!

  14. QUOTE (Antoine Châlons @ Apr 14 2009, 09:29 AM)

    That link is the only thing I'd found about it, too. Yes, there are sometimes good reasons to have the ini file around. I generally don't use them, tho, and they are cluttering up my EXE folder.

    Thanks for the idea to delete the ini file from the exe. That should work if the ini is recreated on start of the exe, but probably not if it's recreated on exit. I'll take a look at it.

  15. QUOTE (PJM_labview @ Apr 13 2009, 02:59 PM)

    Ouch!

    Don't feel too badly for them. These are the same guyze who, everytime I opened up LV7 and they saw the big "EXPRESS" title on the splashscreen, would say, "You know, if National Instruments would ever put out a *real* version of LabVIEW and not just an *express* version, maybe you could actually do something with it."

    I was ecstatic to go to v8, if only for that reason. :)

    Cat

  16. QUOTE (Mark Yedinak @ Apr 3 2009, 01:28 PM)

    The beauty of a state machine is that it is flexible and can be easily modified such as adding new states or reordering things if necessary. It also allows you to jump to a specific state such as an error handler. A sequence frame, rather flat or stacked (and stacked is definitely the nastier of the two) will force the execution, all frames MUST and WILL be executed, and they are very difficult to add new frames if the need arises.

    Don't get me wrong -- I love state machines and use them all over the place. I just never made the leap into using it to make more simplified transitions between parts of my code that *always* go step1->2->3->etc.

    I'm giving it a whirl right now with my big, messy, 3x4 screens, dies-after-8 hours vi. If I can make it work there, I can do it anywhere.

×
×
  • Create New...

Important Information

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