It is currently Mon Apr 15, 2024 8:17 am


All times are UTC - 5 hours [ DST ]


Switch to mobile style

Post new topic Reply to topic  [ 91 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: Need Assistance Testing Another Simple Script
PostPosted: Sat Apr 18, 2015 10:21 am  (#21) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13001
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
So why am I getting the same results for each test?

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Need Assistance Testing Another Simple Script
PostPosted: Sat Apr 18, 2015 10:27 am  (#22) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
Wait and see what happens when some more Windows users come on line to try it. If some of them have the same results as you then it is a real question mark as to what is going on.

_________________
Image


Top
 Post subject: Re: Need Assistance Testing Another Simple Script
PostPosted: Sat Apr 18, 2015 10:40 am  (#23) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
I confirm Wallace's tests: both results are 0 using Windows 7 32-bits

_________________
"Where am I ?"


Top
 Post subject: Re: Need Assistance Testing Another Simple Script
PostPosted: Sat Apr 18, 2015 10:43 am  (#24) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13001
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
molly wrote:
Wait and see what happens when some more Windows users come on line to try it. If some of them have the same results as you then it is a real question mark as to what is going on.

What is going on anyway? :puzzled

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Need Assistance Testing Another Simple Script
PostPosted: Sat Apr 18, 2015 10:53 am  (#25) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
Sometimes, I get a zero result from the spinner in Linux. More often than not, I get a non-zero result.

For Windows users, I'd guess you'd have to run the test quite a few times to be sure that you never see a non-zero result. What appears to be happening is that when the spinner is used to move to zero, the value it's not being set to exactly zero all the time. Why, is a mystery.

When you're writing scripts expecting the input to be exactly zero, you'd better get exactly zero or bad things can happen. :hehe

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: Need Assistance Testing Another Simple Script
PostPosted: Sat Apr 18, 2015 11:19 am  (#26) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
Looks like it is narrowed down to 32 bits and 64 bits on windows. I think we need another windows 64 bit test now.

_________________
Image


Top
 Post subject: Re: Need Assistance Testing Another Simple Script
PostPosted: Sat Apr 18, 2015 11:22 am  (#27) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13001
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
GnuTux wrote:
Sometimes, I get a zero result from the spinner in Linux. More often than not, I get a non-zero result.

For Windows users, I'd guess you'd have to run the test quite a few times to be sure that you never see a non-zero result. What appears to be happening is that when the spinner is used to move to zero, the value it's not being set to exactly zero all the time. Why, is a mystery.

When you're writing scripts expecting the input to be exactly zero, you'd better get exactly zero or bad things can happen. :hehe

So 0 value for both tests is good right?

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Need Assistance Testing Another Simple Script
PostPosted: Sat Apr 18, 2015 11:43 am  (#28) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
Yes. You want to see zero in all cases.

All the script is doing is printing out that value entered. So far, we can confirm that Linux is displaying the incorrect (non-zero) value most of the time. Unless Molly is mistaken, she has reported that she got the incorrect (non-zero) value in both Linux and Windows.

You and dinasset have reported that you always get zero in Windows, which is what you should be getting.

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: Need Assistance Testing Another Simple Script
PostPosted: Sat Apr 18, 2015 11:47 am  (#29) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13001
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
GnuTux wrote:
Yes. You want to see zero in all cases.

All the script is doing is printing out that value entered. So far, we can confirm that Linux is displaying the incorrect (non-zero) value most of the time. Unless Molly is mistaken, she has reported that she got the incorrect (non-zero) value in both Linux and Windows.

You and dinasset have reported that you always get zero in Windows, which is what you should be getting.

Do you think the non-zero value results has something to do with a native script and not with a user installed script?

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Need Assistance Testing Another Simple Script
PostPosted: Sat Apr 18, 2015 12:02 pm  (#30) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
All this script does is display the input slider/spinner (which is a predefined Script-Fu procedure) and then prints the results when you click OK. That's it. Whatever is happening is something internal to GIMP/Script-Fu.

It's possible that it doesn't affect Windows but I doubt that's the case. This is not the first time I've ran across these kinds of strange things and sometimes, it's just harder to confirm the weirdness is occurring across all OS's.

Here's another example of a bug that cannot be consistently reproduced in Windows and Linux, but it's there.

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: Need Assistance Testing Another Simple Script
PostPosted: Sat Apr 18, 2015 12:09 pm  (#31) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13001
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
GnuTux wrote:
All this script does is display the input slider/spinner (which is a predefined Script-Fu procedure) and then prints the results when you click OK. That's it. Whatever is happening is something internal to GIMP/Script-Fu.

It's possible that it doesn't affect Windows but I doubt that's the case. This is not the first time I've ran across these kinds of strange things and sometimes, it's just harder to confirm the weirdness is occurring across all OS's.

Here's another example of a bug that cannot be consistently reproduced in Windows and Linux, but it's there.

Strange... :?

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Need Assistance Testing Another Simple Script
PostPosted: Sat Apr 18, 2015 12:12 pm  (#32) 
Offline
Global Moderator
User avatar

Joined: Nov 16, 2011
Posts: 5128
Location: Metro Vancouver, BC
Here's a variation of the test on Linux.
1. Spinner set directly to 0
Test Zero Warning
Value: 1.387778781e-16

2. Spinner advanced to 1.1 and then to 0
Test Zero Warning
Value: 0

The second result was consistent using other +1.0 values before running the test at 0. I've run this test using reset between #1 & #2 and only running test #2 on a new image.

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
 Post subject: Re: Need Assistance Testing Another Simple Script
PostPosted: Sat Apr 18, 2015 12:28 pm  (#33) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
Went back to windows again and ran 4 times with the spinner and 4 times with the slider.
Here are my results. The top window was with the spinner and the bottom with the slider.
Image

_________________
Image


Top
 Post subject: Re: Need Assistance Testing Another Simple Script
PostPosted: Sat Apr 18, 2015 12:34 pm  (#34) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
Ok, thanks Molly. That confirms the bug is occurring in both Windows and Linux.

I created a little video that demonstrates how using the spinner to set to zero sometimes displays the correct value and sometimes doesn't.

www.youtube.com Video from : www.youtube.com

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: Need Assistance Testing Another Simple Script
PostPosted: Sat Apr 18, 2015 12:46 pm  (#35) 
Offline
GimpChat Member
User avatar

Joined: Nov 15, 2014
Posts: 866
I have run this several times. The first time I got a non-zero value with the spinner, zero with the slider. Second time I got non-zero value with the spinner, without restarting GIMP I set to a value with the spinner, then zeroed with the slider and got a non-zero value. Every subsequent attempt I have zero both ways. (I close and re-open GIMP between each test.)

This is with Ubuntu 14.04LTS and GIMP 2.8.

I shall leave the computer running and check later if you wish me to do further tests.

david.


Top
 Post subject: Re: Need Assistance Testing Another Simple Script
PostPosted: Sat Apr 18, 2015 12:55 pm  (#36) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
@David - Thanks for testing. I'd say we have enough Linux tests to confirm that there is something wrong here.

@Odin - You're right. If I move the spinner up, then back down to zero, I get a zero result. I also noticed when moving the slider and the spinner up and down, then using the spinner to move to zero, I sometimes get a really outlandish result, like this:

Test Zero Warning
Value: 4.718447855e-15

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: Need Assistance Testing Another Simple Script
PostPosted: Sat Apr 18, 2015 1:29 pm  (#37) 
Offline
Script Coder
User avatar

Joined: Dec 27, 2014
Posts: 508
Looks like it is a GTK problem after all (as my first tests suggested, but later tests counter-suggested!)
I've now hacked a copy of the Script-Fu plugin to show the actual double float values returned from the GTK spinbutton.
Starting at 1.0 (indicated) and stepping down (in steps of 0.1), these are the values actually passed to the Script-Fu plugin:
1.00000000000000000000
0.90000000000000002220
0.80000000000000004441
0.70000000000000006661
0.60000000000000008882
0.50000000000000011102
0.40000000000000013323
0.30000000000000015543
0.20000000000000014988
0.10000000000000014433
0.00000000000000013878
-0.09999999999999986677
-0.19999999999999987232
-0.29999999999999987788
-0.39999999999999991118


Top
 Post subject: Re: Need Assistance Testing Another Simple Script
PostPosted: Sat Apr 18, 2015 1:46 pm  (#38) 
Offline
GimpChat Member
User avatar

Joined: Jan 31, 2015
Posts: 146
Linux 64-bit:

Image


Top
 Post subject: Re: Need Assistance Testing Another Simple Script
PostPosted: Sat Apr 18, 2015 2:01 pm  (#39) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
Things seem to work fine on 32-bit GNU/Linux; it is only on 64-bit GNU/Linux that the anomalous behavior was exhibited. I'd expect the same is true on Microsoft OSes, but have no way of testing.

The 'spin up' button on the spinner appears to be the culprit that actually introduces the "imprecision". That is to say, starting from a "precise" value, the 'spin down' button by itself never seems to result in the near-zero anomaly. There is no way to see that the imprecision has been introduced, other than by spinning it down to zero.

Explicit numeric entry, slider stepping, and slider dragging all result in a precise value being set -- after the value has been set using one of these methods, the near-zero anomaly will not occur by using the spin down button. It is only when a spin up button press is introduced into the flow that the possibility of the near-zero anomaly exists (even though it can only become apparent by following the spin up with a spin down).

I have looked at the Script-fu source code and see nothing amiss. It would be interesting to see the same testing performed with Python-fu. I suspect that this is a problem with GTK+ and that somewhere a float value is being read as a double (or a double is being read as a long double).

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Need Assistance Testing Another Simple Script
PostPosted: Sat Apr 18, 2015 2:08 pm  (#40) 
Offline
GimpChat Member
User avatar

Joined: Dec 02, 2012
Posts: 203
Location: Cantabria, Spain
My results


Attachments:
test_zero.png
test_zero.png [ 115.44 KiB | Viewed 2125 times ]

_________________
Image



My Gimp rides on Antergos (Arch), Linux Mint, Debian and Fedora
Top
Post new topic Reply to topic  [ 91 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) My Experiments On GMIC Testing filters: Simple Graphics (now 14)

1046

No new posts Testing Gmic-Qt Standalone 3.1

4

No new posts Attachment(s) Amazing what can be found under testing

30

No new posts Attachment(s) questions about testing with DIEGO_Render_FillingPlus

13

No new posts Attachment(s) New layer modes in LayerFX-2.10 for testing.

9



* Login  



Powered by phpBB3 © phpBB Group