Re: [Scilab-users] bug when setting gcbo field in a callback function ?

classic Classic list List threaded Threaded
4 messages Options
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: [Scilab-users] bug when setting gcbo field in a callback function ?

This is a follow-up of the users@ thread
http://mailinglists.scilab.org/Scilab-users-bug-when-setting-gcbo-field-in-a-callback-function-tp4038615.html

Le 29/09/2018 à 18:16, Stéphane Mottelet a écrit :
Another example of such weirdness: consider (fixed) bug #13359. Its non-regression test fail (at least on my OSX and Linux machines) systematicaly when run by

--> test_run cacsd bug_13359

When run interactively by

--> exec SCI/modules/cacsd/tests/nonreg_tests/bug_13359.tst

it sometimes succeed and sometimes fail, this completely random. However, if you insert a sleep line 25

(...)
d1 = datatipCreate(pl, 200);
sleep(10) // line inserted
txt_datatip = d1.text;
assert_checkequal(strindex(txt_datatip(2), "-"), 1);

Then the test, executed by exec SCI/... above, always succeed. However, even with a bigger duration of sleep, even sleep(1000), then "test_run cacsd bug_13359" always fail.

It is here really another bug, about datatip rendering: when we increase the sleep() time -- say up to 10 s --, we have enough time to see that the datatip is created -- its square anchor is visible -- but stays empty for the whole sleep time (so d1.text=="").
Hence, it's not just a matter of delay: something is wrong about datatips rendering when things are done in a Scilab session created inside the current session (this is what test_run does): The test_run environment definitely cancels the rendering of the datatip label.
I tried
  • without the TEST-WITH-GRAPHIC mode, to cancel the -nw option when running the test: same issue
  • with get(d1,"text") instead of d1.text: as expected, same (upstream) issue
  • with a drawnow, or gcf().immediate_drawing="on", or gcf().visible="off" // + "on": this does not cancels the bug
I also tried in NO-CHECK-REF mode in order to cancel opening a diary, but this is not the case: A diary is opened anyway.
But opening a diary in the current session before directly running exec(the_test_file) does not yield the issue.

To be more explored...
Samuel


_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: [Scilab-users] bug when setting gcbo field in a callback function ?

Le 29/09/2018 à 21:34, Samuel Gougeon a écrit :

> .../...
> Le 29/09/2018 à 18:16, Stéphane Mottelet a écrit :
>> Another example of such weirdness: consider (fixed) bug #13359. Its
>> non-regression test fail (at least on my OSX and Linux machines)
>> systematicaly when run by
>>
>> --> test_run cacsd bug_13359
>>
>> When run interactively by
>>
>> --> exec SCI/modules/cacsd/tests/nonreg_tests/bug_13359.tst

When running exec directly in -nw mode does not yield the rendering bug

_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: [Scilab-users] bug when setting gcbo field in a callback function ?

In reply to this post by Samuel GOUGEON
Le 29/09/2018 à 21:34, Samuel Gougeon a écrit :
This is a follow-up of the users@ thread
http://mailinglists.scilab.org/Scilab-users-bug-when-setting-gcbo-field-in-a-callback-function-tp4038615.html

Le 29/09/2018 à 18:16, Stéphane Mottelet a écrit :
Another example of such weirdness: consider (fixed) bug #13359. Its non-regression test fail (at least on my OSX and Linux machines) systematicaly when run by

--> test_run cacsd bug_13359

When run interactively by

--> exec SCI/modules/cacsd/tests/nonreg_tests/bug_13359.tst

it sometimes succeed and sometimes fail, this completely random. However, if you insert a sleep line 25

(...)
d1 = datatipCreate(pl, 200);
sleep(10) // line inserted
txt_datatip = d1.text;
assert_checkequal(strindex(txt_datatip(2), "-"), 1);

Then the test, executed by exec SCI/... above, always succeed. However, even with a bigger duration of sleep, even sleep(1000), then "test_run cacsd bug_13359" always fail.

It is here really another bug, about datatip rendering: when we increase the sleep() time -- say up to 10 s --, we have enough time to see that the datatip is created -- its square anchor is visible -- but stays empty for the whole sleep time (so d1.text=="").
Hence, it's not just a matter of delay: something is wrong about datatips rendering when things are done in a Scilab session created inside the current session (this is what test_run does): The test_run environment definitely cancels the rendering of the datatip label.
I tried
  • without the TEST-WITH-GRAPHIC mode, to cancel the -nw option when running the test: same issue
  • with get(d1,"text") instead of d1.text: as expected, same (upstream) issue
  • with a drawnow, or gcf().immediate_drawing="on", or gcf().visible="off" // + "on": this does not cancels the bug
I also tried in NO-CHECK-REF mode in order to cancel opening a diary, but this is not the case: A diary is opened anyway.
But opening a diary in the current session before directly running exec(the_test_file) does not yield the issue.

To be more explored...

I've got it: this bug is due to the -quit option used to run the test_run scilab session: removing it uncancels the datatip rendering.

Since the -quit option is needed to cancel the test when  a syntax error occurs in it, this is still only a first step to fix the issue...


_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: [Scilab-users] bug when setting gcbo field in a callback function ?

Le 29/09/2018 à 22:03, Samuel Gougeon a écrit :

> Le 29/09/2018 à 21:34, Samuel Gougeon a écrit :
>> This is a follow-up of the users@ thread
>> http://mailinglists.scilab.org/Scilab-users-bug-when-setting-gcbo-field-in-a-callback-function-tp4038615.html
>>
>> To be more explored...
>
> I've got it: this bug is due to the -quit option used to run the
> test_run scilab session: removing it uncancels the datatip rendering.
>
> Since the -quit option is needed to cancel the test when  a syntax
> error occurs in it, this is still only a first step to fix the issue...

Moreover, the bug occurs only when the polyline.display_function is set
(to explicitly set the datatips labels, instead of using the default
labels style).
This is the case after calling nyquist(), but not after plot2d().

This bug is now reported @ http://bugzilla.scilab.org/15790

_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev