Editor, Emulator Coder
Joined: 8/7/2008
Posts: 1156
Since youve discovered it's a combination of movies and not a specific movie, I know it's a bug that has been fixed in recent commits (the bug is random and didnt happen to me with all your movies on windows 10). Use an interim build or wait for the next release.
Amaraticando
It/Its
Editor, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
io.open() seems to have problems inside event.onexit(). The following code fails to save the file:
Language: lua

event.onexit(function() local filename = "random_name.txt" print(filename) local file, err = assert(io.open(filename, "w"), "Error loading file :" .. filename) file:write("some BS text") file:close() end)
However, I can easily do it in the main loop.
Editor, Emulator Coder
Joined: 8/7/2008
Posts: 1156
the file may not be getting opened from the right PWD. directory. use fully qualified paths or use process monitor to watch for random_name.txt and verify whether the wrong PWD is getting used for onexit
Amaraticando
It/Its
Editor, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
You were right. By default, the path is relative to the folder the script is in. By the time onexit is called, the default becomes BizHawk's folder. Can I know the current script's absolute filename or directoy from within the script?
Editor, Emulator Coder
Joined: 8/7/2008
Posts: 1156
i dunno, check the lua libraries. Write up a bug for this one: PWD incorrect from event.onexit
Alyosha
He/Him
Editor, Expert player (3521)
Joined: 11/30/2014
Posts: 2726
Location: US
Hi, I am trying to import an fm2 movie from fceux 2.2.2. After converting it using bizhawk I tried importing it and got this error: When I hit ok, it just pops up again (I hit ok at least 20 times and it kept repeating) The movie is a 2 player movie of ice climber. Bizhawk 1.11.1
Editor, Emulator Coder
Joined: 8/7/2008
Posts: 1156
post url of movie youre trying to import, so we have an actual test case
Alyosha
He/Him
Editor, Expert player (3521)
Joined: 11/30/2014
Posts: 2726
Location: US
I tried posting it just now and I got parser error, so must be something wrong with the file. I tried just now converting it again and it worked this time, so I must have done something wrong along the way. Here's the broken one: https://www.dropbox.com/s/30li0sy4f6fpgkz/ice%20climber2.fm2.bk2?dl=0
Editor, Emulator Coder
Joined: 8/7/2008
Posts: 1156
alyosha, I would need the original fm2 in order to debug it, but since you got it working, it's not very interesting. adituv, thanks for reporting that, but just so you know, this feature is being developed right now, right?
Player (74)
Joined: 8/26/2015
Posts: 70
I'm new around here, and didn't know that, no :). I hope it helps, anyway!
Site Admin, Skilled player (1236)
Joined: 4/17/2010
Posts: 11264
Location: RU
AdituV wrote:
I'm new around here, and didn't know that, no :). I hope it helps, anyway!
I'm not sure what of the things you've mentioned is already fixed, is it possible for you to access the latest nightly build? I see you're using the latest. Will look into those errors then.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Editor, Skilled player (1938)
Joined: 6/15/2005
Posts: 3246
On Windows, there is a bug where a minimized BizHawk window cannot be restored by clicking on it while a video dump using FFmpeg writer (from Record AVI/WAV) is running and not paused. 1) Open ROM 2) Record AVI/WAV 3) FFmpeg writer 4) Any format (I tested mp4, WebM, Ogg, FLV and Uncompressed AVI) 5) Unpause emulation 6) Minimize window 7) Attempt to restore window by clicking on it on the toolbar The window will fail to restore and an error noise will play. This is more obvious when "Run in background" is checked (in Config -> Customize...). OS is Windows 7 Home Premium. Note that the window can be restored if you click on it and then press the Enter key.
Editor, Emulator Coder
Joined: 8/7/2008
Posts: 1156
I think we've wrestled with this before on n64 (not completely sure why that one, but the problem has to do with how long the main thread is suspended). If that's it, it's related to the shell doing something unusual for sending taskbar commands. The unusual stuff wrecks it when the main thread is suspended at any point other than a message pump--in this case, it's suspended spooling data to ffmpeg. It's not clear why microsoft has to do this when it breaks so many programs (it definitely does) and is so unusual. Microsoft says we shouldnt have this problem because we shouldnt ever suspend the UI thread, but they're full of shit. Basically nobody programs UIs any other way except for mickey mouse stuff because it requires you to add logic which could essentially process commands from the UI in any random nonsensical order. I think nobody in the world fully understands this problem. I addressed it somehow for n64 in commit cfa433a9a6b8dcac9df4ae2ba3ddd63b94bf6eb2 but maybe incompletely. I think I remember deciding the win32 event wait function worked OK while the .net one would additionally run the message pump which made the main UI thread re-enter. Unfortunately I was unable to make this same workaround help for the ffmpeg scenario. This problem for n64 did only happen in windows 7+
Post subject: Bug: Left the Lua scripting running for over 24 hours.
tom_mai78101
He/Him
Player (100)
Joined: 3/16/2015
Posts: 160
I left Bizhawk running a MarI/O Lua script (The one Sethbling wrote for Super Mario Bros. 3) for a full day. Around the 26th hour, it reports the following and crashes the emulator. Here's the output error messages: System Specs: Alienware 13 Laptop Intel i5 Nvidia Geforce 860M. 8GB of RAM
Editor, Emulator Coder
Joined: 8/7/2008
Posts: 1156
that happens when bsnes crashes. I've never heard of that happening before. Lots of folks have run mari/o for a long time. I suspect your cpu burped.
Lil_Gecko
He/Him
Player (94)
Joined: 4/7/2011
Posts: 520
Final Fantasy IX. Loading time are the same than in psxjin however for the same number of frames the in-game timer goes way too fast in Psxhawk. For exemple at frame 8500. In psxjin : In-Game Time = 2min21 which matches the frame number. In BizHawk : In-Game Time = 2min25. Is that a setting problem on my end ?
Editor, Emulator Coder
Joined: 8/7/2008
Posts: 1156
How did you get the in-game timer to match the frame counter anyway? That doesn't make sense. The game isn't even running yet at frame 0, the bios takes some time to load it. Then the bios takes some time to boot up. Anyway, that's not evidence of a timer running way too fast without another data point. It could be evidence of the clock being offset by 4 seconds, depending on what point it begins at. It is not a setting problem on your end. If this is real, it may be a bug. Mednafen may be running some longer or shorter frames than psxjin but that would probably only happen during loading and mode switches, it should be stable within a scene, and it would only create an offset, not a problem with the speed. I would be amazed if the game was doing anything but counting vsyncs for its timer. It's hard to see how mednafen or psxjin either could get this wrong. But note that counting vsyncs may be hard on the psx (according to psx-spx), and an emulator with different timing may be stressing the bios's vblank irq and making the game lose vsync counts. It would be impossible to judge which emulator was more accurate without comparing a real console to a stopwatch, but we're not going to be questioning mednafen's timing here. It's more likely to be the exact emulator with the naive timing. Perhaps you can google for more information on the FF9 in-game clock not matching reality. If other people have noticed that, then it would be proof psxjin was wrong, right?
Lil_Gecko
He/Him
Player (94)
Joined: 4/7/2011
Posts: 520
I compared it after pressing new game not at frame 0. But anyway my mistake. I don't know where I got my calcul wrong, but the intro did indeed load slower in BizHawk, FMV runs at the same speed, then transition is slower, explaining the difference at the moment of control. So everything is fine. Sorry.
tom_mai78101
He/Him
Player (100)
Joined: 3/16/2015
Posts: 160
zeromus wrote:
that happens when bsnes crashes. I've never heard of that happening before. Lots of folks have run mari/o for a long time. I suspect your cpu burped.
Well, it consistently crashes exactly at around 26 hours while running MarI/O. My Alienware 13.... Noooo....
Editor, Emulator Coder
Joined: 8/7/2008
Posts: 1156
is your ai evolving to something that can crash bsnes? are you resuming the ai after it crashes or just starting it from scratch
tom_mai78101
He/Him
Player (100)
Joined: 3/16/2015
Posts: 160
zeromus wrote:
is your ai evolving to something that can crash bsnes? are you resuming the ai after it crashes or just starting it from scratch
I don't know if the AI is evolving to something that can crash BSNES. I'm pretty sure I haven't touched a single part of the AI. After it crashes, I just started from the last backup saved pool, which was in the 400s. It ran fine until the next 26 hours. Loaded up the backed up saved pool in the 900s. Ran fine again for 26 hours. It's been like that for a few days since I last posted here. All consistent. The AI is downloaded, not modified in whatever way. It's the MarI/O version straight from what Sethbling provided.
Editor, Emulator Coder
Joined: 8/7/2008
Posts: 1156
i would imagine many people have run it for something like 26 hours. there must be something weird about your system configuration that kills bsnes eventually. in a few days ill run a mari/o of my own and see if it crashes eventually. which bsnes profile are you using?
tom_mai78101
He/Him
Player (100)
Joined: 3/16/2015
Posts: 160
zeromus wrote:
which bsnes profile are you using?
Not sure what you mean by "profiles'. If it's this one (below), then it's Casual Gaming. If that isn't it, then I don't know. The steps I did for starting up MarI/O until it crashes are:
  1. Download the Mario-evolve.zip in the MarI/O thread
  2. Run the BAT file that said to run it in the README file.
  3. Start up the EmuHawk.exe.
  4. Let it run for 26 hours.
And that's it.
Joined: 4/7/2015
Posts: 2
How far away is gliden64? it's been included on github for some time. I only ask because I'm looking to do a tas and it results in different timing when compared to the other plugins so resyncing runs would be difficult. For the best possible case I'd have to start using that plugin from the get go.
Amaraticando
It/Its
Editor, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
tom_mai78101 wrote:
Not sure what you mean by "profiles'. If it's this one (below), then it's Casual Gaming.
The casual gaming profile uses the bsnes performance core, while the TAS profile uses the compatibility core (more accurate, tested, stable).