abbruzze / kernal64

A Scala Commodore 64, 128, VIC20, CBM2 and SuperCPU emulator
MIT License
111 stars 12 forks source link

Strange problem when running from a script #25

Closed mrdudz closed 10 months ago

mrdudz commented 10 months ago

Same procedure as every year - i am running the VICE testbench again :) I am also looking at gathering results for kernal64 1.8.4 b1 in the process.

Since i have improved the output tables a bit (essentially omitting a lot of uninteresting noise), i noticed that sometimes i am getting timeouts reported for tests that would run correctly when i do it manually (which is really odd).

For example when i call the testbench script like this:

EMUDIR="~/kernal64/kernal64-1.8.4_b1/" ./testbench.sh kernal64c64 selftest --verbose

i see for example this: (*)

(cartridge:c64-pass.crt) ./selftest/  - [screenshot][PAL: ./selftest//references/c64-pass.crt.png]RUN: ~/kernal64/kernal64-1.8.4_b1///k64.sh --ignore-config-file --testcart --headless --warp --vic-palette pepto --screen-dim 1 --cpujam-continue true --sid-cycle-exact --cart ./selftest//c64-pass.crt --limitcycles 10000000 --screenshot ./selftest//.testbench/c64-pass.crt-kernal64c64.png 
Using 'DE' keyboard layout
ExpansionPort{crt=Cartridge[C64 CARTRIDGE   ] VICE CART type=0 EXROM=false GAME=true CHIPS=[CHIP bank=0 loadAddress=8000 romSize=4096] game=true exrom=false
        romlBanks=<0 -> ROM(VICE CART-roml-0)[startAddress=8000 length=4096]>
        romhBanks=<>}
Fatal error occurred on cycle 320: PC=801E AC=08 XR=F3 YR=00 SP=FF NV#BDIZC=N-#--I-C
801E  CA        DEX           
java.io.FileNotFoundException: 
        at ucesoft.cbm.CBMComputer.loadSettings(CBMComputer.scala:685)
        at ucesoft.cbm.c64.C64.turnOn(C64.scala:495)
        at ucesoft.cbm.CBMComputer$.turnOn(CBMComputer.scala:29)
        at ucesoft.cbm.c64.C64$.delayedEndpoint$ucesoft$cbm$c64$C64$1(C64.scala:24)
        at ucesoft.cbm.c64.C64$delayedInit$body.apply(C64.scala:23)
        at scala.Function0.apply$mcV$sp(Function0.scala:42)
        at scala.Function0.apply$mcV$sp$(Function0.scala:42)
        at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)
        at scala.App.$anonfun$main$1(App.scala:98)
        at scala.App.$anonfun$main$1$adapted(App.scala:98)
        at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:575)
        at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:573)
        at scala.collection.AbstractIterable.foreach(Iterable.scala:933)
        at scala.App.main(App.scala:98)
        at scala.App.main$(App.scala:96)
        at ucesoft.cbm.c64.C64$.main(C64.scala:23)
        at ucesoft.cbm.c64.C64.main(C64.scala)
exited with:  1
run_screenshot exited with:  1
timeout 

So somehow java crashed (?) and the k64.sh script returned 1 as a result. I have no idea what is happening there, or how to debug this further.

Any idea? :)

(*) actually to see all that output, you'll have to remove some > /dev/null redirections from the kernal64c64-hooks.sh file

abbruzze commented 10 months ago

It seems that an hidden last command line parameter is there.It parses all the command line parameters: all the strings that start with — are processed with their, if any, parameters.What remains at the end, if present, is intepreted like a PRG or D64 to attach.The FileNotFoundException is thrown because this last hidden parameter (interpreted as a file) is not found.Whery strange indeed!Is it possible that your script pass something dirty at the end ?I don’t have my laptop here with me, I just checked the code on github….Inviato da iPadIl giorno 21 nov 2023, alle ore 20:12, Bob Andrews @.***> ha scritto: Same procedure as every year - i am running the VICE testbench again :) I am also looking at gathering results for kernal64 1.8.4 b1 in the process. Since i have improved the output tables a bit (essentially omitting a lot of uninteresting noise), i noticed that sometimes i am getting timeouts reported for tests that would run correctly when i do it manually (which is really odd). For example when i call the testbench script like this: EMUDIR="~/kernal64/kernal64-1.8.4_b1/" ./testbench.sh kernal64c64 selftest --verbose

