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 

Not Clear diagnostics
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Thu Jul 11, 2019 1:39 pm    Post subject: Re: Reply with quote

John-Silver wrote:

...
So, we're seeing that CHECK_WINIO, in your case, only snagged approx 30% of the errors (assuming there are only 7 errors creating the 7 crashes.
...

Sorry, no, those were completely made-up numbers. I am not even a ClearWin/Simpleplot user. I merely wanted to know the nature of the WINIO errors that Dan keeps running into.

I am interested in the topic of what to do after an error is detected; especially, what can be done for graceful recovery and continuation of the run after an error has been detected at run time.
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Fri Jul 12, 2019 9:18 am    Post subject: Re: Reply with quote

mecej4 wrote:
I merely wanted to know the nature of the WINIO errors that Dan keeps running into.

The nature of CWP errors is simple as 2x2: not too many CWP users. Needs further polishing its user-friendliness. In my specific case when i have tens of thousand of $xx controls i get eventually one or two rare problems which do not appear with smaller GUIs. These couple hard to fix problems (when you with a lot of efforts eventually extract the demo just to find that the damn thing is not malfunctioning. You put it back and it fails again) start to annoy like a nail in the shoe. As a results i want to have more debugging capabilities and suggest some of them which appear from my fox hole as very easy, almost elementary to implement: adding check for undefined variables which is the best debugging tool. Let Clearwin when doing for example i=winio@('%rd', ir) checks variable ir to make sure it's not a 8080808080 (or whatever one which is defined as undefined variable). I am surprised to disbelief that whole my life advertising Silverfrost's /undef or Checkmate among hardly convinceable fortraneers i now need to convince to implement this in Clearwin ... Silverfrost itself !


Last edited by DanRRight on Sun Jul 14, 2019 6:12 pm; edited 2 times in total
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Fri Jul 12, 2019 10:25 am    Post subject: Reply with quote

Dan, I have sent a PM to you with a suggestion.
Back to top
View user's profile Send private message
John-Silver



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

PostPosted: Fri Jul 12, 2019 6:14 pm    Post subject: Reply with quote

I think we'eìre all realistic, and understand your limitations on what can be done Paul , even though I wrote:
Quote:
even though I'm sure Paul has plans for enhancing CHECK_WINIO

which was half hope half interpolation from what's been released for v8.4
... I then wrote ...
Quote:
i(t) does seem there are restrictions on what can be achieved


This shouldn't stop the ongoing melting pot of ideas for the future though.
It's one of the (very) strong points of these forums.

I'm a bit confused about what is the problem with DO or IF constructs being treated though, as the form of any WINIO commands within them will be the same..
_________________
''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
John-Silver



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

PostPosted: Fri Jul 12, 2019 6:21 pm    Post subject: Reply with quote

mecej4 wrote:
Quote:
what can be done for graceful recovery and continuation of the run after an error has been detected at run time.


... which is exactly why a completely seperate pre-checker is required for Formats .... if there are errors, no need to run .... need to check the variables flagged first or by definition the run will fail, or worse give wrong results !!!

I don't particularly see the probblem of the run not continuing prior to finding all errors

In some ways it's better to have a progressive finding of errors rather than seeking an 'all errors at once' approach' .

The most important thing is to highight the basics and for all WINIO commands.
I'm still not clear if the existing facility covers all WINIO fformats or not, I assume so.
_________________
''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
PaulLaidler
Site Admin


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

PostPosted: Mon Jul 15, 2019 9:10 am    Post subject: Reply with quote

Some further comments on ClearWin+ "crashes"...

Within the source code for the ClearWin+ library there are 645 places where a call is made to the function clearwin_error. These arise when an error is detected in the input data supplied by the user. clearwin_error could provide a polite and graceful report and then terminate the execution but instead it "raises an exception". The result appears to be "in your face" but is used because it comes with a trace back that helps you to work out where your error occurred. Also, when /DEBUG is used, you should also get the related
line numbers in your code.

So a "crash" is this context is not caused by a fault in the library but is a mechanism for helping you to find bugs in your code.

In a few cases the call to clearwin_error has been modified to give you the choice of continuing. Other cases could be identified as time permits but, as a general rule, continuation is either not possible or not advisable.

I understand that some sat-navs give you the option of being sworn at when you make a wrong turn. ClearWin+ does not give you this option and appears to be rather ungracious in its response to your errors but there is a friendly reason for this rudeness.
Back to top
View user's profile Send private message AIM Address
DanRRight



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

PostPosted: Wed Jul 17, 2019 5:31 pm    Post subject: Re: Reply with quote

PaulLaidler wrote:
So a "crash" is this context is not caused by a fault in the library but is a mechanism for helping you to find bugs in your code.

In a few cases the call to clearwin_error has been modified to give you the choice of continuing. Other cases could be identified as time permits but, as a general rule, continuation is either not possible or not advisable.


I like this addition you have made working on crashing case from another thread introducing the option not to crash GUI, specifically %pl. And even more specifically like the pre-screening of input data which informs the user what could be potentially wrong (for example "Data corrupted in array variable #3, element #3233" etc.). This choice of continuing seems is great for both worlds: it allows to ignore execution of %xx control and avoid the crash with that (and potentially find the reason), OR to continue and have a crash of entire code (which usually has nothing wrong) for those who can read access violation binary gibberish and detect the error in Clearwin by that. Probably there were only couple people in 30 years who in 1% cases have succeeded to decipher such diagnostics. All these few cases were not with Clearwin for sure Smile

