Welcome!

Final Burn Neo => FBN Discussion => Topic started by: hayashik on February 12, 2022, 09:23:40 PM

Title: it takes a long time to run fbn and mame [SOLVED]
Post by: hayashik on February 12, 2022, 09:23:40 PM
I used to play fbn copule years ago, and it works great!

Recently I got a new PC (12700K, 3080ti, Win11) and tried to play emulators,

but it takes about 40s to load fbn itself, 90s to load game (kof95), 40s to exit the game!

Have the same issue occurred on MAME (takes a long time to load MAME itself, load and exit game)

Yet, I tried to use winkawaks, MAME old version (0.159), it's working great.

I'm certainly sure there is no any maleware or virus on my computer since I also formatted and reinstall win11.

Does anyone know how to fix the problem?
Title: Re: it takes a long time to run fbn
Post by: barbudreadmon on February 13, 2022, 03:07:24 AM
I'm using a 12700KF here with a fresh install of win11, and everything is fine, so it seems to be an issue specific to your setup.
Did you install an antivirus ? Maybe it's delaying the application for some reason.

You are using our latest official build, right ?
Make sure you use the build from https://github.com/finalburnneo/FBNeo/releases/download/latest/Windows.x32.zip (note: this link becomes unavailable for ~10 minutes every time we push new stuff, so try again later if it happens to you).
Title: Re: it takes a long time to run fbn
Post by: hayashik on February 13, 2022, 09:42:01 AM
I've tried to use the latest official build, but still doesn't work.
I don't have any antivirus software but windows defender on my PC.
It's driving me crazy  :eek:


Title: Re: it takes a long time to run fbn
Post by: dink on February 13, 2022, 11:41:38 AM
I have an idea to try to find what is causing the slowness,
first download the debug version @ here: https://github.com/finalburnneo/FBNeo/releases/download/latest/Windows.x32.Debug.zip

load it up, set it up, start a game, also go into: Misc -> Options and turn on "Show Debug Console (requires restart)"
make sure it's on, quit fbneo, now load fbneo while taking a video of it
as it loads up, make sure the text window and main fbneo window are in focus of the video

now load a game, continue recording

also exit fbneo, while still recording, then upload the video somewhere (youtube preferrable, or anonfiles.com or sendspace.com if you don't have an account on youtube)

then I can watch the video and see where it's getting stuck.

If it doesn't help, there's some other things we can try...  :)

p.s. did you install the directx 9 2010 from here:  https://www.microsoft.com/en-us/download/8109  ?

best regards,
- dink


Title: Re: it takes a long time to run fbn
Post by: hayashik on February 13, 2022, 11:02:13 PM
Really appreciate your help and I did installed directx 9 2010 and the latest version of directx.

I've uploaded the video to youtube https://youtu.be/J78mD9OP44Y

Title: Re: it takes a long time to run fbn
Post by: dink on February 14, 2022, 12:05:16 AM
It looks like its stalling when querying the display adapter info, some things to try:
select a different blitter from Video -> Select Blitter "Experimental" or "DirectX9 Alt"
maybe try unchecking "Enable High Resolution system timer" in Misc -> Options

If still nothing works, maybe re-install gfx drivers might help

best regards,
- dink
Title: Re: it takes a long time to run fbn
Post by: hayashik on February 14, 2022, 12:46:51 AM
Sadly, still nothing works.
Title: Re: it takes a long time to run fbn
Post by: barbudreadmon on February 14, 2022, 02:59:24 AM
Does it happen if you lower your desktop resolution ? Yours might be 4k or something ? I kinda remember there were some compatibility issues between older directx apps and high desktop resolutions.
Title: Re: it takes a long time to run fbn
Post by: hayashik on February 14, 2022, 04:34:19 AM
lowering the resolution, using another graphic card (RX580) and connecting my pc to a FullHD monitor.

But still nothing works  :S
Title: Re: it takes a long time to run fbn
Post by: barbudreadmon on February 14, 2022, 07:30:06 AM
Could you test the following 2 builds ?

https://github.com/finalburnneo/FBNeo/releases/download/latest/Windows.x32.Test.zip
https://github.com/finalburnneo/FBNeo/releases/download/latest/Windows.x64.Test.zip
Title: Re: it takes a long time to run fbn
Post by: dink on February 14, 2022, 09:17:22 AM
Also a thing to try, let's rule out a problem with your hdd:
insert a usb stick drive and install a fresh fbneo and roms on it, then try?

