spitz@parc.xerox.com (Larry Spitz) (04/26/91)
I am not sure if this is the proper newsgroup for this message.
I have a problem with some code converted to XView.
The only change I made to the working conversion of a SunTools program
is as follows.
I moved the line of code: screen_pw = canvas_pixwin(mainCanvas);
from before the line: window_main_loop(mainFrame);
to after that line (but it doesn't seem to change the problem)
After that I do the following:
ret = pw_rop(screen_pw,0,0,win_rect.r_width,win_rect.r_height,PIX_CLR,NULL,0,0);
This clears (an already clear) pixwin and does so without generating an error
Later I do the following:
pw_lock(screen_pw,&win_rect);
This causes a segmentation fault
If I remove that line of code, the next to do an operation on a pixwin is:
pw_rop(screen_pw,left,top,w,h,PIX_SET,NULL,0,0);
This too causes a segmentation fault although it is in essence identical to
the pw_rop() which was successful.
Using dbxtool screen_pw looks like a pointer.
Looking at *screen_pw yields garbage, viz:
*screen_pw = {
pw_ops = 0xf0a58142
pw_opshandle = 0x20908 ""
pw_opsx = 304264
pw_opsy = 303976
pw_fixup = {
rl_x = 4
rl_y = -23656
rl_head = (nil)
rl_tail = 0x20
rl_bound = {
r_left = 2338
r_top = 8232
r_width = 0
r_height = 0
}
}
pw_pixrect = 0x404e0a01
pw_prretained = 0x4e348
pw_clipops = (nil)
pw_clipdata = (nil)
pw_cmsname = "( )
"
}
Any help would be appreciated.
Larry
--
Larry Spitz Xerox PARC Spitz@parc.xerox.com
415-494-4216 415-494-4241 Fax