fatal XBT0407: System memory exhausted

This forum is for eXpress++ general support.
Message
Author
Victorio
Posts: 620
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

fatal XBT0407: System memory exhausted

#1 Post by Victorio »

Hi,

I have this problem after some time again.
One day I work on my source code, and compile without problems. Next day same source cannot compile and error occur.
I tryed several older versions my source before last changes, and one compile without problems, but last version no.
I tryed put one by one prg where was some changed to old version, and when I synchronize all identical to last version prg, compile again :shock:

Ok, this was yesterday, I tryed several times compile without problems.

Today again error occurred :evil: Also cannot compile old version.

On my PC (Windows 10 64 bit) I have 8GB RAM, I tryed put next 8GB to 16GB all, not helps.

Incomprehensible is same source once compile, and from one moment no. Restart or power off PC not help!
This looks some waste conventional memory and hold it also after restart but I do not if it is problem Windows 10 or Xbase++ workbench.

Victorio
Posts: 620
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: fatal XBT0407: System memory exhausted

#2 Post by Victorio »

some new informations:
i test same program compile on other PC (notebook) with same version of Windows 10 and RAM size, and program compiled.
I am helpless why , process explorer not show any anomalies.

Victorio
Posts: 620
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: fatal XBT0407: System memory exhausted

#3 Post by Victorio »

I mean, I found solution. I meet with advice in this forum, to create own OBJ file for all PRGs.,
when I try ist, only one PRG, not in main PRG module with SET PROCEDURE TO "MODULE001.PRG" but write to XPJ, when for this PRG generate OBJ.
And program compiled.
This looks when I have all PRG in MAIN program called as SET PROCEDURE TO... and PRGs are 113 "pieces", generate only one large OBJ and with it can compiler or linker problem.

I hope when I modify all to many OBJ, problem will solve.

Because I have all .ch declarations in main program, can I put it to all PRGs ? Or need select only this, which every PRG need ? How can I determine it ?

reganc
Posts: 257
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

Re: fatal XBT0407: System memory exhausted

#4 Post by reganc »

Victorio wrote: Fri Jul 23, 2021 7:38 am I mean, I found solution. I meet with advice in this forum, to create own OBJ file for all PRGs.,
when I try ist, only one PRG, not in main PRG module with SET PROCEDURE TO "MODULE001.PRG" but write to XPJ, when for this PRG generate OBJ.
And program compiled.
This looks when I have all PRG in MAIN program called as SET PROCEDURE TO... and PRGs are 113 "pieces", generate only one large OBJ and with it can compiler or linker problem.

I hope when I modify all to many OBJ, problem will solve.

Because I have all .ch declarations in main program, can I put it to all PRGs ? Or need select only this, which every PRG need ? How can I determine it ?
The answer is that ideally you would only have an #include directive in a PRG file if any of the defines in the CH are actually used in that PRG file.
You could add the same list of CH files to every PRG but I'm not sure if that would cause you other problems.

I think it depends on how many CH files you have and how familiar you are with the content of each as to how you do this.
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

User avatar
Auge_Ohr
Posts: 1405
Joined: Wed Feb 24, 2010 3:44 pm

Re: fatal XBT0407: System memory exhausted

#5 Post by Auge_Ohr »

hi,
Victorio wrote: Fri Jul 23, 2021 7:38 am I mean, I found solution. I meet with advice in this forum, to create own OBJ file for all PRGs.,
it is old Style to use 1 x ( big ) PRG or "-m" Switch ...

create a *.XPJ this Way

Code: Select all

DIR *.PRG /B > PROJECT.TXT
PBUILD @PROJECT.TXT

PBUILD -a
now you got a PROJECT.XPJ which i start with "-.BAT"

Code: Select all

PBUILD PROJECT,XPJ >> MyLog.TXT
---

i recommend to use "-w"arning in *.XPJ

Code: Select all

[PROJECT]
    COMPILE_FLAGS = /q /n /w /o\OBJ\
    OBJ_DIR       = .\OBJ
"-w" will show you what is missing e.g. *.CH File

OBJ Files are going to separate Folder

if you want to use Resource ( ICO, Bitmap ) write a *.ARC File

Code: Select all

ICON
  1 = ".\..\RES\Reg101.ico"

VERSION
   "CompanyName"      = "Yiu-Software"
   "LegalCopyright"   = "Copyright (c) Yiu-Software"
   "ProductName"      = "Ops Locking for Xbase++"
   "ProductVersion"   = "0.06"
   "FileDescription"  = "Xbase++ Ops locking Settings"
   "FileVersion"      = " 1.90.355.19"
   "OriginalFilename" = "OPSLOCK.EXE"

#define MANIFEST_RESID 1
#define MANIFEST 24

USERDEF MANIFEST
   MANIFEST_RESID = FILE "OPSLOCK.EXE.MANIFEST"
and use it in your *.XPJ

Code: Select all

[PROJECT.XPJ]
    OPSLOCK.EXE

[OPSLOCK.EXE]
// $START-AUTODEPEND
    OPSLOCK.RES
    OPSLOCK.OBJ
// $STOP-AUTODEPEND
    OPSLOCK.ARC
    OPSLOCK.PRG
greetings by OHR
Jimmy

Victorio
Posts: 620
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: fatal XBT0407: System memory exhausted

#6 Post by Victorio »

Tnaks very much, I'm going to work on it

Victorio
Posts: 620
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: fatal XBT0407: System memory exhausted

#7 Post by Victorio »

At this moment my program compiled without problems.
When I change system where in main.prg module was all other PRGs as SET PROCEDURE TO "PROGRAM01.PRG" etc.
to put them to project and create separater OBJs, problem solved.
This looks , compiler or linker have problem when one PRG have many rows (if I understand good, with set procedure to"xxx.PRG" compiler see PRG as one file)

After modify to many PRG/OBJ it looks that compiling process is also faster.

Only some work is with know, which header files I need use in every PRG .

Thanks all for advices

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: fatal XBT0407: System memory exhausted

#8 Post by Tom »

Are you working with Xbase++ 1.9SL1? AIMPLIB.EXE has a memory problem in that version. Using AIMPLIB.EXE from Xbase++ 2.0 helps.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

Victorio
Posts: 620
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: fatal XBT0407: System memory exhausted

#9 Post by Victorio »

No Tom, I have 2.0 foundation release 544 .
But now problem is solved (I hope) . Before modification I have one main PRG and many (more than 100) smaller PRGs and this was included to main PRG with SET PROCEDURE TO "modulexxx.PRG"...
I mean compiler this PRG saw as one big PRG with several hundrets rows and when he want compile this big PRG to one OBJ error occured because memory exhausted.
Now main and every smaller PRG compiled separately to many OBJ files, and for linker this is not problem link it to one EXE.

Also now has exe file more than 22 MB, and works fine.

Viktor

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: fatal XBT0407: System memory exhausted

#10 Post by rdonnay »

After modify to many PRG/OBJ it looks that compiling process is also faster.
Keeping your PRGs smaller has a huge effect on compile time.
The number of eXpress++ commands increases the compile time exponentially.
Doubling the number of some commands can quadruple the compile time.
I always recommend to eXpress++ users to break large PRGs down to 2 or 3 smaller PRGs.
The eXpress train is coming - and it has more cars.

Post Reply