Insufficient Memory when using events

The following code crashes the client:

[Code]
Object.SETRANGE(Type, Object.Type::Table);
Object.FINDSET;
REPEAT
  RecRef.OPEN(Object.ID);
  OnBeforeDataItem(RecRef, Allowed); // This is an integration event
  ExportRecord(RecRef);
  OnAfterDataItem(RecRef); // This is another integration event
  RecRef.CLOSE();
UNTIL Object.NEXT = 0;
[/Code]

These events have no subscribers

Thank you Microsoft !!!!

Related
Recommended