Sorry didn’t get back to you on this, I am still getting the error with this version (and still not calling the OnError function).
As I mentioned earlier, the program I am using this in is complex and it is not realistically an option to give you a copy of the code (plus it requires SQL databases and data setup).
As a developer myself I know how frustrating this is, but also as a developer know that 'it’s working fine on my machine’ isn’t an answer any client accepts (if only).
I also know the curse of Object reference is not set to an instance of the object, normally trying to evaluate a property of an object which is in fact null.
Are you not able to deduce what line in InitEditorSession(Style style, Rectangle r, Object data, Char key, String mask, C1DisplayColumn dc, Boolean readOnly) is likely to be causing the error, it is clearly something which isn’t covered by error trapping (as it is raising an exception straight to the client). If you at least wrapped the entire function\sub in a try catch (or equivalent) it would at least make it to the OnError you would hope,
If you can send me the code for that particular function I might even be able to help (I used to work as a consultant on exactly these sort of problems).