Author Topic: FB Alpha 0.2.97.43 Bug Reports  (Read 479174 times)

Offline nee

  • New Member
  • *
  • Posts: 2
  • Karma: +0/-0
Re: FB Alpha 0.2.97.40 Bugs Reports
« Reply #750 on: July 20, 2017, 03:34:34 PM »
I found this segfault/crash launching kov2p, in versions 0.2.97.40 and 0.2.97.42. The stack trace is from the libretro version.

I reported it to the libretro port maintainer but I think I confused them, and it might be helpful if people who are more familiar with the codebase can look at this, since it's likely a memory safety issue or overflow in the emulation code.

Thread 1 "retroarch" received signal SIGSEGV, Segmentation fault.
0x00007fffe6778497 in Arm7ReadByte (addr=939524096) at src/cpu/arm7_intf.cpp:208
208                     return membase[READ][addr >> PAGE_SHIFT][addr & PAGE_BYTE_AND];
(gdb) bt
#0  0x00007fffe6778497 in Arm7ReadByte (addr=939524096) at src/cpu/arm7_intf.cpp:208
#1  0x00007fffe677fb1d in arm7_cpu_read8 (addr=939524096) at src/cpu/arm7/arm7core.c:187
#2  0x00007fffe6788eaa in Arm7Run (cycles=277) at src/cpu/arm7/arm7exec.c:802
#3  0x00007fffe61a09c0 in pgmFrame () at src/burn/drv/pgm/pgm_run.cpp:873
#4  0x00007fffe5d4eade in BurnDrvFrame () at src/burn/burn.cpp:719
#5  0x00007fffe68ea5b0 in ForceFrameStep () at src/burner/libretro/libretro.cpp:795
#6  0x00007fffe68ebcb0 in retro_run () at src/burner/libretro/libretro.cpp:1317
#7  0x000000000040d819 in core_run () at core_impl.c:415
#8  0x0000000000411e35 in runloop_iterate (sleep_ms=sleep_ms@entry=0x7fffffffe8ec) at retroarch.c:3051
#9  0x000000000040c732 in rarch_main (argc=1, argv=<optimized out>, data=0x0) at frontend/frontend.c:129
#10 0x00007ffff55f64ca in __libc_start_main () from /usr/lib/libc.so.6
#11 0x0000000000409fba in _start ()


I can reproduce this consistently on one of my machines, but I've found that reproducing it in general is highly dependent on the operating system/host CPU, among other factors. kov and kovplus don't trigger it, but kov2p, kovsh, and theglad do.
« Last Edit: July 20, 2017, 03:46:02 PM by nee »

Offline dink

  • Administrator
  • *****
  • Posts: 5014
  • Karma: +449/-1
  • pie? I nearly bought one!
Re: FB Alpha 0.2.97.40 Bugs Reports
« Reply #751 on: July 23, 2017, 07:24:30 AM »
I found this segfault/crash launching kov2p, in versions 0.2.97.40 and 0.2.97.42. The stack trace is from the libretro version.

I reported it to the libretro port maintainer but I think I confused them, and it might be helpful if people who are more familiar with the codebase can look at this, since it's likely a memory safety issue or overflow in the emulation code.

I see the problem, thanks for the bug report :)

code change:
Code: [Select]
Index: arm7_intf.cpp
===================================================================
--- arm7_intf.cpp       (revision 4897)
+++ arm7_intf.cpp       (working copy)
@@ -391,6 +391,7 @@

        for (INT32 i = 0; i < 3; i++) {
                membase[i] = (UINT8**)malloc(PAGE_COUNT * sizeof(UINT8*));
+               memset(membase[i], 0, PAGE_COUNT * sizeof(UINT8*));
        }

        CpuCheatRegister(nCPU, &Arm7CheatCpuConfig);

best regards,
- dink
« Last Edit: July 23, 2017, 07:41:54 AM by dink »

Offline nee_

  • New Member
  • *
  • Posts: 1
  • Karma: +0/-0