(don't copy pre-installed fbneo to it, as it will refer to the hdd for some things)

barbudreadmon, off topic, but, I think its good to provide a x64 binary now since we now have a decent blitter to go with it (dx9), so it's a good idea to leave it there after the test.

best regards,
- dink
Title: Re: it takes a long time to run fbn
Post by: hayashik on February 14, 2022, 09:42:04 AM
Just follow your instruction, installing a fresh fbneo (32&64) and roms on a USB stick drive.

The result is disappointing!
Title: Re: it takes a long time to run fbn
Post by: Stifu on February 14, 2022, 11:34:29 AM
Maybe a silly suggestion, but you could try forcing an earlier Windows compatibility mode on the FBN exe.
That said, if that worked, I'd expect other people to have the exact same problem as you.
Title: Re: it takes a long time to run fbn
Post by: hayashik on February 14, 2022, 08:13:59 PM
I've tried to run FBN in compatibility mode for windows 8 and 7.

It didn't work.
Title: Re: it takes a long time to run fbn
Post by: dink on February 14, 2022, 08:42:33 PM
This is quite a mystery!
In the task manager, if you sort by cpu usage, what does it look like when fbn or mame is stuck loading slowly?

There's a debug program called Very Sleepy that might help, or it might at least tell us where it's hanging at the OS-level.

You'll need a special FBNeo debug exe with symbols, please use only this .exe for the test:
https://www.sendspace.com/file/cd34mf
If you want, you can rename it to the same name as previously-installed fbneo exe to use it's configuration file.

Grab Very Sleepy here: http://www.codersnotes.com/sleepy/  & install it
it's a free & opensource profiler/debugger tool, the installer does not have any tricks or malware garbage.

Please start recording screen like you did previously :)

Start Very Sleepy
Start FBNeo

In the VS window, click Tools -> Refresh
Find fbneo exe in the list and click once on it, you might have to expand the window a bit to fit all the stuff in the right-side window.
record here for a few seconds while it's stuck-slowly loading

Now, double click on fbneo in the list, it will open a little dialog that says "sampling", after it samples for 5 seconds, click the Stop button.
-- it will process some stuff for a little while, just wait until it's done --  If it gets stuck for more than 2 minutes, close the process and try again.
p.s. Also make sure it does this sampling while fbneo is stuck/slowly loading. :)

When it goes back to the sleepy program with a bunch of stuff in the list, maximize the window and record here for 20 seconds or so.

best regards,
- dink
Title: Re: it takes a long time to run fbn
Post by: dink on February 14, 2022, 08:50:12 PM
Did you try to disable real-time protection in Windows Defender?
Title: Re: it takes a long time to run fbn
Post by: hayashik on February 14, 2022, 10:07:56 PM
I've tried disable real-time protection in Windows Defender, but it didn't work too.

Just upload, maight have to wait a couple minutes to watch them in HQ

https://youtu.be/srHYqTs1vQc

https://youtu.be/gpUUOgGmtuY
Title: Re: it takes a long time to run fbn
Post by: dink on February 14, 2022, 11:20:36 PM
Hi,
It appears to be hanging while enumerating the directinput devices.
From what I've found so far, some keyboards cause this problem, and also some usb headsets cause this problem.

Try unplugging usb devices including keyboard, and try it until you find which one is the problem. 

Sometimes moving the usb device to another port might help, and sometimes upgrading their drivers might help.  If you can find which device exactly, then we can do some research how to deal with it.

best regards,
- dink
Title: Re: it takes a long time to run fbn
Post by: dink on February 14, 2022, 11:25:50 PM
Here's some info I found on stackoverflow:
https://stackoverflow.com/questions/10967795/directinput8-enumdevices-sometimes-painfully-slow

Scroll down to the "7 Answers" part. They talk about different devices that cause this problem, perhaps you have one of them?

best regards,
- dink
Title: Re: it takes a long time to run fbn
Post by: hayashik on February 15, 2022, 02:00:23 AM
The mystery solved!

The USB device that causes this issue is my monitor (FI32U).

Unplugging it does the trick. FBN and MAME are working great now.

You guys are livesavers!
Title: Re: it takes a long time to run fbn
Post by: dink on February 15, 2022, 09:32:02 AM
hayashik, that's great news, always glad to help! :)

I think it might be helpful to others if you leave the videos that you made on youtube, what do you think?

best regards,
- dink
Title: Re: it takes a long time to run fbn and mame [SOLVED]
Post by: hayashik on February 16, 2022, 01:45:14 AM
dink, That's out of question, I'll leave the videos on my youtube!