Consultor Eletrônico



Kbase P180367: System.ObjectDisposedException from dialogs instantiated with WAIT-FOR <dialog name>:Showdialog ()
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   4/25/2011
Status: Verified

SYMPTOM(s):

System.ObjectDisposedException from dialogs instantiated with WAIT-FOR <dialog name>:Showdialog ()

Error occurs after WAIT-FOR <dialog name>:Showdialog () is satisfied.

Problem appears after applying OpenEdge 10.2B03 service pack.

FACT(s) (Environment):

Windows
OpenEdge 10.2B03
Objects are not explicitly deleted using DELETE OBJECT statement.
Problem does not appear in OpenEdge 10.2B02.
Dialog works correctly the first time it is opened.
Dialog works correctly in OpenEdge 10.2B02 and earlier.

CHANGE:

Upgraded from OpenEdge 10.2B02 to OpenEdge 10.2B03

CAUSE:

Bug# OE00203271

CAUSE:

In OpenEdge 10.2B03, all .NET dialogs are automatically disposed in order to avoid memory leaks. This change should have applied only to the Progress.Windows.Form class, not to .NET forms inheriting from System.Windows.Forms.Form and shown with ShowDialog().

FIX:

Upgrade to OpenEdge 10.2B04. If upgrading is not possible, a workaround for .NET forms shown with ShowDialog() is to delete the dialog object and reinstantiate it using NEW after each time it is opened and closed.
For Progress forms inheriting from Progress.Windows.Form, a new property disposeDialogOnClose was added in OpenEdge 10.2B03. This property can be set to override the default behavior for the session on a case by case basis. If it is not desirable for the application to take advantage of the automatic disposition of dialogs, set disposeDialogOnClose to FALSE to prevent a given dialog from being automatically disposed once the showDialog() method returns.