Bug 5628

VariableDefinition (ClassDefinition) issues 24 November, 2020

Maksim Koptev
19 November, 2020
Product: PowerBuilder Category: Controls & UI
Version: 2017 R3 Build: 1880
Classification: Sybase (legacy) bug Publishing: Public
Priority: P2
Status: Scheduling Reason:
Maksim Koptev 24 November, 2020
#16
(In reply to Mark Lee @Appeon from comment #15)
Hi Maksim,

Thanks for your feedback.
For #1 and #2 issues, I can reproduce them on our side in PB 12.6, PB 2017
1915, and PB 2019 R2 2353.
We've submitted these issues to our development team for further analysis.
They will determine whether they can fix them based on their analysis of
these issues and their schedule.
We will update you if they will be fixed. Since these bugs are reported
recently, I don't have the exact timeframe of when or in what version can
the issues be fixed.
 
For #3 issue, as we said before, please check if PB 2017 R3 Build 19151 or
PB 2019 R2 Build 2353 has the issue. If they don’t have this issue then the
issue doesn’t need to be fixed.

Regards,
Mark Lee
Hi Mark, thanks for your help and I hope your development team will fix those two issues soon :)
Mark Lee @Appeon 24 November, 2020
#15
Hi Maksim,

Thanks for your feedback.
For #1 and #2 issues, I can reproduce them on our side in PB 12.6, PB 2017 1915, and PB 2019 R2 2353.
We've submitted these issues to our development team for further analysis.
They will determine whether they can fix them based on their analysis of these issues and their schedule.
We will update you if they will be fixed. Since these bugs are reported recently, I don't have the exact timeframe of when or in what version can the issues be fixed.
 
For #3 issue, as we said before, please check if PB 2017 R3 Build 19151 or PB 2019 R2 Build 2353 has the issue. If they don’t have this issue then the issue doesn’t need to be fixed.

