forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

GUI should never crash by itself
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Tue Sep 17, 2019 2:21 pm    Post subject: Reply with quote

Hi Eddie!

Thanks for the hints.

Bill
Back to top
View user's profile Send private message Visit poster's website
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Tue Sep 17, 2019 9:52 pm    Post subject: Reply with quote

Respect to reporting the error caused by the recursive re-entrance - may be easier would be to have the ability to switch this diagnostics off for the specific callbacks which have the chance to congest. These are all the callbacks like in
Code:
i=winio@('%^gr[...]',ix,iy, cb_mouseMove)

Code:
i=winio@('%^pl[...]',ix,iy, cb_mouseMove)

Code:
i=winio@('%^og[...]',ix,iy, cb_mouseMove)

Code:
i=winio@('%^bm[...]', cb_Plot)

Code:
i=winio@('%^bt[...]', cb_Plot)

Code:
i=winio@('%^tt[...]', cb_Plot)

etc.
Before (say, a year ago) the method worked to introduce the global var!able iAmBusyProcessingSh!t and check as first statement of callback if it is 0 or 1. If it is 1 you immediately exit. If it is 0 then change it to iAmBusyProcessingSh!t=1 and stay 1 till the plot ends only becoming iAmBusyProcessingSh!t=0 at the exit of callback function.

But recently something changed and you get the program stop immediately at the entrance of callback before any executable statements succeed to handle the situation
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Wed Sep 18, 2019 7:22 am    Post subject: Reply with quote

Dan

I would need a simple working program that illustrates the failure before making any comment.
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Tue Oct 22, 2019 8:40 am    Post subject: Re: Reply with quote

DanRRight wrote:
Today i was running the long task, all was fine, but after closing and calling the plot for second time i got the crash "Too many links specified for %PL plot" in the line winop@("%pl[link=lines]"). Holy smoke...If Clearwin instead told me that there will be a crash i'd aborted this line and fixed the issue later (hell know what that error means and how it happened, all other dozens of WINIOPs were not affected but this one decided to kick in. May be it does not like my %lw... so many choices and possibilities for conflicts).


I finally cornered the source of this bug though in the extracted demo the bug is not reproduced. The reason was in the relatively new option

CALL winop@("%pl[gridlines]")

When i remove it the code does not crash when i close and open the same window with gfidlines again. Gridlines work perfectly in several other cases but this one crash with the error on the line

call winop@("%pl[link-none]")

If i remove this line the error moves on the next winop@ and so on.

Another observation is that winop@("%pl[gridlines]") not always has any effect (does not plot any gridlines) with this specific subprogram

UPDATE:
I think found the reason for the crash.
Things are that CALL winop@("%pl[gridlines]") has to be placed before i=winio@("%pl[options],.....) but i was placed it after. It appears gridline option is sensitive to this matter


Last edited by DanRRight on Tue Oct 22, 2019 11:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Tue Oct 22, 2019 5:15 pm    Post subject: Reply with quote

To my mind the order should make no difference.
Back to top
View user's profile Send private message AIM Address
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Fri Oct 25, 2019 9:24 am    Post subject: Reply with quote

Dan,

Bearing in mind Paul's comment, was the call for gridlines placed immediately before/after the %pl[options] or are there other lines betwen them which might be implicated in the problem ?
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Fri Oct 25, 2019 9:47 am    Post subject: Reply with quote

John,
Look at this simple example
Code:
   use clrwin
   parameter (N=5)
   real*8 X(N), Y(N)
   Data X/1e1, 1e2, 1e3,  1e4, 1e5/
   Data Y/2.2, 66, 8333, 1111, 777/

   i=winio@('%fn[Tahoma]%bf%ts&',2.3d0)
   CALL winop@("%pl[gridlines]")
   call winop@("%pl[axes_pen=3,frame_pen=3,width=3,x_axis='X Axis Title',y_axis='Y Axis Title']")
   i=winio@('%ww%pv%pl[native,framed,x_array,scale=log_log,N_GRAPHS=1]&', 925,700, n, X, Y)
   i=winio@('%es')
   end


If you place CALL winop@("%pl[gridlines]") after i=winio@('%ww%pv%pl[native... (I specially made for that %es as a separate line) the gridlines are not plotted.
Code:
   use clrwin
   parameter (N=5)
   real*8 X(N), Y(N)
   Data X/1e1, 1e2, 1e3,  1e4, 1e5/
   Data Y/2.2, 66, 8333, 1111, 777/

   i=winio@('%fn[Tahoma]%bf%ts&',2.3d0)
   call winop@("%pl[axes_pen=3,frame_pen=3,width=3,x_axis='X Axis Title',y_axis='Y Axis Title']")
   i=winio@('%ww%pv%pl[native,framed,x_array,scale=log_log,N_GRAPHS=1]&', 925,700, n, X, Y)
   CALL winop@("%pl[gridlines]")
   i=winio@('%es')
   end


In more complex situation the wrongly positioned gridlines will cause conflicts with other code and the crash
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Mon Oct 28, 2019 11:50 am    Post subject: Reply with quote

This behaviour is what I would expect. The graph is created at

Quote:
%pl[native,framed,x_array,scale=log_log,N_GRAPHS=1]


so the following
Quote:
%pl[gridlines]
comes too late for this graph.

You can use winop@("%pl... ) multiple times before winio@("%pl...) but you can only use the latter form once for each graph.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group