Bug 5434

PBNI: IDE crashes on saving window painter changes when the window being edited contains a native visual extension 16 October, 2020

Rudolf Alexander Kerbitz
14 October, 2020
Product: PowerBuilder Category: PowerBuilder IDE
Version: 2019 R3 Beta Build: 2556
Classification: Sybase (legacy) bug Publishing: Public
Priority: P3
Status: Scheduling Reason:
Ken Guo @Appeon 16 October, 2020
#3
Hi Rudolf,

Thanks for reporting this problem! We reproduced it on our end and will do further research to figure it out. We will keep you posted on the progress.
Currently I suggest you work it around via putting the v_base object to the window as well.

Regards,
Ken
Ken Guo @Appeon 14 October, 2020
#2
Hi Rudolf,

Thanks for reporting this problem! 
We will be working on analyzing your case. We will keep you posted
on the results here.

Regards,
Ken
Rudolf Alexander Kerbitz 14 October, 2020
#1
Bug5434.zip (55KB)

Please find a minimum example to reproduce the described issue attached. The ZIP file contains a Visual Studio 2017 solution to create an extension which exports two simple visual objects v_base and v_inherited, whereat v_inherited inherits v_base. Both are simply static controls showing text. The text of v_base reads "class v_base from userobject" and the text of v_inherited reads "class v_inherited from v_base". The sub-folder TestApp contains a  workspace created with PowerBuilder 2019 R3 (beta) build 2556. The workspace contains a window w_visext with v_inherited placed on it. When you open the window modify it in some way (e.g. resize the window) and press save: the IDE crashes due to an access violation.

Note that the Issue can also be reproduced in PowerBuilder 2017 R3. I'd speculate that this is a Sybase legacy bug.
Rudolf Alexander Kerbitz 14 October, 2020
*Phenomenon:
We have a PBNI extension which exports a hierarchy of visual user objects. One base class and several specializations. When placing one of the specializations in a window painter, the painter correctly adds the component, shows it's preview at the specified position and lets you move, resize and implement functions and event handlers. But as soon as one tries to save any changes, the entire IDE crashes due to an access violation (see remarks for details). Apparently the crash happens during some operation after the changes already have physically been saved to the corresponding PBL-file. When restarting the IDE and reopening the edited window it appears in the state it was left with right before the IDE crashed.

The corresponding application can be run from the IDE as well as compiled to a standalone executable without issues. All controls behave as expected and no crashes occur. This indicates that this is an IDE-only issue. 

Additionally I made the following findings:
1. When placing solely an instance of the base class visual component into the painter, changes applied can be saved without the IDE crashing.

2. When placing an instance of a specialization AND an additional instance of its base class into the painter, changes applied can be saved without the IDE crashing.

3. When plancing solely an instance of a specialization the IDE crashes after the changes were saved. 

Currently we exploit finding No. 2 as a workaround with a bitter taste and place an additional hidden dummy-instance of the base object into windows to prevent the crash. However it would be great to have this issue fixed 

Thanks in advance
Rudolf Alexander Kerbitz

*Reproduce Steps:
1. Create a PBNI extension which exports a hierarchy of visual controls (e.g. v_base and v_inherited).
2. Import the extension.
3. Create a window and open it in a painter.
4. Drag v_inherited into the window painter.
5. Save.

Remarks:
Exception thrown at 0x7BAFB9BB (pbvm.dll) in PB190.exe: 0xC0000005: Access violation reading location 0xB0A8E859.

pbvm.dll!ob_class_indirect() + 155 bytes
[Frames below may be incorrect and/or missing, no symbols loaded for pbvm.dll]
pbvm.dll!ob_type_vtable_module_srch() + 47 bytes
pbvm.dll!ob_get_global_func_class() + 2902 bytes
pbvm.dll!ob_get_global_func_class() + 6625 bytes
pbvm.dll!ob_get_global_func_class() + 6467 bytes
pbvm.dll!ob_get_global_func_class() + 8164 bytes
pbvm.dll!ob_get_global_func_class() + 6467 bytes
pbvm.dll!ob_create_interface_in_library() + 5307 bytes
pbvm.dll!ob_instance_simple_refpkt() + 1989 bytes
pbvm.dll!ob_create_object_using() + 651 bytes
pbvm.dll!7bc4e51a()
pbvm.dll!ob_get_pcode_stack_effect() + 2599 bytes
pbvm.dll!ob_get_global_func_class() + 8754 bytes
pbvm.dll!ob_get_global_func_class() + 6467 bytes
pbvm.dll!ob_create_interface_in_library() + 5307 bytes
pbvm.dll!ob_instance_simple_refpkt() + 1989 bytes
pbvm.dll!ob_create_obinst() + 366 bytes
PBUDO.DLL!02f8b2ee()
PBUDO.DLL!02fad184()
005f002c()
OS:
All
Platform:
32-bit
Database Type:
not related to database
Database Version: