roland@sm.luth.se (Roland Hedberg) (03/30/88)
Hi ! I have a problem with TurboC, which I hope that someone can help me solve. The background is as follows ; I am developing a program in TurboC, I started with version 1.0 without graphics and planned to incorporate graphics when 1.5 became available. But when I now place initgraph in the beginning of main() , the PC locks up. The program is of medium size (the EXE-file is about 85K ) and is using a 12K stack, I use the large memory modell . I have recompiled the complete program with vers. 1.5 so there are no 1.0 code left. I don't think that there are any hardware problem since I am able to do a small program using graphics and it works without problem. I also have no problem with compiling and running bgidemo . The program is all C , no other language . If I use getgraph() first , then getgraph works like it should . The problem starts (an ends :-( ) with initgraph(). So,please help !! -- roland
platt@emory.uucp (Dan Platt) (04/02/88)
In article <1020@luth.luth.se> roland@sm.luth.se (Roland Hedberg) writes: > >... when I now place initgraph in the beginning of main() , the PC locks up. >... > >The program is all C , no other language . >If I use getgraph() first , then getgraph works like it should . >The problem starts (an ends :-( ) with initgraph(). > >So,please help !! >-- roland I've had problems with this at times; mostly because the initgraph() couldn't find the *.bgi files. Tip 1: use '/'s to indicate directories. Tip 2: check to see that the correct font was attempted to be loaded by checking the &itype or &imode (initgraph returns values which can be checked). If you don't check these, and the mode and driver weren't loaded, your program will hang. Dan Platt
mjs@ernie.Berkeley.EDU (Marc J. Sabatella) (04/03/88)
In article <1020@luth.luth.se> roland@sm.luth.se (Roland Hedberg) writes: > >... when I now place initgraph in the beginning of main() , the PC locks up. >... > >The program is all C , no other language . This is a known bug with the memory allocation routines in 3 of the libraries. There is a fix available on Compuserve called p12tc.arc; it includes the patch program used to apply the (numerous) bug fixes to version 1.0, the individual patch files, and a batch program which automates the process. I am not sure about the copyright policy on these published bug fixes, or I would post the file here (or mail it to those interested). There is no reference to copyright anywhere in the documentation files. Marc Sabatella mjs@ernie.Berkeley.EDU
rod@cpocd2.UUCP (Rod Rebello) (04/05/88)
In article <23495@ucbvax.BERKELEY.EDU> mjs@ernie.Berkeley.EDU.UUCP (Marc J. Sabatella) writes: >In article <1020@luth.luth.se> roland@sm.luth.se (Roland Hedberg) writes: >> >>... when I now place initgraph in the beginning of main() , the PC locks up. >>... >This is a known bug with the memory allocation routines in 3 of the libraries. >There is a fix available on Compuserve called p12tc.arc; it includes the >patch program used to apply the (numerous) bug fixes to version 1.0, the ^^^^^^^^^^^ If the problem is with the initgraph routine, then Roland is having a problem with version 1.5, not 1.0. I would not attempt to apply 1.0 patches to 1.5. The results would probably be very unpredictable. Does anyone know if the memory allocation bug was corrected in 1.5?
mjs@ernie.Berkeley.EDU (Marc J. Sabatella) (04/07/88)
In article <1224@cpocd2.UUCP> rod@cpocd2.UUCP (Rod Rebello) writes: > >In article <23495@ucbvax.BERKELEY.EDU> mjs@ernie.Berkeley.EDU.UUCP (Marc J. Sabatella) writes: >>In article <1020@luth.luth.se> roland@sm.luth.se (Roland Hedberg) writes: >>> >>>... when I now place initgraph in the beginning of main() , the PC locks up. >>>... >>This is a known bug with the memory allocation routines in 3 of the libraries. This IS referring to version 1.5; known effects are to cause lockup of initgraph() in some circumstances; this is almost CERTAINLY the cause of the problem Roland is experiencing [as a check: try the small memory model, or the tiny - the problem should not exist there]. >>There is a fix available on Compuserve called p12tc.arc; it includes the >>patch program used to apply the (numerous) bug fixes to version 1.0, the > ^^^^^^^^^^^ What I meant by this [ you mean you couldn't figure it out? :-) ] is that the SAME patch.com program that thousands of people already have been using to apply fixes to version 1.0 is also used to apply these fixes, which ARE for version 1.5. This is kind of a shame, because the individual fix files total around 1000 bytes, but the ARC file is considerably larger because it includes the patch program most Compuserve Borland users already have. This is still one of the few known bugs in version 1.5; certainly the only catastrophic one I am aware of, and a fix is available. ---------------------- ------------------------------ Marc Sabatella "I would prefer not to" mjs@ernie.Berkeley.EDU Bartleby the Scrivener ---------------------- ------------------------------
jpn@teddy.UUCP (John P. Nelson) (04/07/88)
>>>... when I now place initgraph in the beginning of main() , the PC locks up. >> >>There is a fix available on Compuserve called p12tc.arc > >If the problem is with the initgraph routine, then Roland is having a >problem with version 1.5, not 1.0. I would not attempt to apply 1.0 >patches to 1.5. The results would probably be very unpredictable. P12tc.arc is explicitly designated as a fix to TurboC version 1.5. All earlier patches apply to version 1.0 only. -- john nelson UUCP: {decvax,mit-eddie}!genrad!teddy!jpn ARPA (sort of): talcott.harvard.edu!panda!teddy!jpn
maurice@xanth.cs.odu.edu (Dale Ross Maurice) (04/08/88)
I don't know what any of the problems where with the GRAPHICS.LIB but... Borland shipped me, without any request, a single disk that contained an update for 1.5. It contained a new GRAPHICS.LIB and a new fflush for each of the memory models routine to fix a known bug. Also, there was a new MAKE. I know that some people where complaining about that also. I have no idea what the status is for posting something like this is so I won't. But you might try to give Borland a call. Dale -- ____________________________________________________________ Dale R. Maurice UUCP: maurice@xanth.UUCP Old Dominion University or maurice@xanth.cs.odu.edu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~