Author Topic: Compiler error due to memory limits  (Read 11013 times)

0 Members and 1 Guest are viewing this topic.

Offline Ryster

  • Newbie
  • Posts: 77
    • View Profile
Compiler error due to memory limits
« on: December 16, 2018, 01:43:07 pm »
.../internal/temp/compilelog

In file included from qbx.cpp:2161:0:
..\\temp\\main.txt: In function 'void QBMAIN(void*)':
..\\temp\\main.txt:692623:1: internal compiler error: Segmentation fault
 }
 ^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Please, comment on this entry.

« Last Edit: December 16, 2018, 02:20:07 pm by odin »

FellippeHeitor

  • Guest
Re: Compiler error
« Reply #1 on: December 16, 2018, 01:50:55 pm »
Judging by the line number where it failed I assume you have a massive program being compiled there which exceeded memory limits. Could that be the case?

Offline Ryster

  • Newbie
  • Posts: 77
    • View Profile
Re: Compiler error
« Reply #2 on: December 16, 2018, 02:16:55 pm »
Exceeded memory limit - I think so too. The .bas file has 3.98 MB. I installed Mingw-w64 downloaded from https://sourceforge.net/projects/mingw-w64/.

FellippeHeitor

  • Guest
Re: Compiler error
« Reply #3 on: December 16, 2018, 02:19:11 pm »
Not much that can be done. If this is a program that's been processed by vWATCH, then probably vWATCH is not your solution right now, as it more than triples the original file size for the debug session to occur.

Now if this is solely your code, then you might consider reducing parts of it. We can help take a look if you're willing to share it.

Offline Ryster

  • Newbie
  • Posts: 77
    • View Profile
Re: Compiler error due to memory limits
« Reply #4 on: December 16, 2018, 02:26:31 pm »
No, I did not use vWatch. I wrote about it a few days ago, but no one answered so I deleted the post. The Mingw-w64 compiler simply can not do it. Maybe you know a more efficient version of Mingw.

FellippeHeitor

  • Guest
Re: Compiler error due to memory limits
« Reply #5 on: December 16, 2018, 02:39:24 pm »
I only use the one version we ship with QB64, sorry. Someone else may be able to help you.

FellippeHeitor

  • Guest
Re: Compiler error due to memory limits
« Reply #6 on: December 16, 2018, 02:42:23 pm »
Quote
First of all, welcome to all QB64 Members. My program is: about 65,000 lines of code weighing 3.98 MB (20 MB exe), but I do not want to discuss this. My program can not always be compiled. If after using the computer, I use browsers etc. probably the compilation will fail. However, I will run the compilation directly after turning on the computer, then the compilation will run correctly on 99%. I do not suspect a small amount of RAM, because it is 16GB, and should be enough for most processes. But - I use mingw-w64-bin-x86_64-20170820 and that's what I suspect about making trouble with the compilation. Maybe someone has a similar (or had) situation and remedied the problem. Greetings.

Ah, I remember this post. Are you Chris from Poland?

Offline Ryster

  • Newbie
  • Posts: 77
    • View Profile
Re: Compiler error due to memory limits
« Reply #7 on: December 16, 2018, 03:06:40 pm »
Let's talk about particulars.
Once on the QB64 replacement forum, a guest advised me to install Mingw from the manufacturer. I downloaded the file, installed it and everything was ok, until the program expanded. At the moment I have two programs: old x64, which usually (not always) compiles correctly. And the second new one given by Pete from the dropbox. And this new version does not compile the code.

FellippeHeitor

  • Guest
Re: Compiler error due to memory limits
« Reply #8 on: December 16, 2018, 03:12:46 pm »
Last time we talked about your program it was a top secret thing that mainly crashed due to the way it handled string concatenation and exceeded memory limits.

Considering we have many different massive projects that compile just fine even with the dated compiler that comes with QB64, I still assume there's some terribly inefficient code in your project that could be greatly optimized.

