[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

1904.0. "process hangs at CloseWindow" by STKEIS::LJONSSON () Wed Nov 23 1988 02:52

    Hi!
    
      I wrote a program that displays ACBM files i C (translation of
    LoadACBM.bas found on Extras: disk). It works fine except for one
    thing : the process hangs at the end of the program just before I
    do a CloseWindow, any lines before the CloseWindow are always
    executed. He doesn't seem to take any CPU, I can start other
    processes after the program is run and not have any problems (except
    possibly memory problems since the program allocates a lot of that).
    The program doesn't always hang. If the ACBM file uses colorcycling
    then there is no problem ie. if the program runs through a certain
    loop before then CloseWindow, then he exits very nicely.
    
      I have an AMIGA 500 kickstart 1.2 and use Lattice C 4.1.
    Unfortunately I can't supply the code but you can look at the
    LoadACBM.bas, my program is almost a direct translation.
    
      Any idea of what the problem could be ? A bug in Lattice C 4.1 ?
    
    /Lars
T.RTitleUserPersonal
Name
DateLines
1904.1Almost definately a 100% solution...HPSTEK::SENNAWed Nov 23 1988 10:129
    ...Geez Lars, I'd be more than willing to help but *ALMOST* ???
    
    Many things are almost in life...but if you look at things as computers
    do (digitally), you realize a one is a one a zero is a zero and
    almost the same as different!!! 
    
    Hey that was almost profound!!!
    
               Without the code, its useless....  Tom
1904.2Forget to deallocate??RAVEN1::EVERHARTWed Nov 23 1988 12:4615
    I agree with .1.  It's almost impossible to find the error without
    seeing the code, but you can almost bet that you've forgotten to
    free something that was allocated.  It might be a window, a screen,
    a rastport, a console, or anything else.  The best way to check
    for freeing used areas is to just undo everything you did...in reverse
    order.
    
    Remember, if you forget to free something (close a window) in BASIC,
    it is automatically done for you when you quit.  In C, you have
    to do everything yourself, so if the basic program doesn't do it,
    you might still have to.  I hope this helps.  I have a headache,
    so i don't know if it makes much sense.
    
     - Chris