home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 142 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: comma.rhein.de!serpens!not-for-mail
  2. From: mlelstv@serpens.rhein.de (Michael van Elst)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Layers problem
  5. Date: 3 Jan 1996 14:43:31 +0100
  6. Organization: dis-
  7. Message-ID: <4ce163$hjj@serpens.rhein.de>
  8. References: <4cdrup$gqj@ousrvr3.oulu.fi>
  9. NNTP-Posting-Host: serpens.rhein.de
  10.  
  11. kinnunen@stekt.oulu.fi (Teijo Kinnunen) writes:
  12.  
  13. >I have a bizarre problem with using layers.library, which I haven't yet
  14. >been able to solve.
  15.  
  16. >    DeleteLayer(0,la);
  17.  
  18. This is the culprit.
  19.  
  20. >Anyway, it does not work. The allocation seems to work fine, but the
  21. >FreeBitMap() call corrupts memory. (At least if the program is run a
  22. >couple of times. Enforcer can be used, but Mungwall causes the bug to
  23. >vanish.)
  24.  
  25. DeleteLayer erases the region that the layer did occupy. This
  26. may or may not cause some blitter activity. You must not free
  27. the bitmap until the queued blitter operation has finished.
  28.  
  29. A WaitBlit() before calling FreeBitMap() should solve your problem.
  30.  
  31. Another possibility is to install a dummy backfill hook for the
  32. Layer_info with InstallLayerInfoHook().
  33.  
  34. Regards,
  35. -- 
  36.                                 Michael van Elst
  37.  
  38. Internet: mlelstv@serpens.rhein.de
  39.                                 "A potential Snark may lurk in every tree."
  40.