1. Seng Chee Chong
  2. PowerBuilder
  3. Friday, 23 April 2021 07:21 AM UTC

Dear All, 

Today 1 user reported that system pops up the error message "Error Number 39" below when she attempted to save data. 

This victim reported that this error message pops up intermittently, sometimes encountered several occurrences in one day, sometimes no occurrence in one day. Other users and I attempted to reproduce this issue, but we failed to do so. All of us can insert/add/save data gracefully. 

 

Below are the details:

Error Number 39.

Error text = Error accessing external object property name at line 70 in pfc_clicked event of object pfc_n_cst_dwsrv_sort..

Window/Menu/Object = pfc_n_cst_dwsrv_sort.

Error Object/Control = pfc_n_cst_dwsrv_sort

Script = pfc_clicked.

Line in Script = 70

 

Appeon PowerBuilder 2019 R3, CloudPro Edition, 

PowerBuilder IDE: Version 2019 R3 Build 2670

PowerBuilder Runtime: Version 2019 R3 Build 2670

 

 

Do you guys have any idea?

Any advice is welcome.

 

Thanks & Best Regards,

Alvin

 

 

 


 
 
 
 
 
 
Attachments (3)
René Ullrich Accepted Answer Pending Moderation
  1. Friday, 23 April 2021 07:32 AM UTC
  2. PowerBuilder
  3. # 1

Hi Alvin,

Maybe the problem occus when the user clicks on a specific location in datawindow? Try to find out more information about adwo_obj if the error occures. I have no clue why this object does not have the name property.

HTH,

René

 

Comment
  1. Seng Chee Chong
  2. Tuesday, 27 April 2021 01:42 AM UTC
Hi René,

It occurred after user clicked Ctrl + S on a specific location in datawindow.

Normally it occurred after saving records > 4 times.

Thanks
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Friday, 23 April 2021 13:29 PM UTC
  2. PowerBuilder
  3. # 2

Also try to determine if this runtime error occurs only in one particular DataWindow or in several, and which one(s)?

What else can you tell us? Your app obviously is built upon the PFC. Is this error occurring only in one window? Is the DataWindow created dynamically from syntax? What presentation style (grid, tabular, etc.)? Does this problem occur in older versions of the application? have you changed/upgraded PB recently? Can you duplicate the error, either by running the deployed app and/or running from the PB IDE?

Comment
  1. Seng Chee Chong
  2. Tuesday, 27 April 2021 01:59 AM UTC
Hi John,

- Error occurs at one particular DataWindow for one particular user.

- Respective DataWindow is not created dynamically from syntax.

- It's presentation style is DataWindo.Processing=0 (Default Form).

- It did not happen in older versions of the application. FYI, I upgraded PB IDE from PB 2019 R2 to R3 on 10 March 2021. But the errors are occurring on and off from 15 April 2021 onward.

- The error only happened on deployed app, PB IDE cannot duplicate the error.



Thanks.
  1. Helpful
  1. John Fauss
  2. Tuesday, 27 April 2021 03:01 AM UTC
Why and/or how is the Clicked event of pfc_n_cst_dwsrv_sort executing after the user presses Ctrl+S???? Does your app have a menu item that has Ctrl+S assigned as the shortcut code? This is normally the shortcut for "Save", which invokes the pfc_save event in the window.
  1. Helpful
  1. Seng Chee Chong
  2. Thursday, 29 April 2021 08:53 AM UTC
Hi John, good question, I still scratch my head and can't figure out why user encountered this issue after selected tax code DropDownDW in the DataWindow -> pressed Ctrl + S to save the record. Anyway, until today, respective user cannot re-produce the error after I deleted the DropDownDW -> added back the DropDownDW -> rebuilt the DataWindow, hopefully it is not the solution. I think I still need to take several days to monitor this issue.... Again, thanks.
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Friday, 23 April 2021 14:15 PM UTC
  2. PowerBuilder
  3. # 3

Try running in the debugger. If this is a grid, maybe the header text control is not named column_name_t.

Comment
  1. Sivaprakash BKR
  2. Monday, 26 April 2021 13:02 PM UTC
Add to what Roland told:

Check whether it's a text field and if it's do the sort.
  1. Helpful
  1. Seng Chee Chong
  2. Tuesday, 27 April 2021 02:03 AM UTC
Hi Roland and Sivaprakash,

DataWindows was built from Default Form, error occurred after select DropDownDW object and click Ctrl + S.

Yesterday I tried to re-build respective DataWindow, hopefully I have good luck on it.



Thanks.
  1. Helpful
There are no comments made yet.
Kevin Ridley Accepted Answer Pending Moderation
  1. Thursday, 29 April 2021 14:48 PM UTC
  2. PowerBuilder
  3. # 4

Also are you using the most current version of PFC?

Comment
  1. Seng Chee Chong
  2. Wednesday, 19 May 2021 02:44 AM UTC
Hi Kevin,

Thanks for your advice.

I followed your advice to upgrade to the latest version of PFC, but it only gave me peace of life for 10 days (T-T). And the error 39 happened almost every 2 days.
  1. Helpful
There are no comments made yet.
Seng Chee Chong Accepted Answer Pending Moderation
  1. Wednesday, 19 May 2021 03:13 AM UTC
  2. PowerBuilder
  3. # 5

Hi All, 

Referring to the attached pictures

- Capture_1.png shows the trace. 

- Capture_2.png shows possible workaround. 

 

For this case, can I amend the code as below?

=============

Original: 

=============

// Only valid on header column.

If String(adwo_obj.Name) = 'datawindow' THEN Return 0              

