PowerBuilder 10 IDE Bug

PowerBuilder 10 IDE Bug

Overview

Ever found yourself in the middle of a coding session, only to be rudely interrupted by a software crash? If you’re a PowerBuilder user, you’re not alone. Dive into this post as we explore a sneaky bug in PowerBuilder IDE 10.2.1 that might just catch you off guard. With a mix of bemusement and pragmatism, we’ll unravel the mystery of the bug, guide you through recreating it, and offer a nifty workaround. Keeping your coding journey as smooth as silk, or at least trying to!

Maybe it"s a little late to report this problem, but just the other day I came across a bug in the PowerBuilder IDE (10.2.1). First of all: Don"t worry, your application is not affected by this bug… it makes PB crash before you have a chance to save your work.

How to recreate this bug:

long ll_NameLength
ll_NameLength = Len(dwobject.Name)

The problem lays in trying to get the length of Name property for a dwobject variable. This affects some DataWindow events, such as itemchanged.

After writing the code mentioned above, just save and you will be awarded with the following messages:

Image without description

Image without description

Image without description

Image without description

Regardless of the options you choose (Abort, retry, or ignore), PB will not save your code anymore and will close after a short time (or immediately).

I couldn"t test with PowerBuilder 11, but I tested it with PB12.5 and this error is fixed.

How to avoid this bug?

Simple: Keep things separate, like the code bellow:

string ls_Name
long ll_NameLength

ls_Name = dwobject.Name
ll_NameLength = Len(ls_Name)

That"s it! This is a low impact bug, but it can be a real nuisance, if you"re caught by surprise.
I hope it helps. 🙂