4GL weird compile behavior
Posted in 2000
A user on Informix OnLine 5.1 with 4GL 4.20 found one report program would report "errors discovered during compilation" with an empty .err file, and the resulting program ran as a blank screen. Compiling from the command line with the p-code (R4GL) compiler produced a memory fault/core dump. Suggestions: likely a compiler bug or parse-tree limit, so comment out/split deep nested code into functions and try the C-code compiler. Recompiling with i4gl (C version) worked, and the poster planned to report the R4GL core dump as a bug; the underlying cause was never identified.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
We are running on the Informix 5.1 Online engine and version 4.20 of the 4GL tools. I wrote a report program a few months ago and it worked fine. Now when I try and make changes to it, it always says 'The following errors were discovered during compilation', but then doesn't list any errors, and the .err file is empty (0 bytes). If I compile the program again immediately it seems to compile, but when I go to run it nothing happens - I get a blank screen and 'Press return to continue'. I tried renaming the source program and recompiling, and also re-entered the entire program under a different name and still had the same problem. I am using the Program_compile option because I am including some routines provided by our Financial software vendor. As far as I can tell this is the only program that has this problem. If any one has any ideas how to get this program working again I would appreciate it very much. Thanks in advance. Paul Brown Kalamazoo Public Schools * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network * The fastest and easiest way to search and participate in Usenet - Free!
Do you use the compiler version of 4GL (C4GL) or the p-code version (R4GL)? If the former try to learn to use the c4gl utility with the -c option to compile the source to an object file and see if an error file is made then. Similarly for R4GL use the pcode compiler to create a pcode object. Look in the 4GL Reference Manual manual for instructions. Art S. Kagel Big Jake wrote: > We are running on the Informix 5.1 Online engine and version 4.20 of > the 4GL tools. I wrote a report program a few months ago and it worked > fine. Now when I try and make changes to it, it always says 'The > following errors were discovered during compilation', but then doesn't > list any errors, and the .err file is empty (0 bytes). If I compile the > program again immediately it seems to compile, but when I go to run it > nothing happens - I get a blank screen and 'Press return to continue'. > > I tried renaming the source program and recompiling, and also > re-entered the entire program under a different name and still had the > same problem. I am using the Program_compile option because I am > including some routines provided by our Financial software vendor. As > far as I can tell this is the only program that has this problem. > > If any one has any ideas how to get this program working again I would > appreciate it very much. Thanks in advance. > > Paul Brown > Kalamazoo Public Schools > > * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network * > The fastest and easiest way to search and participate in Usenet - Free!
Thanks for the reply. I am using the p-code (R4GL) version. I tried compiling from the command line and got the message: Memory Fault (coredump) and found a 1MB core file. I also tried concatenating all the 4go modules I need into a new 4gi file as described in the manual and got a Memory Fault when I tried to run that. We do not have the Informix 4GL Interactive Debugger product. I am going to fool around with this some more but any other ideas in the meantime are welcomed. Thanks again. * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network * The fastest and easiest way to search and participate in Usenet - Free!
Sounds like you may have hit a limit in the v4.xx 4GL compiler. Jonathan any sage advice? Art S. Kagel Big Jake wrote: > Thanks for the reply. I am using the p-code (R4GL) version. I tried > compiling from the command line and got the message: Memory Fault > (coredump) and found a 1MB core file. I also tried concatenating all > the 4go modules I need into a new 4gi file as described in the manual > and got a Memory Fault when I tried to run that. > > We do not have the Informix 4GL Interactive Debugger product. I am > going to fool around with this some more but any other ideas in the > meantime are welcomed. > > Thanks again. > > * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network * > The fastest and easiest way to search and participate in Usenet - Free!
I seem to recall hitting similar problems with object (.4gl -> .o) compiles. To track it down, I commented off execution code within functions - leaving DEFINE and RETURN statements open. In my case I narrowed the problem down to deep CASE statements inside INPUT statements. My solution at the time was to cut and past the deeper code into new functions. (Better code design anyway) My guess is that this was a limit on the depth and/or breadth of the compiler's parse tree. Hope this helps Robert Stuart "Art S. Kagel" wrote: > Sounds like you may have hit a limit in the v4.xx 4GL compiler. Jonathan any > sage > advice? > > Art S. Kagel > > Big Jake wrote: > > > Thanks for the reply. I am using the p-code (R4GL) version. I tried > > compiling from the command line and got the message: Memory Fault > > (coredump) and found a 1MB core file. I also tried concatenating all > > the 4go modules I need into a new 4gi file as described in the manual > > and got a Memory Fault when I tried to run that. > > > > We do not have the Informix 4GL Interactive Debugger product. I am > > going to fool around with this some more but any other ideas in the > > meantime are welcomed. > > > > Thanks again. > > > > * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network * > > The fastest and easiest way to search and participate in Usenet - Free!
Thanks for all the replies! It is a very small program (GLOBALS, MAIN, MENU, REPORT), with 1 small CONSTRUCT statement, a SELECT/PREPARE/DECLARE and a FOREACH statement. I ended up not using the 4go modules and compiled the remainder in the c compiler (i4gl), and it works fine. (The same 4go modules work fine in all my other programs). So I guess I will leave it this way - the other will remain a mystery at least for now. I appreciate the help from this forum - the official Informix site was of no use at all. Paul Brown Kalamazoo Public Schools * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network * The fastest and easiest way to search and participate in Usenet - Free!
Robert Stuart wrote: > I seem to recall hitting similar problems with object (.4gl -> .o) compiles. > To track it down, I commented off execution code within functions - leaving > DEFINE and RETURN statements open. > In my case I narrowed the problem down to deep CASE statements inside INPUT > statements. > > My solution at the time was to cut and past the deeper code into new functions. > (Better code design anyway) > > My guess is that this was a limit on the depth and/or breadth of the compiler's > parse tree. > > "Art S. Kagel" wrote: > > > Sounds like you may have hit a limit in the v4.xx 4GL compiler. > > Jonathan, any sage advice? Well, Restoration Hardware has a 'Silver Sage' paint and it looks pretty good on our bedroom walls. And I prefer Sage and Onion stuffing to Parsley and Thyme. :-) I liked Robert's answer -- it is excellent, in fact, and very much along the lines of what I'd have said. It is a bug in the compiler -- it should not core dump, period...well, unless you send it a signal for which the default action is to core dump. There's some small detail in the code which is throwing the compiler into a tizzy, and changing the correct detail will fix it. It is probably not the choice of a variable name (unless you are using a keyword as a variable name), but something else. See whether the c-code I4GL compiler objects. If it doesn't, then you've again confirmed the bug. If it does, fix its complaint and the p-code compiler will probably be happy. And report the bug, cutting the reproduction down to the minimum size that reproduces the core dump. > > Big Jake wrote: > > > Thanks for the reply. I am using the p-code (R4GL) version. I tried > > > compiling from the command line and got the message: Memory Fault > > > (coredump) and found a 1MB core file. I also tried concatenating all > > > the 4go modules I need into a new 4gi file as described in the manual > > > and got a Memory Fault when I tried to run that. > > > > > > We do not have the Informix 4GL Interactive Debugger product. I am > > > going to fool around with this some more but any other ideas in the > > > meantime are welcomed. -- Yours, Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h> Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN "I don't suffer from insanity; I enjoy every minute of it!"
I remember prior to our upgrade, if we had a report parameter list with a missing comma, poof, instant coredump. just ma 2c (not that its worth much in this country anymore) brett In article <1659ac50.91772270@usw-ex0106-044.remarq.com>, brownpmNObrSPAM@kalamazoo.k12.mi.us.invalid says... > Thanks for all the replies! > > It is a very small program (GLOBALS, MAIN, MENU, REPORT), with 1 small > CONSTRUCT statement, a SELECT/PREPARE/DECLARE and a FOREACH statement. > I ended up not using the 4go modules and compiled the remainder in the > c compiler (i4gl), and it works fine. (The same 4go modules work fine > in all my other programs). So I guess I will leave it this way - the > other will remain a mystery at least for now. > > I appreciate the help from this forum - the official Informix site was > of no use at all. > > Paul Brown > Kalamazoo Public Schools > > > * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network * > The fastest and easiest way to search and participate in Usenet - Free! > >
I have recompiled the problem program with the I4GL compiler and it runs without incident. I will report the R4GL compiler problem as a bug, and search further for a cause as time permits. Thanks to all for the assistance.... * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network * The fastest and easiest way to search and participate in Usenet - Free!