Re: Large widget identifiers [message #33169] |
Fri, 13 December 2002 11:11  |
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   |
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   |
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 #33268 is a reply to message #33169] |
Fri, 13 December 2002 11:57  |
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
|
|
|