replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Not Clear diagnostics
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
wahorger



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

PostPosted: Fri Jul 05, 2019 3:01 pm    Post subject: Reply with quote

The following code with /CHECK_WINIO causes the compiler to crash. I simplified it enough to duplicate the crash that I see with my full code. It is the '%tc%ty&' line that causes the crash.
Code:

   use mswin
   integer*4,parameter::WM_MOUSEWHEEL=z'020a',max_colors=5
   
       integer,external:: keystroke,pm_handler,process_mouse_wheel,close_full_screen
        integer:: mmc,mmr,k,tc_color(5),ty_color(5),window_handle,window_closure,i
        character*32 screen_data(20),screen_attr(20)
   K = WINIO@("%*.*^tx[USE_TABS,FULL_CHAR_INPUT,NO_POPUP_MENU]&",MMC,MMR,SCREEN_DATA,SCREEN_ATTR,MMC,MMR,KEYSTROKE)   !,FULL_MOUSE_INPUT
   k = winio@('%pm[Copy]&',pm_handler)
   k = winio@('%pm[Cut]&',pm_handler)
   k = winio@('%pm[Paste]&',pm_handler)
   k = winio@('%pm[|,Edit Clipboard]&',pm_handler)

   k = winio@('%mg&',wm_mousewheel,process_mouse_wheel) ! --- LINK THE MOUSE WHEEL INTO THE WINDOW
   DO I=1,MAX_COLORS
     K = WINIO@('%tc%ty&',TC_COLOR(I),TY_COLOR(I)) ! SOMETHING EHRE MAKES IT CRASH
   END DO
   K = WINIO@('%hw&',WINDOW_HANDLE)       ! GET THE WINDOW HANDLE FOR THIS WINDOW
   k = winio@('%cc&',CLOSE_FULL_SCREEN)
   K = WINIO@('%lw',WINDOW_CLOSURE)   ! leave the window open with this handle linked
   end

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


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

PostPosted: Fri Jul 05, 2019 5:45 pm    Post subject: Reply with quote

Bill

Thank you for the feedback.

Unfortunately there is no alternative to exiting after a winio@ error report at compile time. It is a situation where the compiler can't easily recover and progress. However, I will take another look and check this.
Back to top
View user's profile Send private message AIM Address
mecej4



Joined: 31 Oct 2006
Posts: 1899

PostPosted: Fri Jul 05, 2019 6:02 pm    Post subject: Re: Reply with quote

PaulLaidler wrote:
In case anyone has missed it, there is a relatively new FTN95 compiler option /CHECK_WINIO


I can find from neither the command FTN95 /help nor the file FTN95.CHM any information regarding /CHECK_WINIO with versions 8.5-8.51, although you have described that option in this and other forum posts. Perhaps both can be fixed for the next release?

Thanks.
Back to top
View user's profile Send private message
wahorger



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

PostPosted: Fri Jul 05, 2019 10:16 pm    Post subject: Reply with quote

Paul, I can understand why it would be a "one and done". I appreciate you taking another look.

Also as feedback, the specific identification of the variable (or % command) in error is very helpful. Makes up for the multiple compiles it took to find all of the typos in the code!!

Bill
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Sat Jul 06, 2019 8:14 am    Post subject: Reply with quote

Thanks for the feedback. I will take a look at the documentation.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


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

PostPosted: Sat Jul 06, 2019 9:41 am    Post subject: Reply with quote

Bill

The crash with %ty has now been fixed for the next release of the DLLs.
Back to top
View user's profile Send private message AIM Address
wahorger



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

PostPosted: Sun Jul 07, 2019 1:44 am    Post subject: Reply with quote

Thanks, Paul!!
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Tue Jul 09, 2019 9:53 am    Post subject: Reply with quote

/CHECK_WINIO checks the type of the arguments against what is expected for the corresponding format codes. It also checks that the number of arguments is correct.

This checking process is, of necessity, less comprehensive than that which is carried out at runtime.

This is a relatively new and experimental feature so false error reports and the occasional crash may occur. Please report these for fixing.