i see for example this: (cartridge:c64-pass.crt) ./selftest/ - [screenshot][PAL: ./selftest//references/c64-pass.crt.png]RUN: ~/kernal64/kernal64-1.8.4_b1///k64.sh --ignore-config-file --testcart --headless --warp --vic-palette pepto --screen-dim 1 --cpujam-continue true --sid-cycle-exact --cart ./selftest//c64-pass.crt --limitcycles 10000000 --screenshot ./selftest//.testbench/c64-pass.crt-kernal64c64.png Using 'DE' keyboard layout ExpansionPort{crt=Cartridge[C64 CARTRIDGE ] VICE CART type=0 EXROM=false GAME=true CHIPS=[CHIP bank=0 loadAddress=8000 romSize=4096] game=true exrom=false romlBanks=<0 -> ROM(VICE CART-roml-0)[startAddress=8000 length=4096]> romhBanks=<>} Fatal error occurred on cycle 320: PC=801E AC=08 XR=F3 YR=00 SP=FF NV#BDIZC=N-#--I-C 801E CA DEX
java.io.FileNotFoundException: at ucesoft.cbm.CBMComputer.loadSettings(CBMComputer.scala:685) at ucesoft.cbm.c64.C64.turnOn(C64.scala:495) at ucesoft.cbm.CBMComputer$.turnOn(CBMComputer.scala:29) at ucesoft.cbm.c64.C64$.delayedEndpoint$ucesoft$cbm$c64$C64$1(C64.scala:24) at ucesoft.cbm.c64.C64$delayedInit$body.apply(C64.scala:23) at scala.Function0.apply$mcV$sp(Function0.scala:42) at scala.Function0.apply$mcV$sp$(Function0.scala:42) at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17) at scala.App.$anonfun$main$1(App.scala:98) at scala.App.$anonfun$main$1$adapted(App.scala:98) at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:575) at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:573) at scala.collection.AbstractIterable.foreach(Iterable.scala:933) at scala.App.main(App.scala:98) at scala.App.main$(App.scala:96) at ucesoft.cbm.c64.C64$.main(C64.scala:23) at ucesoft.cbm.c64.C64.main(C64.scala) exited with: 1 run_screenshot exited with: 1 timeout

So somehow java crashed (?) and the k64.sh script returned 1 as a result. I have no idea what is happening there, or how to debug this further. Any idea? :)

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

abbruzze commented 10 months ago

I tried to run your same command on my linux VM, and of course it works using the manual mode:

@.*:/opt/testbench/vice-emu-code-r39461-testprogs/testbench$ /opt/testbench/kernal64/k64.sh --ignore-config-file --testcart --headless --warp --vic-palette pepto --screen-dim 1 --cpujam-continue true --sid-cycle-exact --cart ./selftest//c64-pass.crt --limitcycles 10000000 --screenshot ./selftest//.testbench/c64-pass.crt-kernal64c64.png*

*Using 'IT' keyboard layoutExpansionPort{crt=Cartridge[C64 CARTRIDGE ] VICE CART type=0 EXROM=false GAME=true CHIPS=[CHIP bank=0 loadAddress=8000 romSize=4096] game=true exrom=false romlBanks=<0 -> ROM(VICE CART-roml-0)[startAddress=8000 length=4096]> @.**:/opt/testbench/vice-emu-code-r39461-testprogs/testbench$ echo $?0

Using the following I can reproduce the issue: @.*:/opt/testbench/vice-emu-code-r39461-testprogs/testbench$ /opt/testbench/kernal64/k64.sh --ignore-config-file --testcart --headless --warp --vic-palette pepto --screen-dim 1 --cpujam-continue true --sid-cycle-exact --cart ./selftest//c64-pass.crt --limitcycles 10000000 --screenshot ./selftest//.testbench/c64-pass.crt-kernal64c64.png ""*

Using 'IT' keyboard layoutExpansionPort{crt=Cartridge[C64 CARTRIDGE ] VICE CART type=0 EXROM=false GAME=true CHIPS=[CHIP bank=0 loadAddress=8000 romSize=4096] game=true exrom=false romlBanks=<0 -> ROM(VICE CART-roml-0)[startAddress=8000 length=4096]> romhBanks=<>}java.io.FileNotFoundException: at ucesoft.cbm.CBMComputer.loadSettings(CBMComputer.scala:685) at ucesoft.cbm.c64.C64.turnOn(C64.scala:495) at ucesoft.cbm.CBMComputer$.turnOn(CBMComputer.scala:29) at ucesoft.cbm.c64.C64$.delayedEndpoint$ucesoft$cbm$c64$C64$1(C64.scala:24) at ucesoft.cbm.c64.C64$delayedInit$body.apply(C64.scala:23) at scala.Function0.apply$mcV$sp(Function0.scala:42) at scala.Function0.apply$mcV$sp$(Function0.scala:42) at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17) at scala.App.$anonfun$main$1(App.scala:98) at scala.App.$anonfun$main$1$adapted(App.scala:98) at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:575) at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:573) at scala.collection.AbstractIterable.foreach(Iterable.scala:933) at scala.App.main(App.scala:98) at scala.App.main$(App.scala:96) at ucesoft.cbm.c64.C64$.main(C64.scala:23) at ucesoft.cbm.c64.C64.main(C64.scala)

I added a "" at the end: in this way it recognizes the "" as an empty last parameter and tries to load it from disk.

Recently I added support for:

for Ram Cart, as you may check in the hooks, there is the --ram-cart 128 option to select a 128k ram cart.

Since the last testbench run I also added support for VIC20 and CBM machines...

Let me know if you need more support. Thanks.

On Wed, Nov 22, 2023 at 7:19 AM Alessandro Abbruzzetti @.***> wrote:

