neilsf / xc-basic3

A BASIC cross compiler for MOS 6502-based machines
MIT License
45 stars 5 forks source link

VOICE command broken in version 3.1.3 #229

Closed JJFlash-IT closed 1 year ago

JJFlash-IT commented 1 year ago

XC=BASIC compiler version v3.1.3 (Mar 15 2023) (On Windows 10 64bit)

Target: C64

A single-line program like this: VOICE 1 ON generates a runtime error from XCB:

C:\Users\xxx\Software\XCB_fresh\bin\Windows\xcbasic3 -dC:\Users\xxx\Software\XCB_fresh\bin\Windows\dasm "sidtest.bas" sidtest.prg (in directory: C:\Users\xxx\Software\xc-basic3-v3.1\_progs\)

core.exception.SwitchError@source\compiler\number.d(26): No appropriate switch clause found
----------------
0x00007FF6C822ABB7
0x00007FF6C7D47D8B
0x00007FF6C7D47D24
0x00007FF6C7FF1A70
0x00007FF6C80CBE0B
0x00007FF6C7FEE254
0x00007FF6C7FEF8CA
0x00007FF6C7FEF942
0x00007FF6C7FEF942
0x00007FF6C7FEFA58
0x00007FF6C7FEF6EB
0x00007FF6C7D27A26
0x00007FF6C8254DC3
0x00007FF6C8254BBF
0x00007FF6C8254CDF
0x00007FF6C8254BBF
0x00007FF6C8254990
0x00007FF6C822AA79
0x00007FF6C7D2D942
0x00007FF6C831C1DC
0x00007FFC54207614 in BaseThreadInitThunk
0x00007FFC546426A1 in RtlUserThreadStart

I'm using a fresh install to make sure that is not because I had messed up with the _lib files or something like that.

I also tried the Jun 4 2023 build: in that case, nothing is printed, but there's still an error condition (the compiler exits with an error code).

(Going back to version 3.1.2 which seems to work fine, as I need to put my game out this week :)

neilsf commented 1 year ago

Hi @JJFlash-IT Thanks. It is failing because 3.1.3 was built with 3.2 grammar. I'll fix that. Let me know when you release your game. Cheers

JJFlash-IT commented 1 year ago

I had a feeling it had something to do with the beta version :) Thank you for the new version! I'm sticking to 3.1.2 , though, till I put the game out (oh and don't worry, I'll tell the world when it comes out), then I'll find some time to test 3.1.4.

By the way, in order to go back to 3.1.2, simply downloading the corresponding release was not enough: the xc-basic.exe file was actually 3.1 .1 and the compiler threw weird errors once I compiled my program. I had to go to the commit history and "extract" the .exe and .pdb files from February 2023, then things worked again.

This isn't the first time I see an XCB release that is broken like I described, Unfortunately I'm ignorant about Git and everything around it, otherwise I'd be glad to help diagnosing why that happened more than once.