FG-arithmetic error and moving objects [message #90449] |
Tue, 03 March 2015 04:23  |
Helder Marchetto
Messages: 520 Registered: November 2011
|
Senior Member |
|
|
Hi,
as already discussed in previous posts, I'm having trouble with annotations on images. I have a minimal example to show three problems.
First the example:
pro mouseMovetest
img = dist(500)
tlb = widget_base(/column)
wWindow = widget_window(tlb, xsize=500.0, ysize=500.0)
widget_control, tlb, /realize
widget_control, wWindow, get_value=oWin
io = image(img, image_dimensions=[500.0,500.0], current=oWin, margin=0)
nPoints = 100.0
points = (2.0 * !PI / float(nPoints-1.0)) * findgen(nPoints)
x = 0.5 + 0.2 * cos(points)
y = 0.5 + 0.2 * sin(points)
pl = polygon(x*500.0,y*500.0, '-b2', fill_background=0, /data, target=io)
pl = polyline([0.25,0.75]*500.0,[0.25,0.75]*500.0, '-r2', /data, target=io)
end
Now the problems:
1) If I select the circle (blue data) and I try to move it, I can only do that for specific mouse positions. These positions are not consistent with the line. Is this a feature or a bug?
2) I cannot move the line at all except if I try to rescale it. Is this a feature or a bug?
3) With the above code I get inconsistent math error messages that I cannot pin down to a specific operation. The errors look like:
% Program caused arithmetic error: Floating overflow
% Program caused arithmetic error: Floating illegal operand
% Detected at IDLITVISDATASPACE::DRAW 2385 C:\Program Files\Exelis\IDL84\IDL84\lib\itools\framework\idlitvisdatasp ace__define.pro
% Program caused arithmetic error: Floating overflow
% Detected at IDLITVISDATASPACE::DRAW 2385 C:\Program Files\Exelis\IDL84\IDL84\lib\itools\framework\idlitvisdatasp ace__define.pro
% Program caused arithmetic error: Floating illegal operand
% Detected at IDLITVISDATASPACE::DRAW 2385 C:\Program Files\Exelis\IDL84\IDL84\lib\itools\framework\idlitvisdatasp ace__define.pro
And it happens when I move the mouse to about the center of the image and click. *If* it happens once, then it keeps on throwing errors when moving the mouse on the image.
Notice that I set:
!DEBUG_PROCESS_EVENTS = 0
!EXCEPT = 2
before testing this code.
I reset IDL before I test.
The error happens with a frequency of ~1/10 to 1/20.
Last thing:
IDL> !version
{
"ARCH": "x86_64",
"OS": "Win32",
"OS_FAMILY": "Windows",
"OS_NAME": "MicrosoftWindows",
"RELEASE": "8.4",
"BUILD_DATE": "Sep272014",
"MEMORY_BITS": 64,
"FILE_OFFSET_BITS": 64
}
Cheers,
Helder
PS1: the references to the code I got by using !EXCEPT = 2
PS2: !EXCEPT = 2 makes IDL ~5% slower! For more details see:
http://www.exelisvis.com/docs/error_handling_system_va.html# sysvars_272074529_1002623
|
|
|