PowerBuilder 10 IDE Bug

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:

 

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. 🙂

The following two tabs change content below.
Software Architect and Backend Developer (almost Fullstack), I usually work with C#, PowerShell, Python, Golang, bash and Unity (this one is more for a hobby). I'm always looking for something new to learn, adding new tools to my utility belt.
Posted in Dev, PowerBuilder and tagged , , , , , .