I hope you can find a good solution (Steve usually tries to improve the hacks to get your code compiling, let's see if he comes to the rescue).

Other than that, I'm afraid it's beyond any of us to assist you with your mysterious code, especially since it's hard to imagine what is being done there.

Offline Ryster

  • Newbie
  • Posts: 77
    • View Profile
Re: Compiler error due to memory limits
« Reply #9 on: December 16, 2018, 03:27:36 pm »
That it is not effective may be true, but it is also true that the code's syntax is correct.
As if it were Otherwise, I would never compile the code. I will not improve efficiency again. Anyway, if the code does not contain syntax errors, then it should be compileable. Otherwise, the fault lies on the compiler side. Nevertheless, thank you for your comment. Greetings.

Offline Cobalt

  • QB64 Developer
  • Forum Resident
  • Posts: 878
  • At 60 I become highly radioactive!
    • View Profile
Re: Compiler error due to memory limits
« Reply #10 on: December 16, 2018, 04:07:44 pm »
Anyway, if the code does not contain syntax errors, then it should be compileable. Otherwise, the fault lies on the compiler side.

As you point out if your code doesn't contain any errors than it should compile, if its the compilers fault then most of us here would not be able to compile either. What I suggest is to comment out sections of your code and use the MAKE EXE ONLY option till you find when it will start to compile, then go through that area of the code trying each line until you narrow it down, then you could maybe post that line and say "hey, this line kills the compiler" and maybe then a solution will present itself. Doesn't matter how big your program is you just have to methodically try throughout the whole thing.

Without the actual code for people around here to help with there is nothing more to be done.
Granted after becoming radioactive I only have a half-life!

Offline Ryster

  • Newbie
  • Posts: 77
    • View Profile
Re: Compiler error due to memory limits
« Reply #11 on: December 17, 2018, 09:50:16 am »
To Cobalt
Thank you for this advice. I will find one, second, third ... then several hundred or several thousand.

FellippeHeitor

  • Guest
Re: Compiler error due to memory limits
« Reply #12 on: December 17, 2018, 09:57:24 am »
That it is not effective may be true, but it is also true that the code's syntax is correct.
As if it were Otherwise, I would never compile the code. I will not improve efficiency again. Anyway, if the code does not contain syntax errors, then it should be compileable. Otherwise, the fault lies on the compiler side. Nevertheless, thank you for your comment. Greetings.

I respect you. Just one final remark on the subject:

Code: QB64: [Select]

No syntax errors. Compilable. Highly inefficient.

Offline pagetelegram

  • Newbie
  • Posts: 24
  • "werd" - meaning mutual consensus or understanding
    • View Profile
    • Page Telegram
Re: Compiler error due to memory limits
« Reply #13 on: December 17, 2018, 12:58:54 pm »
Chris,

Just curious: how long have you been developing this program?

I could see how changing the methods could be difficult given the amount of time and effort you put into it.

An alternative maybe to split it in separate executables that call each other, having tried in QB64 though old Qb used the CHAIN command for that.

https://www.qbasic.net/en/reference/qb11/Statement/CHAIN.htm

That way you can transfer execution to another part of your program, splitting it anyway as it seems your program execution is mostly linear?

Just curious about the secret nature; is this a program to benefit humanity or is it mostly propitiatory information you created, or something else?

Thanks
Page Telegram
<PageTelegram.com>
Document Writing
Author and Philanthropist
BBM: PT0433
Books at https://www.amazon.com/Jason-S-Page/e/B071RS8C2F/

Offline pagetelegram

  • Newbie
  • Posts: 24
  • "werd" - meaning mutual consensus or understanding
    • View Profile
    • Page Telegram
Re: Compiler error due to memory limits
« Reply #14 on: December 17, 2018, 02:18:13 pm »
Chris,

Did you try FreeBasic (fdc.exe) Might work if you give it enough time to compile.

I just hope that you compiling the program successfully doesn't result in an ending like the Tribe of the "12 Monkeys"
« Last Edit: December 17, 2018, 02:40:13 pm by pagetelegram »
Page Telegram
<PageTelegram.com>
Document Writing
Author and Philanthropist
BBM: PT0433
Books at https://www.amazon.com/Jason-S-Page/e/B071RS8C2F/