Problem with Postgres DAM Studio 4.3.2.1 non-unicode on Windows 10
Hi,
I have been struggling the past few days trying to get Studio 4.3.2.1 non-unicode on Windows 10 to work with Postgres (tested and reproduced with Postgres 12 and 13 so far). The issue is that the DAM seems to have a memory leak, and at some point Studio crashes when executing simple INSERT SQLs.
Here the code. I have simplified it down as far as I could while still having the issue:
Working message Hotel {[#1]}
For #1 from 1 to 1000000 step 1
Redraw working message
Do cPgSqlDamObj.$commit()
Do lr_tohotels.$clear()
Calculate lr_tohotels.hotelkey as lHotelList.HOTELKEY
Begin statement
Sta: INSERT INTO
Sta: tohotels
Sta: (
Sta: hotelkey
Sta: ,inserted_at
Sta: ,updated_at
Sta: )
Sta: VALUES
Sta: (
Sta: @[lr_tohotels.hotelkey]
Sta: ,CURRENT_TIMESTAMP
Sta: ,CURRENT_TIMESTAMP
Sta: )
Sta: ON CONFLICT (hotelkey) DO UPDATE
Sta: set
Sta: hotelkey=@[lr_tohotels.hotelkey]
Sta: ,updated_at = CURRENT_TIMESTAMP
Sta: returning (id);
End statement
Do cStat.$execdirect()
Do cStat.$fetchinto(lr_tohotels.id)
End For
The loop runs and runs, and the memory of the omnis.exe keeps on growing, never going down. The more different SQLs that are called, the faster Studio crashes. No error is displayed. Omnis just disappears after a short period of freezing up.
I have tried with or without transactions. The following also does not seem to help, executed after an SQL:
Do cPgSqlDamObj.$clear()
Do cPgSqlDamObj.$reset()
Tried using $prepare() and $execute(), and then just $execdirect(), but in both cases the memory usage keeps growing till Studio crashes.
Tried using object references instead of object variables, but the behavior is the same for both types of variables.
Executing a $logoff() and a renewed $logon() also did not help.
Is anyone aware of any such issues with memory leaks in Studio 4.3.2.1 in conjunction with the Postgres DAM? Is there any workaround to the issue, or is there perhaps a replacement DAM that I could try to see if this would resolve the issue?
The version number displayed in the xcomp PGSQLDAM is “1.0” .
Upgrading Studio would mean a rewrite of our app, and that is unfortunately not possible at the moment due to the cost of development and the cost of new runtimes.
Regards
Rudolf Bargholz
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en@lists.omnis-dev.com