01-18-2012 11:13 AM
Guillaume,
We've looked at the sample code you sent and weren't able to reproduce the problem on Linux. Everything seems to plot fine in your program's version of debug mode. A few more questions for you: What version of gcc are you using? What Linux distro/version? Are you using CVI Linux 8.0 or 2010?
Also, if it's possible could you attach your compile.ecc file so that we're sure we have the same settings you're using?
01-19-2012 03:45 AM
Hello and thanks for your time.
I have this problem on the 2 PCs where I've tried. They are under different versions of Scientific Linux. I have the problem both in debug and normal mode.
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50)
The thing is that I have many similar programs running on the same machines that also use strip charts without issues so far, so a spillover mistake in my own code is not excluded, but I've tracked it down for days and it all breaks down to the PlotStripChart function: if I comment it out: no problem.
$ cat /usr/local/natinst/cvi2010/bin/compile.ecc CMPLRNAME = GCC VALID_CFG = 1 DOPARSING = 0 OPT_LEVEL = 0 WARNLEVEL = 0 USERFLAGS = COMPFLAGS = -c -x c -m32 C89_FLAGS = -std=gnu89 C99_FLAGS = -std=gnu99 LINKFLAGS = -rdynamic -m32 COMPLPATH = gcc ENV_BATCH = OBJ_TEMPL = -o $OBJECT SRC_TEMPL = $SOURCE DEF_TEMPL = -D$MACRO DEFVTEMPL = -D$MACRO=$VALUE INC_TEMPL = -I$PATH LIB_TEMPL = -l$LIBRARY LIBPTEMPL = -L$PATH LIB_PATHS = USE_LIBRY = nianlys;pthread;cvintwrk;ninetv ABS_LIBRY = OPT_FLAGS Debug Opt = -ggdb Release Opt = -O2 END_FLAGS WARNFLAGS Warnings = END_FLAGS __CEND___
01-19-2012 10:36 AM
Looks like we had some user error on our end as well. Not sure exactly what was wrong, but we were able to reproduce the crash when plotting now. I've assigned somebody to take a look at it and hopefully we can have some answers for you pretty soon. Thanks for your help.
01-23-2012 04:13 AM
Thank you for making me feel a lot better. This bug has been driving me crazy for a while and I'm really worried about all the other software where it could potentially 'blow up'.
01-30-2012 11:49 AM - edited 01-30-2012 11:49 AM
Guillaume,
It looks like we've found the source of your hang. There was some logic that was introduced back in 2010 to fix another issue which was (in certain situations) deciding that the Left Y-Axis label was too close to the edge of the graph and then attempting to move it slightly inward. This was fine, but unfortunately in some cases the Left Y-Axis label would be positioned in exactly the same spot... and then the process would repeat infinitely. This just seems to eat CPU on Windows (which was why we didn't notice it at the time) but can cause a hang on Linux which is what you're experiencing. We found and fixed this issue months ago on Windows and it'll be in the next release of CVI but I realize that doesn't help you right now.
We have a couple things we can try to fix the problem in your case:
1) The simplest would be to just disable the Axis Label string on the Y-Axis. This should prevent the problem from occuring, but then your data is unlabeled on the graph. You'd probably want to use a rotated text message control in that case.
2) The more complex solution is to enable ATTR_FIXED_PLOT_AREA then play with the values of ATTR_PLOT_LEFT and ATTR_PLOT_WIDTH until you have enough room for the possible data values you'd be plotting and the labels still stay on the screen. I'd recommend loading the UIR in the User Interface Editor, enabling Fixed Plot Area in the property browser, and then adjusting Plot Area Left +5 pixels and Plot Area Width -5 pixels. My guess is that 5 pixels should be enough to fix the problem, but you might need to adjust it a little more until the problem goes away and things look acceptable to you. There's a little more trial and error in this method, but you can keep your Left Y-Axis label string enabled.
Let me know if you have anymore questions, and thanks for bringing this to our attention.
02-03-2012 04:36 AM
Hello kevin,
using ATTR_FIXED_PLOT_AREA seems to have fixed the issue.
So far, so good.
Thank you for the support.
03-02-2012 06:40 AM
Hello Kevin,
I would like a precision: does this problem applies only to strip charts or also to digital strips and graphs ? Since they can all have fixed/auto areas...
Also, is there going to be a patch issued for the runtime or do I have to wait for the next Linux version...?
03-02-2012 10:18 AM
Hey Guillaume,
The problem definitely can happen with regular graphs. I assume it's possible it could occur with a digital graph, but I haven't seen it happen. They work slightly different than graph/strip charts so I think it'd be harder to get it to occur.
Unfortunately, we currently do not have any plans to issue a patch for this. It'll definitely be in the next Linux RTE.