Regards,
Mark Lee
Maksim Koptev 23 November, 2020
#14
(In reply to Mark Lee @Appeon from comment #13)
Hi Maksim,

Thanks for providing the new test case.
For #2 issue, I can reproduce it on our side. And as we said before, the
"imemode" property is not a valid property for the English version of
PowerBuilder, so we suggest you ignore the code process logic of this
property.
And you can work it around as blew in the of_get_class_desc function:
                li_countVar = upperBound( acldef_pbo.variableList )
                FOR li_iVar = 1 TO li_countVar
                                IF not isValid( acldef_pbo.variableList[
li_iVar ] ) THEN Continue
                                IF acldef_pbo.variableList[
li_iVar].isUserDefined THEN Continue
                                ls_name = acldef_pbo.variableList[
li_iVar].Name
                                CHOOSE CASE ls_name
                                                CASE "imemode"
                                                                IF not
ib_is_show_bug THEN Continue
                                                                Continue    
//added by Mark 
                                END CHOOSE
                               
                                of_log( "nestedclassproperty", ls_name )
                                la_initialValue =
acldef_pbo.variableList[li_iVar].initialValue
                                IF isNull( la_initialValue ) THEN
                                                ls_initialValue = "NULL"
                                ELSE
                                                ls_initialValue = String(
la_initialValue )
                                END IF
                               
                        IF ib_is_log THEN
                                    mle_class.Text += "~r~n   - " + ls_name
+ " = " + ls_initialValue
                        END IF
            NEXT   
 
For #3 issue, I found that when I ran your test case in PB 2017 R3 Build
1880, just like the screenshot you provided, there's a Memory leak issue.
But when I run the same case in PB 2017 R3 Build 1915 or PB 2019 R2 Build
2353, it was much better.
Therefore, I suggest you upgrade your PB version and then try again.
Also, may I ask if PB 12.6 has the same issue?

Regards,
Mark Lee
Hi Mark, thanks for your replay. May I ask you all three issues will be fixed somehow in future? ---------------------------------- Q. >>> Also, may I ask if PB 12.6 has the same issue? A. I do not use PB 12.6 in production - current PB version is I described in this case.
Mark Lee @Appeon 23 November, 2020
#13
Hi Maksim,

Thanks for providing the new test case.
For #2 issue, I can reproduce it on our side. And as we said before, the "imemode" property is not a valid property for the English version of PowerBuilder, so we suggest you ignore the code process logic of this property.
And you can work it around as blew in the of_get_class_desc function:
                li_countVar = upperBound( acldef_pbo.variableList )
                FOR li_iVar = 1 TO li_countVar
                                IF not isValid( acldef_pbo.variableList[ li_iVar ] ) THEN Continue
                                IF acldef_pbo.variableList[ li_iVar].isUserDefined THEN Continue
                                ls_name = acldef_pbo.variableList[ li_iVar].Name
                                CHOOSE CASE ls_name
                                                CASE "imemode"
                                                                IF not ib_is_show_bug THEN Continue
                                                                Continue                                                                             //added by Mark 
                                END CHOOSE
                               
                                of_log( "nestedclassproperty", ls_name )
                                la_initialValue = acldef_pbo.variableList[li_iVar].initialValue
                                IF isNull( la_initialValue ) THEN
                                                ls_initialValue = "NULL"
                                ELSE
                                                ls_initialValue = String( la_initialValue )
                                END IF
                               
                        IF ib_is_log THEN
                                    mle_class.Text += "~r~n   - " + ls_name + " = " + ls_initialValue
                        END IF
            NEXT   
 
For #3 issue, I found that when I ran your test case in PB 2017 R3 Build 1880, just like the screenshot you provided, there's a Memory leak issue.
But when I run the same case in PB 2017 R3 Build 1915 or PB 2019 R2 Build 2353, it was much better.
Therefore, I suggest you upgrade your PB version and then try again.
Also, may I ask if PB 12.6 has the same issue?

Regards,
Mark Lee
Maksim Koptev 21 November, 2020
#12
Hi Chris and Mark,

I installed trial version of PowerBuilder 2017R3 build 1880 on my other PC (Win7 64 bit Russian language) and the situation remains the same. Please check my new demo application packed in one archived file and there you can find issues screenshots: https://drive.google.com/file/d/1-xLsypbf8dP5Hw2pEdFbpMlA-JFdtdiC/view?usp=sharing

I downloaded and installed following PB installation archive:
Appeon PowerBuilder 2017 R3 Maintenance Release 1880 (English) - PWRBLDR-2017R3LTS-MR02-1880-STD-EN
Maksim Koptev 20 November, 2020
#11
menu_desc.7z.003 (1369KB)

Archive, part #3
Maksim Koptev 20 November, 2020
#10
menu_desc.7z.002 (10240KB)

Archive, part #2
Maksim Koptev 20 November, 2020
#9
menu_desc.7z.001 (10240KB)

Archive, part #1
Maksim Koptev 20 November, 2020
#8
menu_desc.exe (201KB)

Hi Chris, the method GarbageCollect() did not help.
I implemented example to show memory leak in IDE and in executable file.
Maksim Koptev 20 November, 2020
#7
(In reply to Mark Lee @Appeon from comment #6)
Hi Maksim,

Thanks for reporting this problem and providing the test case.
#1, About this issue, I have reproduced it in my environment.
#2, I didn't reproduce this crash issue.
#3, I'm a little confused. Do you mean the memory leak issue happens only in
the Runtime environment, and everything works fine in the IDE?

Since me Chris and you, we all have different test results for #1 and #2,
can you provide a video to give us some instruction? Thanks!

Please also let us know what are your Operation System and the system
language: (e.g. 32-bit Window 7, English)?

BTW, the "imemode" property is relevant only to applications running on a
Japanese version of PowerBuilder. So can you let me know if you are using
the PB 2017 R3 JP version?
https://docs.appeon.com/pb2019r2/objects_and_controls/ch02s108.html

Regards,
Mark Lee
Hi Mark, --------------------------- Q. Please also let us know what are your Operation System and the system language: (e.g. 32-bit Window 7, English)? A. Windows 10 corporation edition, 64 bit, Russian language --------------------------- Q. BTW, the "imemode" property is relevant only to applications running on a Japanese version of PowerBuilder. So can you let me know if you are using the PB 2017 R3 JP version? A. I installed PB in this way: 1. PWRBLDR-2017R3LTS-1858-STD-EN 2. PWRBLDR-2017R3LTS-MR02-1880-STD-EN I'll give you other answers later after I implement new example and check what Chris suggested to do.
Mark Lee @Appeon 20 November, 2020
#6
Hi Maksim,

Thanks for reporting this problem and providing the test case.
#1, About this issue, I have reproduced it in my environment.
#2, I didn't reproduce this crash issue.
#3, I'm a little confused. Do you mean the memory leak issue happens only in the Runtime environment, and everything works fine in the IDE?

Since me Chris and you, we all have different test results for #1 and #2, can you provide a video to give us some instruction? Thanks!

Please also let us know what are your Operation System and the system language: (e.g. 32-bit Window 7, English)?

BTW, the "imemode" property is relevant only to applications running on a Japanese version of PowerBuilder. So can you let me know if you are using the PB 2017 R3 JP version?
https://docs.appeon.com/pb2019r2/objects_and_controls/ch02s108.html

Regards,
Mark Lee
Maksim Koptev 20 November, 2020
#5
(In reply to Chris Pollach @Appeon from comment #4)
Awesome .. Thanks!
Hi Chris, I found that property "imemode" causes PB to crash when I do loop through class properties. >>> 2) I was able to reproduce your crash issue for the SLE and MLE using PB 2017R3, 2019R2 and 2019R3 Beta. It looks like the property count returned by the PBVM is off by one. This does look like a bug.
Chris Pollach @Appeon 19 November, 2020
#4
Awesome .. Thanks!
Maksim Koptev 19 November, 2020
#3
(In reply to Chris Pollach @Appeon from comment #2)
Hi Maksim;

  Thank you for reporting these anomalies and your valuable PB App Test Case!

  I was able to somewhat reproduce your issues ....

1) I could not reproduce this problem under my PB2017R3 build 1915. The
"tag, text, enabled, checked" properties all had the correct values
displayed.

2) I was able to reproduce your crash issue for the SLE and MLE using PB
2017R3, 2019R2 and 2019R3 Beta. It looks like the property count returned by
the PBVM is off by one. This does look like a bug.

=> The workaround is to adjust the property count as follows:

	li_countVar = upperBound( acldef_pbo.variableList )
	IF	ls_type = "multilineedit" or   &
		ls_type = "singlelineedit"  THEN
		li_countVar --
	END IF

3) This test case does not push the PBVM hard enough to verify the memory
issue aspect. As a suggestion, I would like to suggest that you issue a
GarbageCollect() command as you exit each parsing loop to see if that helps
memory management better.