=============

Amended: 

=============

integer li_rtn

TRY

              If String(adwo_obj.Name) = 'datawindow' THEN

                             li_rtn = 0

              End If

CATCH (runtimeerror err)  

              li_rtn = 0

              //MessageBox("Runtime Error", err.GetMessage())

FINALLY  

              if li_rtn = 0 then return li_rtn             

END TRY  

=============

Is it appropriate to add TRY CATCH method with this system/code exceptions ~ runtimeerror ?

Is this system/code exceptions ~ runtimeerror powerful enough for catching error and skip the error? Any other recommendation? 

 

Any advice/comment is welcome. Thank in advance. 

 

Best Regards,

Alvin Chong

Attachments (2)
Comment
There are no comments made yet.
Seng Chee Chong Accepted Answer Pending Moderation
  1. Friday, 4 June 2021 05:29 AM UTC
  2. PowerBuilder
  3. # 6

Dear All,

Below are the amended code to capture error message. After several weeks' observation, the error  below repeatedly occurred.  

Can I make a conclusion that it is a program's memory leak because powerbuilder cannot capture the value of datawindowobject ~ adwo_obj.ColType after the code line "IF IsNull(adwo_obj) OR NOT IsValid(adwo_obj) THEN" ?

 

==================

Code

==================

 
string ls_headername
string ls_colname
integer li_rc
integer li_suffixlen
integer li_headerlen
string ls_sortstring
integer li_rtn = 1, li_email_rc //20210527
string ls_error, ls_type, ls_subject

// Validate the dwo reference.
IF IsNull(adwo_obj) OR NOT IsValid(adwo_obj) THEN
Return -1
END IF

// Check if the service is set to sort on column headers.
IF NOT of_GetColumnHeader() THEN Return 0

// Only valid on header column.
//If String(adwo_obj.Name) = 'datawindow' THEN Return 0 //Original

//20210527 //20210602 //20210603
TRY
If String(adwo_obj.Name) = 'datawindow' THEN
li_rtn = 0
End If
CATCH (DWRuntimeError dwErr)
li_rtn = -2
ls_subject = '[' + gnv_app.is_coy_code + '] Error: pfc_n_cst_dwsrv_sort (DW Runtime Error)'
ls_error = "Error#: " + string(dwErr.number) + ";<br/> " + &
"Text: " + dwErr.text + ";<br/> " + &
"Script: " + dwErr.routinename + "; <br/>" + &
"Object: " + dwErr.objectname + ";<br/> " + &
"Line: " + string(dwErr.line) + ";<br/> "

CATCH (runtimeerror runErr)
li_rtn = -2
ls_subject = '[' + gnv_app.is_coy_code + '] Error: pfc_n_cst_dwsrv_sort (Runtime Error)'
ls_error = runErr.GetMessage()
CATCH (Throwable exception)
li_rtn = -2
ls_subject = '[' + gnv_app.is_coy_code + '] Error: pfc_n_cst_dwsrv_sort (Exception Error)'
ls_error = exception.GetMessage()
FINALLY
If li_rtn = 0 Then
Return li_rtn
End If
END TRY

If li_rtn = -2 then
TRY
ls_error = ls_error + "<br/><br/>"
ls_error = ls_error + "al_row: " + String(al_row) + ";<br/>"
ls_error = ls_error + "DWO ColType: " + adwo_obj.ColType + ";<br/>"

ls_error = ls_error + "DWO Name: " + adwo_obj.Name + ";<br/>"
ls_error = ls_error + "DWO Type: " + adwo_obj.Type + ";<br/>"
ls_error = ls_error + "DWO ClassName: " + adwo_obj.ClassName() + ";<br/>"
ls_error = ls_error + "DWO Primary[al_row]: " + adwo_obj.Primary[al_row] + ";<br/>"


CATCH (DWRuntimeError dwErr2)
ls_subject = ls_subject + ' / (DW Runtime Error 2)'
ls_error = ls_error + "<br/>Error#: " + string(dwErr2.number) + ";<br/> " + &
"Text: " + dwErr2.text + ";<br/> " + &
"Script: " + dwErr2.routinename + "; <br/>" + &
"Object: " + dwErr2.objectname + ";<br/> " + &
"Line: " + string(dwErr2.line) + ";<br/> "
CATCH (runtimeerror runErr2)
ls_subject = ls_subject + ' / (Runtime Error 2)'
ls_error = ls_error + '<br/>' + runErr2.GetMessage()
CATCH (Throwable exception2)
ls_subject = ls_subject + ' / (Exception Error 2)'
ls_error = ls_error + '<br/>' + exception2.GetMessage()
FINALLY
li_email_rc = gnv_app.of_sendemail_server( gnv_app.is_email_addr, gnv_app.is_usr_name, 'mis.feedback@xxx.com ', '', '', ls_subject, ls_error, '', '')
Return -2
END TRY
End If
 
===========================
Error message. 
===========================
 
Error#: 39;
Text: Error accessing external object property name at line 76 in pfc_clicked event of object pfc_n_cst_dwsrv_sort.;
Script: pfc_clicked;
Object: pfc_n_cst_dwsrv_sort;
Line: 76;


al_row: 1;

Error#: 39;
Text: Error accessing external object property object at line 107 in pfc_clicked event of object pfc_n_cst_dwsrv_sort.;
Script: pfc_clicked;
Object: pfc_n_cst_dwsrv_sort;
Line: 107;
 
 
===========================
 
Any comment or advice is welcomed. 
 
 
Thanks & Best Regards,
Alvin Chong
 
 
 
Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.