What could cause overriding WndProc and ProcessCmdKey ACCESS

Posted by jquerijero on 20-Jun-2018 17:31

It seems like the mere act of overriding Form's preprocessing methods like WndProc and ProcessCmdKey in ABL Form can cause the application to throw ACCESS_VIOLATION error sporadically.

Any ideas?

Posted by Brian K. Maher on 21-Jun-2018 10:46

Joseph,
 
This line -> RETURN SUPER:ProcessCmdKey(msg, keyData).
 
Should be -> RETURN SUPER:ProcessCmdKey(INPUT-OUTPUT msg, keyData).
 
 
Brian Maher
Principal Engineer, Technical Support
Progress
Progress
14 Oak Park | Bedford, MA 01730 | USA
phone
+1 781 280 3075
 
 
Twitter
Facebook
LinkedIn
Google+
 
 

All Replies

Posted by Brian K. Maher on 21-Jun-2018 06:12

Hi Joseph,
 
Do you have any protrace files?
 
Brian Maher
Principal Engineer, Technical Support
Progress
Progress
14 Oak Park | Bedford, MA 01730 | USA
phone
+1 781 280 3075
 
 
Twitter
Facebook
LinkedIn
Google+
 
 

Posted by jquerijero on 21-Jun-2018 09:39

Try this. It's for the ProcessCmdKey.

transfer.dmsi.com/.../protrace.17728

Posted by Brian K. Maher on 21-Jun-2018 09:46

Looks like we called into a method of a .net object (static method) then a whole bunch of unknown stuff happened within the .net side then the .net side tried to call back into the ABL side.
 
What does the code that handles the ProcessCmdKey look like?
 
Brian Maher
Principal Engineer, Technical Support
Progress
Progress
14 Oak Park | Bedford, MA 01730 | USA
phone
+1 781 280 3075
 
 
Twitter
Facebook
LinkedIn
Google+
 
 

Posted by jquerijero on 21-Jun-2018 09:54

It's a form embedded inside a flyout pane (I've seen the error from just a standalone window too). No dialog-boxes or input-blocking code is called along the method (ItemLocator_TextBoxLeave) call stack.

METHOD PROTECTED OVERRIDE LOGICAL ProcessCmdKey( INPUT-OUTPUT msg AS CLASS System.Windows.Forms.Message, INPUT keyData AS CLASS System.Windows.Forms.Keys ):

   glFromTab = Progress.Util.EnumHelper:AreEqual(keyData, System.Windows.Forms.Keys:Tab).

   IF glFromTab                            AND

      THIS-OBJECT:ByPassTabOnAutoLaunch    AND

      (gcOrigItem <> THIS-OBJECT:EditorText OR

      (gcOrigItem = "" AND THIS-OBJECT:EditorText = "")) THEN /* allow handling tabbing when the item is blank */

   DO:

     ItemLocator_TextBoxLeave( ?, ? ). /* parent container will be responsible for handling TAB destination */

     RETURN TRUE. /* processed */

   END.

   ELSE

     RETURN SUPER:ProcessCmdKey(msg, keyData).

END METHOD.

Posted by Brian K. Maher on 21-Jun-2018 10:46

Joseph,
 
This line -> RETURN SUPER:ProcessCmdKey(msg, keyData).
 
Should be -> RETURN SUPER:ProcessCmdKey(INPUT-OUTPUT msg, keyData).
 
 
Brian Maher
Principal Engineer, Technical Support
Progress
Progress
14 Oak Park | Bedford, MA 01730 | USA
phone
+1 781 280 3075
 
 
Twitter
Facebook
LinkedIn
Google+
 
 

Posted by Brian K. Maher on 21-Jun-2018 11:29

Joseph,

Adding INPUT-OUTPUT to the parameter when you call the SUPER in WndProc is also needed (assuming that it isn't there).

Brian

Posted by jquerijero on 21-Jun-2018 11:37

Thanks, I'll try that one.

Posted by jquerijero on 02-Oct-2018 17:20

I put in placed your suggested change, but today (after 3 months), we just hit another ACCESS-VIOLATION error.

Posted by Brian K. Maher on 03-Oct-2018 06:16

Please open an official support case for this.
 
 
Brian Maher
Principal Engineer, Technical Support
Progress
Progress
14 Oak Park | Bedford, MA 01730 | USA
phone
+1 781 280 3075
 
 
Twitter
Facebook
LinkedIn
Google+
 
 

This thread is closed