After upgrading to a newer version of VBA some time
back our BIOS file started failing due to its size. Looking
at the code the new VBA only accepts BIOS file sizes of
16384 (0x4000) bytes and our file was 32768 bytes. I
trimmed our file and it worked however there are some
bugs related to the bios file size validation and loading.
1. If an invalid BIOS file is selected, VBA will notify and
run correctly but will crash on exit.
2. When VBA notifies that the BIOS size is incorrect, it
should give some indication of what a valid size would
be.
Also looking at the code there seem to be problems with
how memory is handled and freed in the three different
scenarios 1. no bios, 2. bios loaded, 3. bios failed to
load. I believe this is probably leading to the crash on
exit above and also probably a memory leak in the case
that bios is successfully loaded.
Logged In: YES
user_id=335241
The crash is due to memory corruption because the allocated
buffer is smaller than the data being read. Easy to fix.
As for memory leak, there is no memory leak. If you really
think so, please show the memory that is not being
deallocated and on what version of the emulator.
Logged In: YES
user_id=38396
You are right there is no memory leak. I misread utilLoad.
Logged In: YES
user_id=335241
Crash and other possible corruption are now fixed but
message won't be changed.