Re: FB Alpha 0.2.97.42 Bugs Reports
« Reply #752 on: July 23, 2017, 02:13:04 PM »
Marvellous, thank you very much.

(Unfortunately I can't get a password reset email from this forum.  :redface: )

Offline Wildman1024

  • Newbies
  • *
  • Posts: 18
  • Karma: +0/-0
Re: FB Alpha 0.2.97.42 Bugs Reports
« Reply #753 on: August 03, 2017, 11:16:24 PM »
Hi.  I'm still having some sound and graphical issues in Strikers 1945 plus.  I only have the issue when using the "Zero Fighter" plane.  The super shot explosion is distorted.  Also the music in some levels will skip around or loop or just stop.  You also get some random white noise pops.  Unsure why but it seems limited to using that plane. 

Thanks for the help and all you have done with the emulator.

Offline dink

  • Administrator
  • *****
  • Posts: 5014
  • Karma: +449/-1
  • pie? I nearly bought one!
Re: FB Alpha 0.2.97.42 Bugs Reports
« Reply #754 on: August 04, 2017, 01:51:12 PM »
Wildman1024, I played the first 2 levels with Zero Fighter on my p4/winxp system and could not reproduce any glitches to audio/video as you mentioned. 
Did you watch the FPS counter while playing the game?  it can be toggled w/backspace.  Does the FPS stay at or above 58?  Does it dip down a bit when the glitches occur?  If it dips down below the upper 50's, try enabling Auto Frameskip under Video.  Also try the XAudio2 audio plugin under the Audio tab, and if it still doesn't help, try increasing the
"buffer size" (under Audio tab again)

Since I can't reproduce the problem on my side, and if some settings don't help - I'll need you to give me some more information and an input recording (Game -> Replay -> Record Input), then attach it to a message here and let me know around the frame #'s the glitches happen - After you record it, play it back and watch the frame counter.

best regards,
- dink
« Last Edit: August 04, 2017, 01:54:00 PM by dink »

Offline Wildman1024

  • Newbies
  • *
  • Posts: 18
  • Karma: +0/-0
Re: FB Alpha 0.2.97.42 Bugs Reports
« Reply #755 on: August 04, 2017, 08:25:51 PM »
Wildman1024, I played the first 2 levels with Zero Fighter on my p4/winxp system and could not reproduce any glitches to audio/video as you mentioned. 
Did you watch the FPS counter while playing the game?  it can be toggled w/backspace.  Does the FPS stay at or above 58?  Does it dip down a bit when the glitches occur?  If it dips down below the upper 50's, try enabling Auto Frameskip under Video.  Also try the XAudio2 audio plugin under the Audio tab, and if it still doesn't help, try increasing the
"buffer size" (under Audio tab again)

Since I can't reproduce the problem on my side, and if some settings don't help - I'll need you to give me some more information and an input recording (Game -> Replay -> Record Input), then attach it to a message here and let me know around the frame #'s the glitches happen - After you record it, play it back and watch the frame counter.

best regards,
- dink

Dink.  Thank you for the reply.  Its greatly appreciated.

I tried the tings you mentioned and it did not help me.  I have a recording to send you.  Thank you

***Not sure how to send you the file***
« Last Edit: August 04, 2017, 08:27:57 PM by Wildman1024 »

Offline Gab75

  • FBNeo Contributor
  • *****
  • Posts: 1481
  • Karma: +33/-0
  • All games deserve to be emulated, more or less! :P
Re: FB Alpha 0.2.97.42 Bugs Reports
« Reply #756 on: August 05, 2017, 07:47:00 AM »
Hi.  I'm still having some sound and graphical issues in Strikers 1945 plus.  I only have the issue when using the "Zero Fighter" plane.  The super shot explosion is distorted.  Also the music in some levels will skip around or loop or just stop.  You also get some random white noise pops.  Unsure why but it seems limited to using that plane. 

I did various tests (with different audio settings) and I found some audio issues when I disabled the "FM interpolation".
Have you the FM interpolation enabled? If not, you can enable it in the audio menu (Audio => 4-point 3rd order FM interpolation)

Offline dink

  • Administrator
  • *****
  • Posts: 5014
  • Karma: +449/-1
  • pie? I nearly bought one!
Re: FB Alpha 0.2.97.42 Bugs Reports
« Reply #757 on: August 05, 2017, 08:17:49 AM »
Dink.  Thank you for the reply.  Its greatly appreciated.

I tried the tings you mentioned and it did not help me.  I have a recording to send you.  Thank you

***Not sure how to send you the file***

Just click "attachments and other options" when replying (under the message box), or upload the file to http://www.sendspace.com and post the link here.

thanks,
- dink

Offline jan_klaassen

  • FBNeo Dev
  • ******
  • Posts: 315
  • Karma: +10/-0
Re: FB Alpha 0.2.97.42 Bugs Reports
« Reply #758 on: August 05, 2017, 09:13:26 AM »
I did various tests (with different audio settings) and I found some audio issues when I disabled the "FM interpolation".
Have you the FM interpolation enabled? If not, you can enable it in the audio menu (Audio => 4-point 3rd order FM interpolation)

Quite right. FM interpolation is actuially a bit of a misnomer -- only if that is enabled will fba emulate the chip at the correct clock frequency / sample rate. You should always have it enabled.

Offline Wildman1024

  • Newbies
  • *
  • Posts: 18
  • Karma: +0/-0
Re: FB Alpha 0.2.97.42 Bugs Reports
« Reply #759 on: August 05, 2017, 11:31:30 AM »
Just click "attachments and other options" when replying (under the message box), or upload the file to http://www.sendspace.com and post the link here.

thanks,
- dink

I do not have that option.  I will upload to your link.

https://www.sendspace.com/file/zq99er

Delete link
https://www.sendspace.com/delete/zq99er/7aa2df2d0080a9426f2e073d1970d01b
« Last Edit: August 05, 2017, 11:46:46 AM by Wildman1024 »

Offline Gab75

  • FBNeo Contributor
  • *****
  • Posts: 1481
  • Karma: +33/-0
  • All games deserve to be emulated, more or less! :P
Re: FB Alpha 0.2.97.42 Bugs Reports
« Reply #760 on: August 05, 2017, 11:49:32 AM »
I do not have that option.  I will upload to your link.

If you expand the underlying picture you can see  where is the "Attachments and other options" function... PS: I used this function to attach the picture! ;)


