Bug 4647

PB crashes on missing return values 14 September, 2020

Gerd Scheltwort
18 May, 2020
Product: PowerBuilder Category: PowerScript
Version: 2019 R2 Build: 2328
Classification: Publishing: Public
Priority: P3
Status: Closed Reason: NO RESPONSE
armando herrera @Appeon 14 September, 2020
#9
Hi Gerd,

Based on our policy we have made 3 different attempts to contact you and determine if this ticket has been solved unfortunately, we did not get any response and we proceed to close it. 

If you consider this issue is still not fixed please, contact us.

Regards!
armando herrera @Appeon 01 September, 2020
#8
Hi Gerd, 

We have been trying to keep in touch with you to find out about the resolution of this issue. 

We would like to continue with our support but without more information, we will need to close it in the next 3 working days, according to our internal help support policy but please remember you can always open a new ticket.   


Regards.
armando herrera @Appeon 17 August, 2020
#7
Hi Gerd,
  
I'm just touching base with you about this ticket. 


Did we provide you with enough information to resolve this issue or have you resolved this issue?.


Please let us know if there is something else to support you with?. 


Regards!
armando herrera @Appeon 05 August, 2020
#6
Hi Gerd, 

I'm checking if the response provided to you was helpful enough to resolve
your case. If so, can we proceed to close this ticket?.

Otherwise, do let us know if we can provide you with and further assistance.

Please keep in mind, that you are always welcome to open another ticket in case you need it.


Regards!
armando herrera @Appeon 23 July, 2020
#5
Hi Gerd, 

This ticket was stopped due to a required test case and we need to collect more information about it, please note you can also send us a Set of screenshots or a small video showing the case so that we can try to collect the information we require to move on.

Thanks for your understanding!

Regards!
Ken Guo @Appeon 27 May, 2020
#4
Hi Gerd,

I tested locally but can’t reproduce the issue.
To better analyze it, could you please provide a small case for us for more study?


Regards,
Ken
Gerd Scheltwort 19 May, 2020
#3
Hi Ken, 

Thanks for your response.

This morning we further investigated on this nasty issue that leads to crashes in PB2019 R2 while PB2017 R2 had no problems with the same code base:

It seems that PB2019 R2 stumbles over the assignment of a datawindow object "dw_xyz" in one window that no longer exists in any PBL. After changing this it seems to be fixed. Later on Powerscript replaces this dw_xyz by an existing dw_xyz_blue in a postopen event. Therefore this missing datawindow was not directly obvious for us.
It would be nice if you could doublecheck this different behavior

And again: if the assignment of a non-existing datawindow or other object should be critical I would expect error messages at least at a full build or when compiling. Finding out all assignments of non-existing datawindows in visual  and nonvisual objects or as dddw or nested report in tons of code is not a nice job.

Kind regards

Gerd
Ken Guo @Appeon 19 May, 2020
#2
Hi Gerd,

You added return l_tv to the end of the function, it makes the coding more rigorous. 

Besides, I can’t reproduce this issue. Could you please provide a small reproducible case for us for further analysis? Thanks in advance.

Currently, I suggest you add return l_tv to bypass this issue.


Regards,
Ken
#1
Hi Gerd, 

Thank you very much for your report. 

We appreciate your comments and I'm transferring this to our Engineering Team for a deeper analysis. 

Regards!
Gerd Scheltwort 18 May, 2020
*Phenomenon:
Since we migrated last week first projects from PB2017 R2 to PB2019 R2 2328 one app often crashes without any error message when started from PB IDE and as well when started as exe. The PB IDE crashes as well after running this app.
The crashes only occurred in one window which has a treeview control.
With PB2017 R2 an older releases the app did not crash but the IDE did.

The reason seems to be badly coded methods of some? nonvisual objects.
While the new PB2019 seems to be more "sensitive" and less robust in this case it would be very nice to have better notification / detection of bad code at least when compiling or doing an full build.

*Reproduce Steps:
BAD code:
u_treeviewelement. of_FirstOrDefault(al_handle) returns u_treeview

if(this.Handle = al_handle) then
                return this;
end if
// There is no hint/warning when this  is saved, full builded or compiled
// although here is a missing return in case this.Handle <> al_handle
// ------------------------------------------------------

FIXED code:
This method should always return an u_treeview
u_treeviewelement. of_FirstOrDefault(al_handle) returns u_treeview
if(this.Handle = al_handle) then
                return this;
end if

u_treeview l_tv

return l_tv;
// ------------------------------------------------------

Remarks:
In our teams we have in between mainly developers who are more used to work with C# / Visual Studion and JetBrains tools than with PB. PB is for them only a secondary programming language. They are used to have a stronger guidance from the IDE to ensure clean code.

It is hard to find all these leaks and to fix them. I would strongly appreciate to have stronger support from PowerBuilder itself.
If there should be a workaround / an existing way to detect all these leaks this would also be useful for us.
OS:
Windows 10
Platform:
32-bit
Database Type:
Oracle
Database Version:
12g