Found an interesting way to stop the AVM

Posted by pkrikke on 02-Jun-2015 12:29

We found an interesting way to stop the AVM dead in its tracks today.  Trying to compile or syntax check the code below (in PDS 11.4.0 on Windows 64 bit) stops the AVM and sometimes even crashes PDS completely.

It is remarkably difficult to track down an error (caused by fat fingers) such as the one in the code below when it is in a huge class and PDS won't show you what line is causing the error.

CLASS StopAVM:

CONSTRUCTOR PUBLIC StopAVM ( ):
END CONSTRUCTOR.

METHOD PRIVATE VOID Okay():

DEFINE VARIABLE oResult AS System.Windows.Forms.DialogResult NO-UNDO.

oResult = GetConfirmation(System.Windows.Forms.`BoxButtons:OK).

END METHOD.

METHOD PRIVATE System.Windows.Forms.DialogResult GetConfirmation(oButtons AS System.Windows.Forms.MessageBoxButtons):

RETURN.

END METHOD.

DESTRUCTOR PUBLIC StopAVM ( ):
END DESTRUCTOR.

END CLASS.

All Replies

Posted by Peter Judge on 02-Jun-2015 12:40

Log it via TS please.
 
Is it any backtick, or just after the Forms. ?
 
-- peter
 
 
[collapse]
From: pkrikke [mailto:bounce-pkrikke@community.progress.com]
Sent: Tuesday, 02 June, 2015 13:30
To: TU.OE.Development@community.progress.com
Subject: [Technical Users - OE Development] Found an interesting way to stop the AVM
 
Thread created by pkrikke

We found an interesting way to stop the AVM dead in its tracks today.  Trying to compile or syntax check the code below (in PDS 11.4.0 on Windows 64 bit) stops the AVM and sometimes even crashes PDS completely.

It is remarkably difficult to track down an error (caused by fat fingers) such as the one in the code below when it is in a huge class and PDS won't show you what line is causing the error.

CLASS StopAVM:

CONSTRUCTOR PUBLIC StopAVM ( ):
END CONSTRUCTOR.

METHOD PRIVATE VOID Okay():

DEFINE VARIABLE oResult AS System.Windows.Forms.DialogResult NO-UNDO.

oResult = GetConfirmation(System.Windows.Forms.`BoxButtons:OK).

END METHOD.

METHOD PRIVATE System.Windows.Forms.DialogResult GetConfirmation(oButtons AS System.Windows.Forms.MessageBoxButtons):

RETURN.

END METHOD.

DESTRUCTOR PUBLIC StopAVM ( ):
END DESTRUCTOR.

END CLASS.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by Matt Gilarde on 02-Jun-2015 12:47

It's any backtick in a class name if it doesn't also contain square brackets. The compiler expects it to be a generic name.

Posted by pkrikke on 02-Jun-2015 12:49

In my admittedly limited testing, it needs to be in that spot and in that form.  Even replacing the “`BoxButtons” with “`MessageBoxButtons” doesn’t give the same results – that second case seems to let the AVM identify it as an error and flag it without crashing.
 
[collapse]
From: Peter Judge [mailto:bounce-pjudge@community.progress.com]
Sent: June-02-15 1:41 PM
To: TU.OE.Development@community.progress.com
Subject: RE: [Technical Users - OE Development] Found an interesting way to stop the AVM
 
Reply by Peter Judge
Log it via TS please.
 
Is it any backtick, or just after the Forms. ?
 
-- peter
 
 
[collapse]
From: pkrikke [mailto:bounce-pkrikke@community.progress.com]
Sent: Tuesday, 02 June, 2015 13:30
To: TU.OE.Development@community.progress.com
Subject: [Technical Users - OE Development] Found an interesting way to stop the AVM
 
Thread created by pkrikke

We found an interesting way to stop the AVM dead in its tracks today.  Trying to compile or syntax check the code below (in PDS 11.4.0 on Windows 64 bit) stops the AVM and sometimes even crashes PDS completely.

It is remarkably difficult to track down an error (caused by fat fingers) such as the one in the code below when it is in a huge class and PDS won't show you what line is causing the error.

CLASS StopAVM:

CONSTRUCTOR PUBLIC StopAVM ( ):
END CONSTRUCTOR.

METHOD PRIVATE VOID Okay():

DEFINE VARIABLE oResult AS System.Windows.Forms.DialogResult NO-UNDO.

oResult = GetConfirmation(System.Windows.Forms.`BoxButtons:OK).

END METHOD.

METHOD PRIVATE System.Windows.Forms.DialogResult GetConfirmation(oButtons AS System.Windows.Forms.MessageBoxButtons):

RETURN.

END METHOD.

DESTRUCTOR PUBLIC StopAVM ( ):
END DESTRUCTOR.

END CLASS.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse][/collapse]

Posted by Matt Gilarde on 02-Jun-2015 12:58

I tested in 11.6 and inserting a backtick anywhere in a class name causes the crash. The code has changed a bit since previous versions so the problem may have been less widespread before.

This thread is closed