MATRIXx

cancel
Showing results for 
Search instead for 
Did you mean: 

Bugs in MathScript Objects (.mso)?

Are there any known bugs in mathscript objects (.mso files)? I'm having various problems with them in MATRIXx 62.2 on the PC. Sometimes an error window pops up saying
Assertion failed: file "f:\mx62\62mx1118\xm\interpreter\intimp.h", line 842, errno 183

Other times I get a fatal error:
***F*** Not a keyword in time_history.
data = t_hist(yname,{pdmout=1,`tmin=tmin',tmax=tmax});

(In this case, t_hist is a time_history object).

Other times the same script works OK. (Although it seems there may be a memory leak--repeatedly reassigning an object keeps consuming more memory).

I'm wondering if there are known bugs with workarounds. Otherwise I'm going to have to go with a much less elegant solution than using an mso in order
to get something that is reliable.
0 Kudos
Message 1 of 4
(7,711 Views)
Jfarm,
Time_history is not one of the build in object types that I know about. I am assuming this is a object type that you have created. Is this correct? Would you mind posting the .mso file that you are using?

I have searched the database of reported bugs and did not find anyones that seemed related to what you are seeing.

Carl L
National Instruments
0 Kudos
Message 2 of 4
(7,711 Views)
Carl: time_history is indeed an object type that I created. I've been able to eliminate the errors by adding an accessor function to the object and using it to get data from the object, e.g. getdata(myobj,whatever), instead of using the overloaded right index operator, e.g. myobj(whatever). It is definitely not as pretty, but at least it seems reliable. So it would seem that there is a bug in the right index operator. I also changed my code to use a function to add data to an object rather than using an overloaded + operator to combine objects. I thought this might alleviate an apparent memory leak, but I'm not sure it made any difference. Attached is the "old" code that was giving me problems. If there is something wrong with the way I was using th
e right index operator, I'd be grateful to find out.
0 Kudos
Message 3 of 4
(7,711 Views)
Jerry,
For an example of the right index you can look at the group.mso that is in \examples\xmath subfolder of xmath. It is of course a lot simpler than what you are trying to implement.
I am reading through your code to understand it, and I tried to execute some of the commands, but I am missing the function findname. It is used on line 160.

Carl L
National Instruments
0 Kudos
Message 4 of 4
(7,711 Views)