RE: Informix 4GL, HP, function C ... and core dumped !!
Posted in 1999
When this sort of thing happens to me, more often than not, the problem is caused by an earlier (dodgy) piece of code. If as you say the core dump disappears when you put a prompt in, then this often an indication that something in memory is not as it should by. I suspect that putting any line of code, e.g. message, display or sleep 1 will also get rid of the core dump. If this is the case you should beware that your program may then core dump a little later. You might have to back track through your program and look at other lines of code that may cause this problem. (e.g. check that you haven't overflowed any arrays, or that you haven't got any unitialized variables before you reach the bit of code that core dumps.). Rekaish. -----Original Message----- From: Pascale [mailto:Pascale.Desert@wanadoo.fr] Sent: Tuesday, September 14, 1999 3:53 AM To: informix-list@iiug.org Subject: Informix 4GL, HP, function C ... and core dumped !! Hi Gurus, I have a big problem on a 4GL 7.20 ud1x1 program on a HPux. I have about 10.000 lines of 4gls module and a call a C function which quickly write in a flat file ; at each time, it wrote about 3 lines ; at the 363th writing line, I have a "core dumped" when trying to wrote in this flat file; if I put a display " " before the call and a prompt after the call, I don't have this "core dumped". Very strange !!! The display " " do nothing isn't it ??? and the prompt also ?? I work with a compiled 4GL 7.20ud1x1, and the code is about 4,6 Mo ; may be it's too ?? I put the code on a SCO 4GL RDS and "no core dumped" What's wrong ------------------------------------------------ this is an extract of the wrong code ------------------------------------------------ ... CALL fgl_write_str("a",PCtraceFP,MCmess) RETURNING PBok ^ L-------------------- Call of the C function END IF display " " < --------------------- THIS DISPLAY DO NOTHING ######################### # mod nov 1998 RT ######################### IF PNmwstans1=1.0 OR PNmwstans2=1.0 OR PNmwstans3=1.0 OR PNmwstans4=1.0 OR PNmwstans1=3.0 OR PNmwstans2=3.0 OR PNmwstans3=3.0 OR PNmwstans4=3.0 THEN IF PImwstnr = 0 THEN # --> without this prompt and the "display nothing" above, # we have a core dump, I don t know why # on a rds compiler, don t need this # RoI / sept 99 # # may be it s the compiler version # INFORMIX-4GL Version 7.20.UD1X1 # Software Serial Number ACN#J288410 PROMPT "miss VAT num2, Press any key" FOR CHAR x_rep ^ L_______ THIS PROMPT IS NOT NECESSARY --------------------------------------------------------------------------- Thanks for answer at RoI@vifi.fr