Offline Wildman1024

  • Newbies
  • *
  • Posts: 18
  • Karma: +0/-0
Re: FB Alpha 0.2.97.42 Bugs Reports
« Reply #761 on: August 05, 2017, 12:11:36 PM »
If you expand the underlying picture you can see  where is the "Attachments and other options" function... PS: I used this function to attach the picture! ;)

OK I see now.  I saw trying to do it through a PM not directly here.

Thank you for the "how to"
« Last Edit: August 05, 2017, 12:12:57 PM by Wildman1024 »

Offline Wildman1024

  • Newbies
  • *
  • Posts: 18
  • Karma: +0/-0
Re: FB Alpha 0.2.97.42 Bugs Reports
« Reply #762 on: August 05, 2017, 12:12:10 PM »
Here is the file


Offline Wildman1024

  • Newbies
  • *
  • Posts: 18
  • Karma: +0/-0
Re: FB Alpha 0.2.97.42 Bugs Reports
« Reply #763 on: August 05, 2017, 12:16:06 PM »
This is the explosion that I was talking about.  This is your super shot with the Zero.  Is this normal?  Doesn't seem right to me. 

Offline Gab75

  • FBNeo Contributor
  • *****
  • Posts: 1481
  • Karma: +33/-0
  • All games deserve to be emulated, more or less! :P
Re: FB Alpha 0.2.97.42 Bugs Reports
« Reply #764 on: August 05, 2017, 01:23:38 PM »
This is the explosion that I was talking about.  This is your super shot with the Zero.  Is this normal?  Doesn't seem right to me.

Unfortunately I can't try the game with the original PCB... I tried the game with MAME and the "super shot explosion" doesn't change (attached two MAME screenshots)