nancie@hal.CSS.GOV (Nancie Matson) (11/21/89)
I am writing an application program using the Xlib to create a multiple selection scrolling pop-up menu. I'm using calls like XDrawLines, XDrawRectangles, and XFillRectangles, etc to create the structure, but every time I run the program I get asin: DOMAIN error printed to the console window. I stepped through the program with the debugger , but found that the error is not caused by a single call, sometimes it was caused by XAllocateNamedColor and other times it was caused by XDrawRectangle. Does anyone have any thoughts about this error. It doesn't affect the functionality, but I'm still concerned, that I am doing something incorrectly. I am running the X server on a Sun 3/110 with 4meg of memory and OS4.0.3. I am not using any thing from the toolkit, only Xlib calls. Any input would be valued. THANX in advance. nancie nancie@hal.CSS.GOV
klee@chico.pa.dec.com (Ken Lee) (11/21/89)
In article <193@hal.CSS.GOV>, nancie@hal.CSS.GOV (Nancie Matson) writes: > I'm using calls like > XDrawLines, XDrawRectangles, and XFillRectangles, etc to create > the structure, but every time I run the program I get > asin: DOMAIN error > printed to the console window. I stepped through the program > with the debugger , but found that the error is not caused > by a single call, Make sure you use synchronous mode when stepping through your program. I suspect your random results are caused by Xlib buffering. Anyway, the asin error is probably a bug in your server. Some of the arc and wide line end cap code uses the asin function. By default, asin prints the error you mention if it is called with an invalid argument. Ken Lee DEC Western Software Laboratory, Palo Alto, Calif. Internet: klee@decwrl.dec.com uucp: uunet!decwrl!klee
doyle@b11.ingr.com (Doyle Davidson) (11/23/89)
In article <193@hal.CSS.GOV>, nancie@hal.CSS.GOV (Nancie Matson) writes: > but every time I run the program I get > asin: DOMAIN error > printed to the console window. > > Does anyone have any thoughts about this error. I have seen this before and as best I can remember, it occurs in lines with join style = JoinRound and line width of 1 (might have happened with width=0 too but I don't think so). There is some code in the round end cap routine that does something like: foo = width / 2; ... val = asin(1.0 / foo); And for width of one this produces asin(1.0 / (1/2)) == asin(2.0) !!! Try changing your line width or join style and see if it goes away. If not, then it's something else! Doyle ------------------------------------------------------------------ Doyle C. Davidson | Intergraph Corp. | These comments are... Workstation Graphics Standards | 1 Madison Industrial Park | Huntsville, AL 35806 | (205) 772-2000 | X-clusively my own. | ..!uunet!ingr!b11!doyled!doyle | ------------------------------------------------------------------