Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!uunet!mcsun!ukc!strath-cs!prlhp1!blanchar From: blanchar@prlhp1.prl.philips.co.uk (blanchar) Newsgroups: comp.windows.open-look Subject: Re: XView scrolling list bug? Summary: A fix for scrolling bug? Message-ID: <1272@prlhp1.prl.philips.co.uk> Date: 4 Mar 91 09:46:22 GMT References: <23080@hydra.gatech.EDU> Reply-To: blanchar@prl.philips.co.uk Organization: Philips Research Laboratories, Redhill, UK Lines: 51 In article <23080@hydra.gatech.EDU>, gw18@prism.gatech.EDU (Greg Williams) writes: > > The following program produces an intermitant "Memory fault" crash. Its > occuring sometime before the routine "dir_proc" is called. The crash is > somewhere inside "xv_get". It takes a few minutes of playing and changing > directories to get the initial crash, but after it crashes once, I can > usually reproduce the crash, but not every time. I've run this code on a > 4/65 and a 4/490, and get the same error. I'm running Open Windows as > supplied by Sun. Can anyone tell me if I'm doing something wrong with > the XView code? The crash occurs too often to ignore it. I appreciate any > and all help I get. > > ----code begins here---- I did a very similar thing but with only one scrolling list and had the same problem. This is where the problem is I think..... > /* > * Hide the scroll lists while re-computing the lists. Saves on re-draw > * time. > */ > > xv_set(pi_dir, > XV_SHOW, FALSE, > NULL); > > xv_set(pi_file, > XV_SHOW, FALSE, > NULL); > ETC.. What I did was this. xv_set(list,XV_SHOW,FALSE,NULL); xv_destroy_safe(list); create_list(list); /* create_list() is easy if you're using guide since it generates functions to create all it's objects and all you have to do is call the correct one */ xv_set(list,XV_SHOW,FALSE,NULL); /* this last XV_SHOW,FALSE is here to make sure it doesn't show the list until it is completed */ Then add the entries to the list as before. You don't need the PANEL_LIST_INSERT if it's going at the end. xv_set(list,XV_SHOW,TRUE,NULL); I hope this helps. It worked for me! Simon Blanchard