If anyone disagree and still likes to see for more 30 years such useless crash screens like below let's do the test: can you tell me what's the error i made (or is this the bug?) which crashes my program for last 10 years in property sheet %ps ? Good 10 years old whiskey is yours

Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed Jul 17, 2019 9:35 pm    Post subject: Reply with quote

Dan

You exaggerate again! 64 bit FTN95 was first released in 2016.

What does this trace back look like for a 32 bit executable built using /DEBUG or better /UNDEF? Have you tried running the 32 bit version via SDBG?
Back to top
View user's profile Send private message AIM Address
DanRRight



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

PostPosted: Wed Jul 17, 2019 10:10 pm    Post subject: Reply with quote

I do not exaggerate a tiny bit, this first started long ago and the code crash in both 32 and 64 cases. Of course i ran it with all possible switches. Does not crash only if i launch this code via debugger (even if compile with /nocheck). This and fixed two days ago crash of graphics were (and this one still current) are my major problems with Clearwin.

Last edited by DanRRight on Thu Jul 18, 2019 11:10 am; edited 2 times in total
Back to top
View user's profile Send private message
John-Silver



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

PostPosted: Wed Jul 17, 2019 11:16 pm    Post subject: Reply with quote

I for one would welcome a series of PVids concerning debugging at all levels.
The only reason more people don't use these marvelous flagship facilities is the learning curve (which tends to be exponential), lack of sufficient documentation (with examples), and simple laziness.

I think Dan's correct in that the way these diagnostics are written is by programmers for programmers.
Scientists, Engineers and other 'real world' people Wink just don't have the time to divert their precious resources into learning curves which are often of unknown length.

As I said in another post earlier this evening a picture is worth a thousand words, and a moving picture is even better (usually).

In the example screenshot Dan posted only the first 2 lines mean even the slightest thing to ClearWin users, the rest are Windows related routines with no meaning to the avrage user.

The 'problem' as always is the time that would be required to a) write maningful error messages with several possible options for failure reason(s) b) to incorporate into the code
_________________
''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 "


Last edited by John-Silver on Wed Jul 17, 2019 11:25 pm; edited 1 time in total
Back to top
View user's profile Send private message
John-Silver



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

PostPosted: Wed Jul 17, 2019 11:17 pm    Post subject: Reply with quote

It's the same reason why more people don't use Plato.

Non-familiarity and laziness make the same type of bedfellows as familiarity and contempt.
_________________
''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: Tue Jul 23, 2019 12:59 am    Post subject: Reply with quote

I had bad luck with READ/WRITE in Fortran all my life. This is 100x worse than Clearwin+ which eventually is fun. Here is one more example of unacceptably bad elitist diagnostics typical for Fortran, not just FTN95. I've spent one more swearing hour to find what's wrong plus then some time scaling complex read statement which abruptly started to hiccup. Here is complete demo.

Code:

Read(1,'(i3, E10.3)') i, A(i)
end

And here is diagnostics which would cause anyone to hate Fortran.
Pure devilry, it worked today OK. I had to stop today.
Code:
0001) Read(1,'(i3, E10.3)') i, A(i)
*** Non-writable expression in READ statement
*** Compilation abandoned



Bet that the person who have done that hated and did not use Fortran, was lazy or was a total snob. Could it be that this was the same person who wrote FTN90 ? Smile))

And also lazy users...is a PITA. Not so many really active people FTN95 has. I propose to introduce system of ratings. The higher score people get the more priority they obtain in fixing found bugs. Such ratings have many other forums. May be this will stimulate people to report problems and suggest improvements.
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Tue Jul 23, 2019 9:46 pm    Post subject: Reply with quote

C'mon guys, please try to guess what the heck is this error. I tried to spend 15 minutes on it and already 1 day passed. At least please confirm that you get the same cryptic error and my compiler or computer is not corrupted. 20 lines before this place in my code similar READ works ;(
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Wed Jul 24, 2019 12:12 am    Post subject: Reply with quote

You did not provide a declaration for A(i) and you do not permit yourself to specify IMPLICIT NONE, so the compiler did the best it could.

The following test code contains two copies of a READ statement that fits your description. Only the second copy causes the "...non writable" message, and the program listing contains a hint for the resolution of the error.

Code:
program tst
real A(4)
open(10,file='xyz.dat',status='old')
read(10,'(i3,E10.3)')(j,A(j),i=1,4)
call sub(A,4)
end

subroutine sub(A,n)
! real A(n)
do i=1,4
   if(A(i) .le. 0.0)then
      read(10,'(i3,E10.3)')j,A(j)
   end if
end do
return
end
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Wed Jul 24, 2019 12:28 am    Post subject: Reply with quote

Thanks mecej4. If you'd take a bear or vodka per compiler accidents, your be in danger Smile Tell me where to send you better quality whiskey instead.

First, do you get the same diagnostics ? It is important for me to continue or not. Fun is that i knew about non-declared array and knew that there would be no error if i declare it, and i checked all variables in READ list and they are all defined.

Then are you happy with the diagnostics wording? May be i'm wrong, i'm not an English speaking and to me it looks like a spewed nonsense besides the bad diagnostics. If you have other compilers what they say about this error?
Back to top
View user's profile Send private message
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, 3, 4, 5, 6, 7, 8  Next
Page 4 of 8

 
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