home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / amiga / programm / 12422 < prev    next >
Encoding:
Internet Message Format  |  1992-08-17  |  2.8 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!ucbvax!IFI.UIO.NO!jkr
  2. From: jkr@IFI.UIO.NO (Johan Kristian Rosenvold)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Reentrancy problem - Help Needed
  5. Message-ID: <199208181030.AAyrsa.ifi.uio.no13575@yrsa.ifi.uio.no>
  6. Date: 18 Aug 92 10:30:00 GMT
  7. Sender: daemon@ucbvax.BERKELEY.EDU
  8. Lines: 52
  9.  
  10. I'm using an interrupt based colour-cycler in my program. It's loosely
  11. based on Dan Silvia's CYCVB from the RKMs.  (Modified so that the cycling
  12.  loops don't call GETRGB4 + some more stuff). The only external routine 
  13. my VB-interrupt routine calls is LoadRGB4().
  14.  
  15. I have ( more or less - 99.9 %) excluded a pure programming bug for 
  16. numerous reasons.
  17.  
  18. My main program calls a huge variety of exec/gadtools/intuition/graphics/dos++
  19. library functions including LoadRGB4 & OpenScreenTagList and some pretty 
  20. heavy calling to makevport.(All of this while my interrupts are running,
  21. Obviously my interrupts aren't directed at the screen that's being opened).
  22.  
  23. My program crashes gorgeously, about 50% of the time the machine just
  24. freezes stone cold. On the occations I actually get a guru message
  25. owner/lvo often give me a crash in "exec internal rountine 4",
  26. which is not informative at all :-) 
  27. (While it's running,- but It's obviously not active on the screen I'm opening)
  28. The problem also seems to be pretty timing-related, as the program never
  29. crashes on the 3000 but always on the 500+/600, most often when there's no
  30. fast-ram.
  31.  
  32. What I'm looking for is stuff like:
  33. - Would a routine like OPenScreenTag return a Screen pointer BEFORE there
  34.   actually is a valid screen in the other end ? (Which could account for
  35.   the program running better on faster machines)
  36.   (YES, I know - I'm being paranoid. Take it from a guy that spent
  37.    HOURS finding out the OpenScreen doesn't update the screen->DHeight 
  38.    parameter until the actual screen is brought to FRONT)
  39.  
  40. - If the multi-tasker stops my main program in the middle of an OpenScreen
  41.   /LoadRGB4 call could it be confused by the fact that my interrupts ALSO
  42.   call this routine (LoadRGB4) ?
  43.  
  44. - Are there any known reentrancy problems with the Amiga ?
  45.  
  46. I'll avoid posting source code for now since this thing is BIG and the 
  47. problem is definitely related to the LoadRGB4 command
  48. in the Interrupt based routine. (I remove the LoadRGB4 from the interrupts
  49. & voila, it works !!. I can even do a WaitTOF(), LoadRGB from my main
  50. program *using the colour palettes from the interrupt routine* and it'll work)
  51.  
  52. One last word. The program can crash after 3 seconds, 3 minutes, 3 hours
  53. or 3 days. There's no pattern to it. And yes, it passes enforcer, mungwall,
  54. io_torture & eatmem. Eatcycles promotes crashes, although I'll have to go
  55. to 90-95% load to get them reliably (at that load i actually think the amiga
  56. crashes reliably even without my program in it :-). Oh yes, it's WB2.04.
  57.  
  58.  
  59. Kristian Rosenvold, jkr@ifi.uio.no
  60.  
  61.  
  62.