I will now transfer this ticket over to the main Support / Engineering team
to review the #2 and #3 issues further.

Regards ... Chris
Hi Chris, Thanks for your help! I'll do more complex example for the #3 issue soon. The method GarbageCollect() does not release memory for my case, but next time I'll include GarbageCollect() to my new example.
Chris Pollach @Appeon 19 November, 2020
#2
Hi Maksim;

  Thank you for reporting these anomalies and your valuable PB App Test Case!

  I was able to somewhat reproduce your issues ....

1) I could not reproduce this problem under my PB2017R3 build 1915. The "tag, text, enabled, checked" properties all had the correct values displayed.

2) I was able to reproduce your crash issue for the SLE and MLE using PB 2017R3, 2019R2 and 2019R3 Beta. It looks like the property count returned by the PBVM is off by one. This does look like a bug.

=> The workaround is to adjust the property count as follows:

	li_countVar = upperBound( acldef_pbo.variableList )
	IF	ls_type = "multilineedit" or   &
		ls_type = "singlelineedit"  THEN
		li_countVar --
	END IF

3) This test case does not push the PBVM hard enough to verify the memory issue aspect. As a suggestion, I would like to suggest that you issue a GarbageCollect() command as you exit each parsing loop to see if that helps memory management better.

I will now transfer this ticket over to the main Support / Engineering team to review the #2 and #3 issues further.

Regards ... Chris
Maksim Koptev 19 November, 2020
#1
menu_desc.zip (14KB)

Dear support, have you any suggestion what to do about following things I found in PB?

1. I cannot get values of menu item properties value using the PB object - "variableDefinition". Properties tag, text, enabled, checked are empty all the time. Please check my example for the menu parsing.

2. When I try to get value of the property "initialValue" for classes type as "multilineedit" and "singlelineedit" then PB crashes. Please check my example for the window parsing.

3. When I parse a huge PB project I get memory leak using inbuilt  method "findClassDefinition". I parse PB project from IDE getting all information about all windows nested classes.
OS:
Windows 10
Platform:
64-bit
Database Type:
Database Version: