Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!dsinc!bagate!cbmvax!jesup From: jesup@cbmvax.commodore.com (Randell Jesup) Newsgroups: comp.sys.amiga.games Subject: Re: Storm Over Europe upgrade? Message-ID: <16748@cbmvax.commodore.com> Date: 22 Dec 90 04:38:03 GMT References: <1990Dec12.194113.9742@uokmax.ecn.uoknor.edu> <22188@well.sf.ca.us> Reply-To: jesup@cbmvax.commodore.com (Randell Jesup) Organization: Commodore, West Chester, PA Lines: 102 In article <22188@well.sf.ca.us> farren@well.sf.ca.us (Mike Farren) writes: >>but meanwhile back at the ranch SSI still hasn't set out the update for >>SOE. > >Well, SSI doesn't work like that. They don't send out upgrades automatically, >but if you call and ask, they'll get one to you. The current version of >SAE is 1.1, and does NOT fix the 2.0 bug. I still don't have a solid >fix for that one, and probably won't until I can get some solid time >on a 3000 system, which should happen before the end of January. My >apologies to everyone who is being hung up by this one. Apparently Peter Cherna's (Mr. Intuition) mail to you didn't get to you. I'm appending a (slightly modified) copy to this message - perhaps some others can avoid the same problem with 2.0. I'm sorry we didn't know our mail didn't get through; I didn't see any bounce, but who knows what might have happened to it... BTW, I applaud Mike's attempts to write well-behaved code, and to make sure fixes are made to correct problems. He sent us a copy of the suspect source code after it had been narrowed down. The more OS-friendly, HD-installable, 2.0 compatible games we see the happier we are (since I can't remember the last time I ran a 68000, and most of us no longer have that option - we rarely run 1.3 except for compatibility testing...) Randell [ Note: I changed a few phrasings in peter's message to make it more appropriate for posting here. - REJ ] From peter Fri Oct 12 20:59:36 1990 To: farren@well.sf.ca.us Subject: String-gadget activation problem Cc: jesup From your source clipping, look at getevent(). The code which pulls messages is broken. What it does is: 1. Discard all messages that are currently pending. 2. Get the next one. A routine like getevent() needs to do the following instead: 1. If a message is available, grab it, 2. Else wait for one to become available. Now note the following code snippet from gtname(): Request(>nameReq, Window); while(1) { getevent(); if(eventry.Class == REQSET) break; } Since getevent() is throwing away anything that is already waiting at the message port, there is a risk that the REQSET message will be discarded and you'll loop forever here. The race condition is between the set of events initiated by Request() that culminates in your task being signalled to the arrival of the REQSET message and you getting to the while-loop in getevent(). If the signal occurs first, you lose. It's possible that outcome of the race can depend on hardware, system configuration, and software version. [ Even under 1.3. Under 2.0, because of differences in the intuition state machine, it may always happen an all machines. - REJ ] Here's the offending section of code, and an example of what it should be: /* bad loop for getevent() */ while(ms = (struct IntuiMessage *)GetMsg(Window->UserPort)) ReplyMsg((struct Message *)ms); do { WaitPort(Window->UserPort); ms = (struct IntuiMessage *)GetMsg(Window->UserPort); } while (ms == NULL); /* good loop to use in its place */ ms = (struct IntuiMessage *)GetMsg(Window->UserPort); while (!ms) { WaitPort(Window->UserPort); ms = (struct IntuiMessage *)GetMsg(Window->UserPort); } Peter -- Peter Cherna, Software Engineer, Commodore-Amiga, Inc. {uunet|rutgers}!cbmvax!peter peter@cbmvax.cbm.commodore.com My opinions do not necessarily represent the opinions of my employer. "Television is a medium because it is neither rare nor well-done." -- Randell Jesup, Keeper of AmigaDos, Commodore Engineering. {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.commodore.com BIX: rjesup The compiler runs Like a swift-flowing river I wait in silence. (From "The Zen of Programming") ;-)