Re: Can't create pixmap [message #14690] |
Tue, 23 March 1999 00:00  |
philaldis
Messages: 32 Registered: March 1999
|
Member |
|
|
Below this message you will find some code which will see if the bug
is repeatable on other machines. I've tried on both 5.1.1 and 5.2 on a
NT PC. They both had the bug. I tried on a solaris workstation running
5.1.1 but that crashed because the systme had actually run out of
memory. The code automatically detects if the bug is in evidence using
error catching and tells you so. Just try it and post the results,
I've just contacted RSI as well.
It seems to me to be a very strange bug. I ran the bugtest prog on my
64 MB RAM machine with about 300MB of page file space. When the
program crashed after about 600 loops, I created 2 windows which were
(10000,1000) pixels big which used about 30-40MB, but no "unable to
create pixmap". Truly Bizarre!
The problem seems to be if you create windows of the same size, as a
similar program with random sizes hit against genuine memory problems.
Cheers,
Phil Aldis
------------------------------------------------------------ ---------------------------------------------------
Testbug.pro
------------------------------------------------------------ ---------------------------------------------------
PRO TestBug
CATCH, error
IF error NE 0 THEN BEGIN
IF flag EQ 0 THEN BEGIN
Print, 'Okay now let''s create a very large
window....'
Print, ''
flag=1
Window, /FREE, /PIXMAP, XS=1000, YS=1000
Print, 'If that worked then you''ve managed to
replicate the bug'
Print, '...because the system can still create pixmaps
of certain sizes.
Print, ''
Print, 'However, it still claims that it is "unable to
create pixmap"'
Print, ''
Print, 'Finally clear up all the other pixmaps'
Wdelete, !d.window
FOR i=0, N_Elements(Wids)-1 DO BEGIN
IF Wids[i] NE 0 THEN Wdelete, Wids[i]
ENDFOR
RETURN
ENDIF ELSE BEGIN
CATCH, /CANCEL
Print, 'You couldn''t create a pixmap because of
memory shortages'
Print, ''
Print, 'Finally clear up the pixmaps'
FOR i=0, N_Elements(Wids)-1 DO BEGIN
IF Wids[i] NE 0 THEN Wdelete, Wids[i]
ENDFOR
RETURN
ENDELSE
ENDIF
flag=0
pixmap_sizes = [215.,215.]
Repeats = 600
Wids = LonArr(Repeats)
FOR i=0, Repeats-1 DO BEGIN
Window, /FREE, /PIXMAP, XS=pixmap_sizes[0], YS=pixmap_sizes[1]
Wids[i] = !d.window
ENDFOR
Print, 'Okay you''ve got through this time. Try increasing Repeats'
Print, 'Finally clear up all the pixmaps'
FOR i=0, N_Elements(Wids)-1 DO BEGIN
IF Wids[i] NE 0 THEN Wdelete, Wids[i]
ENDFOR
END
|
|
|