/CHECK_WINIO is unlikely to work with code containing complicated winio@ constructions that use DO loops or IF constructs.
Back to top
View user's profile Send private message AIM Address
wahorger



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

PostPosted: Tue Jul 09, 2019 2:24 pm    Post subject: Reply with quote

Paul,

I'm not sure this qualifies for "fixing", but I did have the occurrence where the argument should have been an external, but was actually a variable. I swapped the two when I typed the argument list. Of course, caught at run-time.

Don't know whether or not that feature could be added.

Just a thought.
Bill
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Tue Jul 09, 2019 3:22 pm    Post subject: Reply with quote

Bill

Are you saying that /CHECK_WINIO does not fault this?
Back to top
View user's profile Send private message AIM Address
wahorger



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

PostPosted: Tue Jul 09, 2019 8:32 pm    Post subject: Reply with quote

That was my experience. But when I just tried to re-create it in a small example, I could not. I'll try to experiment with more complex examples (i.e. several controls defined in a single winio@() call).

Sorry if this was a red herring.
Back to top
View user's profile Send private message Visit poster's website
DanRRight



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

PostPosted: Wed Jul 10, 2019 3:49 am    Post subject: Reply with quote

I encourage all to try /CHECK_WINIO for faster rate of its bug fixes and improvement of functionality. Right now compiling with /CHECK_WINIO crashes a half of my files but because the large amount subroutines in each compiled file extracting of offensive part would be a hell.

As to functionality i'd still like for /CHECK_WINIO to complain about error with this simplest code compiled FTN95 aaa.f95 /link /check_winio
Code:

i=winio@('%rb[]&',ir)
i=winio@(' %rd',ir)
end


as it swallowed undefined variable and clearly malfunctioning showing radiobutton ON. With the same compilation but added /64 it behaves differently. I have seen before that undefined variable in %rd or %rb can crash the property sheet %ps. I still have crashing %ps in /64 and can not find crash source for years. The only way how i use this %ps is to run the code via debugger. Even if the code is compiled with /nocheck the run via debugger makes %ps to work. Run of code with /nocheck via debugger does not slow down the code speed. Poor man hack Wink.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed Jul 10, 2019 8:10 am    Post subject: Reply with quote

It is true that ClearWin+ does not check for the use of undefined values and I guess that in some contexts it could. Using /UNDEF may catch most of these errors independently of ClearWin+.

Maybe if someone wants to provide a list of cases that could be tested then this task could be added to the "todo" list.

This reminds me that there is no perfect programming environment and the developer's work is never ending - the goal post are always moving.

One thing that I have in mind is to get ClearWin+ to write Fortran (winio@) code for you for simple dialogs. This is not as far-fetched as it sounds. Visual ClearWin+ already allows you to interactively design a dialog with the data going into a .rcx resource file. The next step would be to automatically convert this into Fortran code.

Having said this, there does not seem to have been much interest in Visual ClearWin+ presumably because there is an associated learning curve and users rarely need to work from scratch in this way. So I am not convinced that it this kind of development would be of interest.
Back to top
View user's profile Send private message AIM Address
DanRRight



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

PostPosted: Wed Jul 10, 2019 8:40 am    Post subject: Reply with quote

The problem is that /undef does not catch uninitialized variables with Clearwin. CWP just does eat them for breakfast. And after that sometimes hiccups no one knows where. With this text above: FTN95 aaa.f95 /link /check_winio /undef all looks rosy, but...

As to the acceptance rate - there is no barely used software, there is little advertisement. CWP needs more bright examples.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed Jul 10, 2019 9:21 am    Post subject: Reply with quote

There is no connection between /UNDEF (which causes FTN95 to plant checking code into your object files) and ClearWin+ which is in an external DLL. But ClearWin+ could possibly check for undefined values at runtime in certain contexts.

p.s. But you would need to use /UNDEF in order to plant the "undef" values in your code then ClearWin+ could look for these values if it had a mind to.
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, 3, 4, 5, 6, 7, 8  Next
Page 2 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