Mumpster
http://mumpster.org/

Segmentation error using %M
http://mumpster.org/viewtopic.php?f=13&t=1696
Page 1 of 1

Author:  tlwiechmann [ Thu Mar 01, 2012 9:47 am ]
Post subject:  Segmentation error using %M

I'm running MUMPS V1.55 for Linux i686 (Ubuntu build).

If you enter the following:

MCL> K

MV1 will hang and if you hit Ctrl C, it will issue a segmentation error and the image will run down.

Author:  cais28 [ Thu Mar 01, 2012 1:53 pm ]
Post subject:  Re: Segmentation error using %M

Terry

Because KILL delete all memory variable .
Change the first line of ERROR label in %M routine , something like :

ERROR U 0 I $ES<2 S $EC="" G %M

This working !

Author:  raynewman [ Thu Mar 01, 2012 4:05 pm ]
Post subject:  Re: Segmentation error using %M

Yes, it seems to be in the $ECODE set stuf - I'll see if I can find the underlying problem.

Ray

Author:  tlwiechmann [ Thu Mar 01, 2012 7:01 pm ]
Post subject:  Re: Segmentation error using %M

This issue is the app (MCL) should crash, not the underlying MV1 system.

Author:  raynewman [ Fri Mar 02, 2012 2:48 am ]
Post subject:  Re: Segmentation error using %M

There are actually several problems here.

1. %M goes into a nonsense loop
2. %M doesn't detect this
3. A <Ctrl><C> or SIGINT (unix) is not passed back to %M
4. Even if the SIGIN was passed back, %M would not handle it correctly

So... some fixes are required to %M in the error stuff
and the mumps image needs to be better with signals.

I'll get there eventually.

Ray

Author:  tlwiechmann [ Fri Mar 02, 2012 7:30 am ]
Post subject:  Re: Segmentation error using %M

Definitely something wrong with setting $ECODE.

It takes:

Set $ECODE="UThis is an error!"

But rejects:

Set $ECODE=",UThis is an error!,"

which is the standard format.

EsiObjects uses this extensively!

Author:  raynewman [ Fri Mar 02, 2012 12:08 pm ]
Post subject:  Re: Segmentation error using %M

Hmmm, I've never heard of putting the commas in there before.

Ray

Author:  tlwiechmann [ Fri Mar 02, 2012 2:04 pm ]
Post subject:  Re: Segmentation error using %M

I've been reading the standard and it explicitly says the code(s) are surrounded by commas. The description of the $ECODE states "...information is loaded by the implementation after detecting an erroneous condition, or by the application via the SET command." It the goes on to define the format: , L ecode , where ecode can be a M, U or Z followed by a graphic. The implication is that it is the format generated by the system and the format the programmer should use when setting it to activate error processing.

However, The SET command description for setting $ECODE simply states that it is set to the expr and makes no distinction as to the format. In other words, there's room for confusion. I'm assuming it requires the commas since EsiObjects has run on most MUMPS systems and it uses the comma format exclusively. Additionally, I tried it on GT.M and it will complain if you don't include them.

Author:  raynewman [ Fri Mar 02, 2012 2:11 pm ]
Post subject:  Re: Segmentation error using %M

Ya, after your last post, I googled and most implementations seem to use the comma.
GTM even allows S $EC=",M1," which I thought should have been against the rules; however, the standard doesn't explicitly disallow that either.
I checked the ANSI and ISO standards and, as you say, they don't specify the requirement explicitly. I will get around to modifying my version of MUMPS to allow either.

Ray

NOW DONE and loaded to sourceforge.

Author:  evaamart [ Mon Sep 30, 2019 12:31 am ]
Post subject:  Re: Segmentation error using %M

I was having similar error

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/