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