 |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
DanRRight
Joined: 10 Mar 2008 Posts: 2924 Location: South Pole, Antarctica
|
Posted: Tue Oct 22, 2019 8:40 am Post subject: Re: |
|
|
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 |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8211 Location: Salford, UK
|
Posted: Tue Oct 22, 2019 5:15 pm Post subject: |
|
|
To my mind the order should make no difference. |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2924 Location: South Pole, Antarctica
|
Posted: Fri Oct 25, 2019 9:47 am Post subject: |
|
|
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 |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8211 Location: Salford, UK
|
Posted: Mon Oct 28, 2019 11:50 am Post subject: |
|
|
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 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 |
|
 |
|
|
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
|