Posts: 52
Threads: 9
Joined: Sep 2022
Reputation:
0
Hello.
I'm having trouble compiling a file in Linux. I've installed the latest version of Linux. The file compiles correctly on my Windows desktop computer. The file is 5.06 MB. However, the 2.7 MB file compiles correctly in Linux. So, I open the 5.06 MB file in the QB64 dialog box. After about 16 minutes, the message "OK" appears, and then after pressing F5, compilation begins. After about 79 minutes, the system automatically restarts. I ran the procedure twice with the same result. I suspect I'm missing some RAM; my laptop has 8 GB.
Chris
Posts: 187
Threads: 14
Joined: May 2024
Reputation:
20
need more clarification.
you have two source code files. one is twice as big as the other?
what linux distribution are you using? ubuntu? linux mint? arch linux? fedora linux?
files as large as 5mb take a while to load in any text editor. i wish i had a computer with quad-core cpu and ssd and plenty of ram. to see if it's any different than on my almost 15-year-old laptop. with mechanical hdd and 4gb ram.
does your code start with option _explicit?
because there might be an expression decorated with parenthesis. without that directive. the compiler might confound for an array. you probably mean it to be a function call. if the compiler thinks there is a huge index number. for what it thinks is an array. program run could give up with "out of memory" error. but the last time this happened to me. was in qb64 phoenix 3.11. i don't know if 4.2 still does this.
Posts: 52
Threads: 9
Joined: Sep 2022
Reputation:
0
System: Ubuntu 24.04.2 LTS
QB64pe-lnx-4.2.0
Code doesn't start with the _explicit option
Chris
Posts: 52
Threads: 9
Joined: Sep 2022
Reputation:
0
07-11-2025, 05:07 PM
(This post was last modified: 07-11-2025, 05:08 PM by Chris.)
After adding _Explicit to the code, it displays errors in the program, where without this option everything is ok.
Chris
Posts: 52
Threads: 9
Joined: Sep 2022
Reputation:
0
Let me explain in more detail. If I compile a 3MB file, there's no problem. It restarts when I try to compile a 5.06MB file. I moved the computer to the basement, where it's really cool. So it's not overheating.
Chris
Posts: 3,446
Threads: 376
Joined: Apr 2022
Reputation:
345
Without the code, I don't think anyone is going to be able to help you. File size is seldom an issue (I don't know what the limits are, but I've certainly compiled files much larger than 5mb in the past.)
Is the code using too much compiler stack space? Too many variable names? Too many nested IFs? Too many sub/function calls without proper returns? Is it getting bogged up trying to optimize or unravel structures?
Without the code, who knows! The issue could be any countless little things, or internal limitations.
At this point, all you can do is:
1) Share the code and hope someone has time and is nice enough to check it all out for you to try and dig into the problem. Usually our dev team is pretty happy to do this as we're curious folks ourselves and like to know what they of odd limit someone found -- but it's the middle of summer and everyone is busy with lifeing.... a 5mb bas file isn't nothing small to sneeze at, and that's asking a lot of anyone to sir down and take a look at it after a hot grueling day out in the 90+ degree sunlight.
OR
2) Strip out segments of code, say 1000 lines at a time until it compiles. When you find it WILL compile again, add in the other code *except* that last 1000 lines. If it still keeps compiling after that, then you know whatever the issue is, it's in the flow of those 1000 times. Add them back in 100 lines at a time until you can pinpoint the issue. Once found/zoomed in on in such a manner, finally fix the issue yourself.
Posts: 52
Threads: 9
Joined: Sep 2022
Reputation:
0
SMcNeill, as always, you're right.
The holiday season isn't the optimal time for troubleshooting. It's not a matter of life and death that needs to be resolved. I won't burden someone with analyzing over 86,000 lines of code, because what good would they do? The multitude of possible causes disqualifies me from even bothering with it. I'll stick with the Windows version, which works flawlessly. Thanks everyone for the advice, and have a nice weekend.
Chris