This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Jul 12, 2017, 7:32 AM
10 Posts
topic has been resolvedResolved

Lotusscript processing wrong code

  • Category: Domino Designer
  • Platform: Windows
  • Release: 9.0.1
  • Role: Developer
  • Tags: 8.5.3,9.0.1,Debugger,Lotusscript,libraries,classes
  • Replies: 5

Hi,

I detected a strange problem, which is reproducable in both Designer 8.5.3  and 9.01 on 3 different computers:

A Lotusscript agent seems to start without problem and then "jumps" from a certain point on into the wrong line of a classes 'property set' method and then does not execute any longer the right code - even skips entire code blocks.

Scenario:

After a class in an existing  scriptlibrary was slightly changed, an agent (not a serveragent), which should report about its progress in either the statusline (Print) , a messagebox or a Notes log, does not create any output and finishes execution without any error, but without having done, what it is supposed to do. The Agentlog in the designer only contains the standard text lines produced by the Notes environment - no output from the agent itself at all.

The agent uses 2 Lotusscript libraries with several classes.

The output was coded in a 'Select case' - 'End Select'  block in one of those library classes.

Debugging the agent shows that as from the 1. call of a certain 'Property Set' method in a certain class (LogManager) on, the debugger shows execution a line before(!) the called method (add), but the content of the variables shows that execution seems to work as expected. But already the next call to another private Lotusscript method in the same class, shows that now even code is simpy ignored (entire select case block) and then execution of calls inside this class become more and more mhhhh, let's say it in a diplomatic way : "fuzzy"

Tries to tackle the problem:

  1. Recompiled the entire db, renamed property name, removed new code recently added to the class - no success
  2. Created a new db, copied all involved Lotusscript design elements into text files and created new libraries via cut & paste - no success
  3. Rollback to an older version of the library - Success, agent runs as it is supposed to.

So far so good, but I have to report this, because I was and am still not able to identify the real cause  of the problem. The new code was just a new private property 'private z_Book List As LogIntervalPage' in the class concerned and a new tiny class 'public Class LogIntervalPage' with a 1 method (New) and 6 public property fields.

As the compiler does not report any errors, this problem was first invisible until we detected the missing results of the agent. This is dangerous and we don't know whether in another class / library etc. this can happen again, as long as we don't know what's the cause of ths 'out of sync' execution

Any help /hints etc. are very much appreciated.

You need more information ? Just tell what you would like to know.

TIA, Joe

 

 

 

 

 

Jul 12, 2017, 1:39 PM
323 Posts
Debug-line mismatches & debugging under these conditions

The only situations I've seen where code truly spirals off into nowhere, were due to a server upgrade gone wrong: the server booted, but was still running with DLLs from an earlier version. It runs -- you really don't want it to run!

For the debugger line mismatches, I've seen two sources:

1. Sharps (#) and colons (:) in your executable code. If an executable line contains a sharp or a colon, for some reason the debugger gets its lines mismatched. I've seen it occur in select case statements when the statement spans multiple lines. Nowadays I just try to omit it.

2. Less clear how & why, but blank lines outside of subprocedures/functions/properties/methods also cause mismatches.

As for the oddity executing the code, assume you've resolved the debugger line mismatches. What's the last line that was clearly checked properly, followed by any branches it may cause, and any preceding code that sets the values used on the line? I know, clear as mud.

Essentially, I'd need to see how the "trigger line"s data was retrieved; and then where that line might've jumped to execute later in the code.

 

Jul 13, 2017, 6:36 AM
10 Posts
Lotusscript processing wrong code

Thanks Mike for your reply,

I will try today to cancel out the effects of sharps "#" , colons ":" and blank lines  on the debuggers behaviour. Hope it will help.

But what causes me headache is that the execution was also wrong  - the skipped 'Select Case'  block is a hefty show killer.

I meanwhile have replaced all 'Select case' statement against 'If then else if else endif' blocks without success.

Will keep you informed.

TIA, Joe

 

 

Jul 13, 2017, 8:37 AM
10 Posts
Lotusscript Debugger shows wrong code

Hi,

after further testing I could solve the worst part of the problem - the execution of the Lotusscript code is in fact correct. Due to the fact that the debugger is showing wrong code I myself have created a mistake in the process of getting more insight into the debugger problem, which has lead to a code where an entire "Select case" block was not executed because a variables value was meanwhile set to a wrong value.  That's the good news !

The bad news are the fact that the debugger still starts to become confused in one library and one method  ( meanwhile changed the Set property into a sub - also no success ) It starts with displaying one line behind and then escalates.

Am still in the process of removing in all design objects concerned the '#' & ':' chars & the blank lines between methods that Mike suggested. Still hope this will solve it.

Joe

Jul 14, 2017, 5:25 AM
10 Posts
Removed '#', ':' and blank lines, does not help !

. The debugger loses sync whenever this certain method in this one specific class is called. Other class methods do not have this effect. Renaming the method or changing the type (Property Set -> Sub) did not help. The library where the class resides is of medium size (~ 40k) and contains another 3 public classes and 2 private classes, which do not suffer from debuger antipathy, if not called from within the problem class.  Can't see anything special which could explain this problem.

Joe

Mar 8, 2018, 10:26 AM
10 Posts
Reason for debugging problems found

Hi all,

I finally found the problem why the debugger showed the wrong source code in 1 of my libraries.

As define in basic and in Lotusscript as well, it is allowed and valid to write 2 staments separated by a colon.

But this was what throws the debugger out of sync.

The below listed  code was one of 2 code blocks which caused the problem. For each line containing a colon the debugger went wrong one line.

Because I had 2 "Select Case" blocks at different locations in that library, the number of lines the debugger went wrong was dependend on the location relativ to these two code blocks. Behind the 2 blocks it was the max.

Thus Mike Woolsey was right in what he wrote. But I simply have not seen these two code blocks and the colons there. Detected it now by chance ...

Select Case Left$(s$,3)
            Case "INF"
                me.z_stat="Info": me.z_msglvl=0
            Case "WAR"
                me.z_stat="WARNING": me.z_msglvl=1
            Case "ERR"
                me.z_stat="ERROR":  me.z_msglvl=2
            Case "DEB"
                me.z_stat="DEBUG": Me.z_msglvl=9
            Case "FAT"
                me.z_stat="FATAL": me.z_msglvl=3
            Case Else
                me.z_stat=s$: Me.z_msglvl=0
        End Select

So this is a bug of the debugger, as the colon is a valid syntactic element of Basic and Lotus Script.

But honestly said,I think instead of fixing the debugger IBM/HCL should exclude the colon in the next version of Lotusscript and raise an error if used.

Joe

 


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal