Author Topic: Compiler Fails in the June 7, 2021 Development Build of QB64  (Read 4129 times)

0 Members and 1 Guest are viewing this topic.

This topic contains a post which is marked as Best Answer. Press here if you would like to see it.

Offline hanness

  • Forum Regular
  • Posts: 210
    • View Profile
I have a program that compiles without difficulty on the May 22, 2021 Dev Build but the exact same code fails to compile on the June 7 release.

Error received:

Compiler error (check for syntax errors) (Subscript out of range:9-12075) on line 31 (click here or Ctrl+Shift+G to jump there)

Contents of line 31:

$ExeIcon:'iso.ico'

Note that if I comment out line 31, I will continue to get the same error but without a reference to any line number.

The program is 10,000+ lines so I won't post the whole thing here, but here are the first 45 lines of code so that you can see that line 31 in context:

   
Code: QB64: [Select]
  1. ' WIM (Windows Image Manager) Tools
  2. ' (c) 2021 by Hannes Sehestedt
  3.  
  4. ' Release notes can be found at the very end of the program
  5.  
  6. ' This program is intended to be run on Windows 10 x64 and should be compiled with the 64-bit version of QB64.
  7. ' The program is currently tested and compiled on QB64 version 1.5, May 22, 2021 Development Build.
  8. ' IMPORTANT: It is very important to use the March 17, 2021 Dev Build or newer as this fixes a bug with the
  9. ' CLEAR command.
  10.  
  11.  
  12.  
  13. ' This program needs to be run elevated. Check to see if the program is running elevated, if not,
  14. ' restart in elevated mode and terminate current non-elevated program.
  15.  
  16. If (_ShellHide(">nul 2>&1 " + Chr$(34) + "%SYSTEMROOT%\system32\cacls.exe" + Chr$(34) + " " + Chr$(34) + "%SYSTEMROOT%\system32\config\system" + Chr$(34))) <> 0 Then
  17.     Shell "powershell.exe Start-Process '" + (Mid$(Command$(0), _InStrRev(Command$(0), "\") + 1)) + "' -Verb runAs"
  18.     System
  19.  
  20. ' If we reach this point then the program was run elevated.
  21.  
  22. ' ********************************************************
  23. ' ** Make sure to keep the "$VersionInfo" updated below **
  24. ' ********************************************************
  25.  
  26. ' Perform some initial setup for the program
  27.  
  28. $ExeIcon:'iso.ico'
  29. $VersionInfo:CompanyName=Hannes Sehestedt
  30. $VersionInfo:FILEVERSION#=16,3,5,137
  31. $VersionInfo:ProductName=WIM Tools
  32. $VersionInfo:LegalCopyright=(c) 2021 by Hannes Sehestedt
  33. Width 120, 30
  34.  
  35. BeginProgram:
  36.  
  37. Print "Initializing program. Standby..."
  38.    

Note that as a test, I removed lines 30 through 39 from the program just as a test to see if any of those lines near line 31 are the cause of the error but the compiler still fails.

Other info:

Help / About Info in QB64:

QB64 Version 1.51
Development Build
From git 0a48450

I'm running the 64-bit version of QB64 on Windows 10 21H1.

Some of the main system specs on which testing was performed:

ASUS Prime Z590-A Motherboard
Intel Core i7-11700K CPU (11th Gen)
128GB RAM
1 x 1TB NVMe SSD
1 x 2TB NVMe SSD
2 x 8TB WD NAS HDs

If you need any other info, please do let me know.

- Hannes


Offline hanness

  • Forum Regular
  • Posts: 210
    • View Profile
Re: Compiler Fails in the June 7, 2021 Development Build of QB64
« Reply #1 on: June 07, 2021, 03:57:38 am »
My apologies, I should have tried this before, but I tried to compile a simple one line program and get the same error.

Literally, this was the whole program:

print "Hello"

So there seems to be some fundamental issue with that build.

Offline hanness

  • Forum Regular
  • Posts: 210
    • View Profile
Re: Compiler Fails in the June 7, 2021 Development Build of QB64
« Reply #2 on: June 07, 2021, 01:40:12 pm »
Just an update to note that the same issue is still present in the 03bb0db build.

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: Compiler Fails in the June 7, 2021 Development Build of QB64
« Reply #3 on: June 07, 2021, 02:31:20 pm »
@hanness Something seems to have happened with the GitHub build system. Fellippe and I have been looking into it.
Shuwatch!

Offline Cobalt

  • QB64 Developer
  • Forum Resident
  • Posts: 878
  • At 60 I become highly radioactive!
    • View Profile
Re: Compiler Fails in the June 7, 2021 Development Build of QB64
« Reply #4 on: June 07, 2021, 05:17:13 pm »
And people wonder why I use older versions....
Granted after becoming radioactive I only have a half-life!

Offline hanness

  • Forum Regular
  • Posts: 210
    • View Profile
Re: Compiler Fails in the June 7, 2021 Development Build of QB64
« Reply #5 on: June 07, 2021, 05:21:38 pm »
Thanks for looking into it. I simply happened to notice that there was a new dev build and thought I would test it purely out of curiosity and not driven by any specific need or issue.

I typically try to run on a released version of QB64 but there was a build in March that actually fixed an issue I had so that dev build is my base starting point.

Offline NOVARSEG

  • Forum Resident
  • Posts: 509
    • View Profile
Re: Compiler Fails in the June 7, 2021 Development Build of QB64
« Reply #6 on: June 08, 2021, 01:34:21 am »
OPTION BASE 1
DIM A(2) AS INTEGER


FOR x = 0 TO 2

    A(x) = 10
NEXT x
'ERROR      subscript out of range


Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Compiler Fails in the June 7, 2021 Development Build of QB64
« Reply #7 on: June 08, 2021, 02:08:11 am »
OPTION BASE 1
DIM A(2) AS INTEGER


FOR x = 0 TO 2

    A(x) = 10
NEXT x
'ERROR      subscript out of range

What’s wrong with the above?  By your code, I’d expect such results.

DIM A(0 TO 2) AS INTEGER will fix your problem.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline NOVARSEG

  • Forum Resident
  • Posts: 509
    • View Profile
Re: Compiler Fails in the June 7, 2021 Development Build of QB64
« Reply #8 on: June 08, 2021, 02:58:07 am »
Hi Steve

Yep , but it is easy to make a mistakes with FOR NEXT loops etc.


Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: Compiler Fails in the June 7, 2021 Development Build of QB64
« Reply #9 on: June 08, 2021, 11:01:04 am »
OPTION BASE 1
DIM A(2) AS INTEGER


FOR x = 0 TO 2

    A(x) = 10
NEXT x
'ERROR      subscript out of range
@NOVARSEG
That isn't a compilation error. That's an error at runtime.
Shuwatch!

Offline hanness

  • Forum Regular
  • Posts: 210
    • View Profile
Re: Compiler Fails in the June 7, 2021 Development Build of QB64
« Reply #10 on: June 14, 2021, 12:45:24 am »
Low priority as I can use a previous Dev build, but was just curious to know whether anything cause has yet been determined for compile errors with the current dev build.

Marked as best answer by hanness on June 18, 2021, 06:26:02 pm

Offline hanness

  • Forum Regular
  • Posts: 210
    • View Profile
Re: Compiler Fails in the June 7, 2021 Development Build of QB64
« Reply #11 on: June 18, 2021, 10:25:51 pm »
The June 14th dev build seems to resolve this issue.