- Glenn Barber
- PowerBuilder
- Tuesday, 28 March 2023 10:32 PM UTC
We have PB Response Selection window that sometimes crashes with a Null Object Reference (PB17)
The window has a Event which does A Retreval on the main datawindow (dw_1) using the entry in a sle
User Selects a Row - presses Ok and the Default window event grabs the value from the selected row and returns to the calling window with return.
It appears that sometimes - if the user types quickly after already selecting a row, that the Retrieve Process is initiated while the window is being closed and the retrun from the retieve process falls into code which fails because the datawindow control pointer is no longer valid.
Ive tried to trap this with the Valid test
IF NOT isValid(dw_1) THEN RETURN
But the program still crashes with an Null Object Reference on this statement.
Any ideas whats going on and how I can avoid the crash
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.