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

Home » Public Forums » archive » Re: Large widget identifiers
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: Large widget identifiers [message #33169] Fri, 13 December 2002 11:11 Go to next message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
"Ian Dean" <Ian.d.dean@baesystems.com> wrote

I see the same problem in IDL 5.4-5.6 on win2k sp-3. This seems to be
limited to Win2k and WinXP right now but I suspect that it affects all
versions and Bill didn't notice the "bug" in your initial test code.
Somewhere someone at RSI must have defined an uint instead of a long...

I would report this to RSI if you haven't already.

I think there is little you can do beyond restarting your application every
few days and waiting for 5.7. Who knows, maybe they'll release 5.6.1?

-Rick


> Hi,
> Has anyone come across widget IDs "wrapping" when they reach a short
int
> limit (65535)?
>
> We have a run-time IDL program that is running continuously for
days/weeks.
> During this time several runs of data are processed. Each run requires
> approximately 400 widgets. However, without wishing to exit the software,
> the runs are performed within one program.
>
> The problem occurrs when the widget ID reaches 65535, the next widget to
be
> created is 0, not 65536. This looks like a short int problem, but IDs are
> supposed to be long int.
>
> Is there a way under program control to reset the widget ID back to 1 at
the
> beginning of a run?
> I realise using the development environment .reset achieves this, but that
> cannot be used in a running program.
>
> This occurrs on IDL PC versions 5.2-5.5. However, it does not happen on
> OpenVMS versions.
>
> The following lines will cause the error to occur:-
>
> FOR J=0L, 50000L DO BEGIN
> Base=WIDGET_BASE()
> WIDGET_CONTROL, Base, /DESTROY
> ENDFOR
>
> Any suggestions would be welcome
> Regards,
> Ian
>
>
Re: Large widget identifiers [message #33171 is a reply to message #33169] Fri, 13 December 2002 10:41 Go to previous messageGo to next message
David Burridge is currently offline  David Burridge
Messages: 33
Registered: January 1998
Member
Hi Ian,

I'm running IDL 5.5 on Windows XP and I see the problem too. Your example
numbers were too low for me though, as your example only goes up to 50,000
and the error is at 65,000. I did this:

PRO widget_test

CATCH, error
IF (error NE 0) THEN BEGIN
CATCH, /CANCEL
PRINT, 'Error with base ID transition:', lastB, ' to ', Base
RETURN
ENDIF

FOR J=0L, 70000L DO BEGIN
Base=WIDGET_BASE()
WIDGET_CONTROL, Base, /DESTROY
lastB = base
ENDFOR

END

And got the results:

IDL> widget_test
Error with base ID transition: 65535 to 0


Looks like it's getting converted to an unsigned short somewhere! Not sure
waht the fix is, though. Are you sure it matters? As I'm sure you know, IDL
allocates pretty much sequentially in my experience, so provided you never
have 65536 active widgets you never hit a problem ... do you?

Cheers,

Dave



David Burridge

Burridge Computing

18 The Green South

Warborough

Oxon

OX10 7DN



Tel: 01865 858279

Mobile: 0780 244 1748

Email: davidb@burridgecomputing.co.uk


"Ian Dean" <Ian.d.dean@baesystems.com> wrote in message
news:3df9bce2$1@baen1673807.greenlnk.net...
> Hi,
> Has anyone come across widget IDs "wrapping" when they reach a short
int
> limit (65535)?
>
> We have a run-time IDL program that is running continuously for
days/weeks.
> During this time several runs of data are processed. Each run requires
> approximately 400 widgets. However, without wishing to exit the software,
> the runs are performed within one program.
>
> The problem occurrs when the widget ID reaches 65535, the next widget to
be
> created is 0, not 65536. This looks like a short int problem, but IDs are
> supposed to be long int.
>
> Is there a way under program control to reset the widget ID back to 1 at
the
> beginning of a run?
> I realise using the development environment .reset achieves this, but that
> cannot be used in a running program.
>
> This occurrs on IDL PC versions 5.2-5.5. However, it does not happen on
> OpenVMS versions.
>
> The following lines will cause the error to occur:-
>
> FOR J=0L, 50000L DO BEGIN
> Base=WIDGET_BASE()
> WIDGET_CONTROL, Base, /DESTROY
> ENDFOR
>
> Any suggestions would be welcome
> Regards,
> Ian
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.404 / Virus Database: 228 - Release Date: 15/10/2002
Re: Large widget identifiers [message #33178 is a reply to message #33171] Fri, 13 December 2002 09:37 Go to previous messageGo to next message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
Hmmm, I tried your example in IDL 5.4 under both Digital Unix and Windows 95,
and couldn't reproduce your error. Could it depend on the version of Windows
used?

William Thompson


"Ian Dean" <Ian.d.dean@baesystems.com> writes:

> Hi,
> Has anyone come across widget IDs "wrapping" when they reach a short int
> limit (65535)?

> We have a run-time IDL program that is running continuously for days/weeks.
> During this time several runs of data are processed. Each run requires
> approximately 400 widgets. However, without wishing to exit the software,
> the runs are performed within one program.

> The problem occurrs when the widget ID reaches 65535, the next widget to be
> created is 0, not 65536. This looks like a short int problem, but IDs are
> supposed to be long int.

> Is there a way under program control to reset the widget ID back to 1 at the
> beginning of a run?
> I realise using the development environment .reset achieves this, but that
> cannot be used in a running program.

> This occurrs on IDL PC versions 5.2-5.5. However, it does not happen on
> OpenVMS versions.

> The following lines will cause the error to occur:-

> FOR J=0L, 50000L DO BEGIN
> Base=WIDGET_BASE()
> WIDGET_CONTROL, Base, /DESTROY
> ENDFOR

> Any suggestions would be welcome
> Regards,
> Ian
Re: Large widget identifiers [message #33180 is a reply to message #33178] Fri, 13 December 2002 08:32 Go to previous messageGo to next message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
Does not happen on a Mac. Watching the IDs in the Variable Watch window,
I see them go to over 100,000 with no problems. Must be a Windows bug.
Cheers,
Pavel

Ian Dean wrote:
>
> The following lines will cause the error to occur:-
>
> FOR J=0L, 50000L DO BEGIN
> Base=WIDGET_BASE()
> WIDGET_CONTROL, Base, /DESTROY
> ENDFOR
Re: Large widget identifiers [message #33268 is a reply to message #33169] Fri, 13 December 2002 11:57 Go to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
"Rick Towler" <rtowler@u.washington.edu> writes:


> "Ian Dean" <Ian.d.dean@baesystems.com> wrote

> I see the same problem in IDL 5.4-5.6 on win2k sp-3. This seems to be
> limited to Win2k and WinXP right now but I suspect that it affects all
> versions and Bill didn't notice the "bug" in your initial test code.
> Somewhere someone at RSI must have defined an uint instead of a long...

Yes, you're right, I didn't notice that "bug". With the correct number of
loops, it still works correctly in Digital Unix, but I now see the error under
Windows 95. Both were done with IDL/v5.4.

Bill Thompson
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: POLYSHADE-like object graphics?
Next Topic: Re: 5.6 goodies, R.I.P. REDUCE

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

Current Time: Wed Oct 08 13:04:33 PDT 2025

Total time taken to generate the page: 0.01945 seconds