Alaska Software Inc. - Possible memory leakage ??
Username: Password:
AuthorTopic: Possible memory leakage ??
Juan GonzalezPossible memory leakage ??
on Fri, 03 Dec 2021 23:11:59 +0100
Hello,

I made a software to monitor several conditions in a laboratory: checks 
internet connection, makes backups, monitors energy, sensors, etc.
It is very simple, only character mode, no multi-threaded, with no user 
interaction except for pressing ESC to exit. It is running 24/7/365 on the 
foreground in a Windows 10 machine.

The problem I have is that sometimes (approximately once a week) the 
application stops (red screen).
In the last event I had it said "Not enough page memory"
The saved XPPERROR.LOG file is as follow:


------------------------------------------------------------------------------
ERROR LOG of "D:\MONITOR\MONITOR.EXE" Date: 03/12/2021 18:40:57

Xbase++ version     : Xbase++ (R) Version 1.90.331
Operating system    : Windows  06.02 Build 09200
------------------------------------------------------------------------------
oError:args         :
          -> VALTYPE: C VALUE: /C D:\MONITOR\curl\curl.bat "www.google.com.ar"
oError:canDefault   : Y
oError:canRetry     : Y
oError:canSubstitute: N
oError:cargo        : NIL
oError:description  : Operating system error
oError:filename     : 
oError:genCode      :         40
oError:operation    : RunShell
oError:osCode       :       1455
oError:severity     :          2
oError:subCode      :          4
oError:subSystem    : BASE
oError:thread       :          1
oError:tries        :          1
------------------------------------------------------------------------------
CALLSTACK:
------------------------------------------------------------------------------
Called from VERIFICAR_URL(1519)
Called from ALOS_45_SEGUNDOS(794)
Called from MAIN(465)

The instruction at line 1519 is RunShell('/C &curl') to run an external 
program.

I have tried doubling virtual memory in Windows up to 16 Gb, but same results.

Is it possible to have a memory leak in a such a simple software?
I am considering to implement something like a programmed restart of the 
application once a day...

Any ideas to fix this issue?
Thank you very much.
Jim LeeRe: Possible memory leakage ??
on Sat, 04 Dec 2021 09:36:53 +0100
hi,

if it is real a Memory Problem you should see it in Taskmanager.
but as Error contain "Page Memory" it might be a Problem of Space for Handle

so you can try to increase STACK in your *.XPJ File

The amount of required MEMORY space is is managed by the linker
flag /stack:max,min - more specific by the max val

read more in Help File -> Linker Option

p.s.
v1.9.331 is very old ... last was v1.9.355 before v2.x