Symptom

PowerBuilder crashes when loading large data over 250 Mb in a string or a blob

Environment

PowerBuilder

OS : All Windows platforms

Reproducing the Issue

// This code crashes

ulonglul_size
lul_size = 1024 * 1000
string ls
int li

for li = 1 to 256
    ls += space (lul_size)
loop

Cause

This is a not a PowerBuilder issue but it's due to a 32 Bits limitation of the Microsoft Windows memory indexing.

Similar C# code as Powerbuilder's one crashes :

            int li;
            string large = "";
            string ls_10mg = "";
            ls_10mg = ls_10mg.PadRight(iul_mb, 'x');

            for (li = 1; li <= 500; li++) {
                large += ls_10mg;
            }

 The same code works when compiling a 64 Bits executable as well with C# as with PowerBuilder

Resolution

Use a PowerBuilder 64 bits executable.

0
0