comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Can't create pixmap
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Can't create pixmap [message #14690] Tue, 23 March 1999 00:00
philaldis is currently offline  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
Re: Can't create pixmap [message #14701 is a reply to message #14690] Mon, 22 March 1999 00:00 Go to previous message
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
Senior Member
Phil Aldis wrote:
>
> Okay, now this is just silly
>
> I'm fully aware that the message can't create pixmap means that you've
> run out of memory. However this is never a message I get because my NT
> machine seems to be able to cope with using ordinary memory and in
> fact goes into page file space and if it runs out of that, well
> windows doesn't like that.
>
> However, I keep getting it and I could understand that if there was no
> memory left however I'm getting it when I create pixmaps of certain
> sizes. It's in an animation routine that the error occurs. It crashes
> out of the program with 'can't create pixmap'. The size of pixmap is
> 210x230, or something like that. If I create a 200x200 pixmap or
> 500x500 pixmap it's okay but as soon as you get close to the 210x230
> size it gives the previous error message.
>
> What is going on and more importantly what can be done to stop it,
> short of c not creating pixmaps of a certain size.
>
> I'm running IDL 5.1.1 on an NT 4.0 machine.
>
> Cheers,
> Phil


hmmm... just a thought: could it be that you are using integer values at
some point where there should be long's ? Then IDL would try to create a
pixmap with a negative number of elements...
This has happened to me a few times (although not with pixmaps), and you
can avoid it by explicitely "declaring" your variables as e.g. N=40000L
.

Martin.

--
------------------------------------------------------------ -------
Dr. Martin Schultz
Department for Engineering&Applied Sciences, Harvard University
109 Pierce Hall, 29 Oxford St., Cambridge, MA-02138, USA

phone: (617)-496-8318
fax : (617)-495-4551

e-mail: mgs@io.harvard.edu
Internet-homepage: http://www-as.harvard.edu/people/staff/mgs/
------------------------------------------------------------ -------
Re: Can't create pixmap [message #14704 is a reply to message #14701] Mon, 22 March 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Phil Aldis (philaldis@geocities.com) writes:

> I'm fully aware that the message can't create pixmap means that you've
> run out of memory. However this is never a message I get because my NT
> machine seems to be able to cope with using ordinary memory and in
> fact goes into page file space and if it runs out of that, well
> windows doesn't like that.
>
> However, I keep getting it and I could understand that if there was no
> memory left however I'm getting it when I create pixmaps of certain
> sizes. It's in an animation routine that the error occurs. It crashes
> out of the program with 'can't create pixmap'. The size of pixmap is
> 210x230, or something like that. If I create a 200x200 pixmap or
> 500x500 pixmap it's okay but as soon as you get close to the 210x230
> size it gives the previous error message.

I can't duplicate this behavior in IDL 5.2 on a Windows NT 4 machine.
But if you can reliably reproduce it, I'd say it looks like a bug.
Have you contacted RSI?

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Can't create pixmap [message #14706 is a reply to message #14701] Mon, 22 March 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Phil Aldis (philaldis@geocities.com) writes:

> I'm fully aware that the message can't create pixmap means that you've
> run out of memory. However this is never a message I get because my NT
> machine seems to be able to cope with using ordinary memory and in
> fact goes into page file space and if it runs out of that, well
> windows doesn't like that.
>
> However, I keep getting it and I could understand that if there was no
> memory left however I'm getting it when I create pixmaps of certain
> sizes. It's in an animation routine that the error occurs. It crashes
> out of the program with 'can't create pixmap'. The size of pixmap is
> 210x230, or something like that. If I create a 200x200 pixmap or
> 500x500 pixmap it's okay but as soon as you get close to the 210x230
> size it gives the previous error message.

I can't duplicate this behavior in IDL 5.2 on a Windows NT 4 machine.
But if you can reliably reproduce it, I'd say it looks like a bug.
Have you contacted RSI?

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Can't position modal compound widget (such as cw_form)
Next Topic: Re: Getting File creation data/time

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 14:55:36 PDT 2025

Total time taken to generate the page: 0.08148 seconds