It seems that an hidden last command line parameter is there. It parses all the command line parameters: all the strings that start with — are processed with their, if any, parameters. What remains at the end, if present, is intepreted like a PRG or D64 to attach. The FileNotFoundException is thrown because this last hidden parameter (interpreted as a file) is not found. Whery strange indeed! Is it possible that your script pass something dirty at the end ?

I don’t have my laptop here with me, I just checked the code on github….

Inviato da iPad

Il giorno 21 nov 2023, alle ore 20:12, Bob Andrews < @.***> ha scritto:



Same procedure as every year - i am running the VICE testbench again :) I am also looking at gathering results for kernal64 1.8.4 b1 in the process.

Since i have improved the output tables a bit (essentially omitting a lot of uninteresting noise), i noticed that sometimes i am getting timeouts reported for tests that would run correctly when i do it manually (which is really odd).

For example when i call the testbench script like this:

EMUDIR="~/kernal64/kernal64-1.8.4_b1/" ./testbench.sh kernal64c64 selftest --verbose

i see for example this:

(cartridge:c64-pass.crt) ./selftest/ - [screenshot][PAL: ./selftest//references/c64-pass.crt.png]RUN: ~/kernal64/kernal64-1.8.4_b1///k64.sh --ignore-config-file --testcart --headless --warp --vic-palette pepto --screen-dim 1 --cpujam-continue true --sid-cycle-exact --cart ./selftest//c64-pass.crt --limitcycles 10000000 --screenshot ./selftest//.testbench/c64-pass.crt-kernal64c64.png Using 'DE' keyboard layout ExpansionPort{crt=Cartridge[C64 CARTRIDGE ] VICE CART type=0 EXROM=false GAME=true CHIPS=[CHIP bank=0 loadAddress=8000 romSize=4096] game=true exrom=false romlBanks=<0 -> ROM(VICE CART-roml-0)[startAddress=8000 length=4096]> romhBanks=<>} Fatal error occurred on cycle 320: PC=801E AC=08 XR=F3 YR=00 SP=FF NV#BDIZC=N-#--I-C 801E CA DEX java.io.FileNotFoundException: at ucesoft.cbm.CBMComputer.loadSettings(CBMComputer.scala:685) at ucesoft.cbm.c64.C64.turnOn(C64.scala:495) at ucesoft.cbm.CBMComputer$.turnOn(CBMComputer.scala:29) at ucesoft.cbm.c64.C64$.delayedEndpoint$ucesoft$cbm$c64$C64$1(C64.scala:24) at ucesoft.cbm.c64.C64$delayedInit$body.apply(C64.scala:23) at scala.Function0.apply$mcV$sp(Function0.scala:42) at scala.Function0.apply$mcV$sp$(Function0.scala:42) at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17) at scala.App.$anonfun$main$1(App.scala:98) at scala.App.$anonfun$main$1$adapted(App.scala:98) at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:575) at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:573) at scala.collection.AbstractIterable.foreach(Iterable.scala:933) at scala.App.main(App.scala:98) at scala.App.main$(App.scala:96) at ucesoft.cbm.c64.C64$.main(C64.scala:23) at ucesoft.cbm.c64.C64.main(C64.scala) exited with: 1 run_screenshot exited with: 1 timeout

So somehow java crashed (?) and the k64.sh script returned 1 as a result. I have no idea what is happening there, or how to debug this further.

Any idea? :)

— Reply to this email directly, view it on GitHub https://github.com/abbruzze/kernal64/issues/25, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACADQ6TPGI6ZKEEM7GQ5H3LYFT4KVAVCNFSM6AAAAAA7VCR3A6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGAYDIOJWHA4DANA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

mrdudz commented 10 months ago

It seems that an hidden last command line parameter is there.

crazy! that was it - never thought this could be a problem. Also strange it never was a problem before (not with kernal64, not with any of the other emulators)

Recently I added support for:

  • Super Explode Cart
  • Ram Cart
  • Isepic Cart for Ram Cart, as you may check in the hooks, there is the --ram-cart 128option to select a 128k ram cart.

OK, no dedicated tests for those though :)

Since the last testbench run I also added support for VIC20 and CBM machines...

seen that, already added :)

running another testrun now...

mrdudz commented 10 months ago

Oh, this issue can be closed, of course - not a problem of the emulator :)

Does the emulator (ie your code) even "see" the empty argument (so that it could emit a suitable warning message at least)? Or is it java itself that chokes on it?

abbruzze commented 10 months ago

Of course, it's my fault: I should check if the last parameter is an empty string...

abbruzze commented 9 months ago

Hi Bob,I was looking at the testbench’s results and I didn’t find the Kernal64/VIC20 ones.Still in progress ?Inviato da iPadIl giorno 22 nov 2023, alle ore 14:44, Bob Andrews @.***> ha scritto: Oh, this issue can be closed, of course - not a problem of the emulator :) Does the emulator (ie your code) even "see" the empty argument (so that it could emit a suitable warning message at least)? Or is it java itself that chokes on it?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

mrdudz commented 9 months ago

Ooops. Somehow i missed those - added now :)