Re: Informix 4GL, HP, function C ... and core dumped !!
Posted in 1999
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration, Internationalization & Character Sets
Thanks for your post ; Can you confirm that sleep stmt resolved "core dump" ??? Me not, howewer, I will look up all my called variable for initialize -----Message d'origine----- De : Carpenter, Matthew <carpenm@hastings-ent.com> ' : 'Roland' <Roi@vifi.fr>; informix-list@iiug.org <informix-list@iiug.org>; Rekaish Bhardwaj <RekaishB@compans.com> Date : mardi, 14. septembre 1999 21:38 Objet : RE: Informix 4GL, HP, function C ... and core dumped !! >I had the same problem a few months back.. >The fix was this: A non-initialized variable was being passed back to a >calling function. >This was causing a core dump. If I put a sleep or a display stmt in a >certain place in the code the core dump >went away. The wierd thing is where I would put a sleep stmt to fix the >core dump was no where close to >the actual problem. It has something to do with the the way the stack >works, and if we push something new on it. >I put display and sleep stms in until a located the exact position in >the code that it was core dumping. Checked all the >variables and saw one that was not being initialized. > >MattC >POS Programmer >Hastings Corp. > > >> -----Original Message----- >> From: Roland [SMTP:Roi@vifi.fr] >> Sent: Tuesday, September 14, 1999 2:16 PM >> To: informix-list@iiug.org; Rekaish Bhardwaj >> Subject: Re: Informix 4GL, HP, function C ... and core dumped !! >> >> >> -----Message d'origine----- >> De : Rekaish Bhardwaj <RekaishB@compans.com> >> @ : 'Roi@Vifi.fr' <Roi@Vifi.fr>; informix-list@iiug.org >> <informix-list@iiug.org> >> Date : mardi, 14. septembre 1999 15:27 >> Objet : RE: Informix 4GL, HP, function C ... and core dumped !! >> >> >> >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. >> >> ---------------------------------------------------------------------- >> ------ >> --- >> No, it's not the case !!! >> If I put another order, as SLEEP 1 (I try many orders !!) >> I have the core dumped again !! >> I haven't developped the whole code of this application ... may be, >> there is >> an overflowed array ??? >> When I took this application to do some modifications (i.e. put in >> transactional state with "commit work", do other modifications asked >> by my >> client) >> I meet this problem !! >> >> I don't know exactly how Informix used stack !! >> But in my mind, I think that may-be it's a 2 bits hard coded, read on >> the >> half ?? or something else !! >> Eventually, it's possible that 4ge is more bigger ?? >> >> If you, or anyone has feedback ?? >> Thanks >> >> Already, I've a friend who have eventually similar problem (but he is >> not >> sure !!) He left the problem "open" (i mean, he put the display order >> ... >> and alta la vista !!). But, I'm more curious and don't want to let >> potential >> problem !! >> >> >> >> >-----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 >> > >> > >> > >> > >