Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
06389 Interface Minor Always Sep 26, 2016, 22:30 Nov 10, 2016, 00:07
Tester gcomes View Status Public Platform SDLMAME
Assigned To bradhugh Resolution Fixed OS Linux (64-bit)
Status [?] Resolved Driver
Version 0.177 Fixed in Version 0.181 Build Normal
Fixed in Git Commit Github Pull Request #
Summary 06389: Internal UI: Game selection jump
Description pressing arrow up key or arrow down key moves the highlighted game two lines up or down instead of one line
Steps To Reproduce start mame with:
  mame -snapshot_directory <SNAPSHOT-PATH>
so that game snapshot image is shown on the right.
Press the up or down arrow key. The game highlighted will move up or down two times instead of one.
If you start mame without providing snapshots (the message No image Available is shown on the right) then the arrow keys work properly.
Additional Information This bug was introduced in mame 175 with:

commit 7f22918675bbac5012d88f6ac97921066414b03f
Author: Vas Crabb <vas@vastheman.com>
Date: Sat Jun 25 20:56:46 2016 +1000
    Supply modified time for files in archives [Vas Crabb]

I narrowed down the issue to file: src/lib/util/unzip.cpp, function: zip_file_impl::search, call: decode_dos_time
That's at line 708 in mame 177 source code:

m_header.modified = decode_dos_time(reader.modified_date(), reader.modified_time());

If I comment such line then the bug disappear.
Github Commit
Flags
Regression Version 0.175
Affected Sets / Systems Internal UI
Attached Files
 
Relationships
There are no relationship linked to this issue.
Notes
6
User avatar
No.13205
Tafoid
Administrator
Sep 27, 2016, 03:42
I'm not seeing the behavior in Windows with 0.177 or current GIT with the set of snapshots I got. So, I sought out a package (based on 0.170) and tried those without noticing any issues with an arrow push up or down skipping an entry.
Other than making sure you don't have any other mappings to your UI navigation, I'm not sure what your issue may be at this point.
User avatar
No.13206
gcomes
Tester
Sep 27, 2016, 03:51
Examinig the commit that introduced the bug make me suspect that the problem exists only on SLDmame (the windows version should be fine). Please try to verify the bug on linux. Also the problem exists since mame 175. Earlier version didn't have such problem.
User avatar
No.13207
cuavas
Administrator
Sep 27, 2016, 07:46
Unless you can show that the line in question is capable of a heap smash, there is no way that it is capable of causing your issue. Also, that particular commit was developed on OSX, using the SDL OSD, so if anything it should have broken on Windows if I was being careless about portability.
User avatar
No.13209
gcomes
Tester
Sep 27, 2016, 17:29
edited on: Sep 27, 2016, 17:31
More info about the bug.
Tested on windows: no bug seen.
On linux (openSUSE 42.1) the bug is related to the dataset provided. I have a snap.zip file which is 1.4GB and contains about 36200 png files.
If I unzip the file in <SNAPSHOT-PATH> and I run
  mame -snapshot_directory <SNAPSHOT-PATH>
then I don't see the bug. But if I put in <SNAPSHOT-PATH> the file snap.zip alone, then I see the bug.
I repacked the archive as snap.7z and I still see the bug.
I reduced the size of snap.zip to about 370MB replacing the png files with heavily compressed jpg files and I still see the bug.
I reduced then the number of files in snap.zip, if the number of files is less than 22000, I don't see the bug,
if the number of files is more than 26000, I see always the bug. If the number of files is in between, then the jump doesn't happen all the time and it is related to position in the list. On some entries it jumps, on some others it doesn't.
You can test yourself all what I said in this way: download this opensuse live iso image:
  http://download.opensuse.org/repositories/KDE:/Medias/images/iso/openSUSE_Argon.x86_64-5.7.90-Build1.58.iso
boot from the dvd iso image on some real hardware or in a virtual machine, in the live environment download and Install mame from
  http://download.opensuse.org/repositories/Emulators/openSUSE_Leap_42.1/x86_64/ (you need mame and mame-data rpm)
have a snap.zip file big enough and run the command I showed before.
User avatar
No.13325
bradhugh
Developer
Nov 6, 2016, 23:51
See my note in https://github.com/mamedev/mame/issues/1169. I may have a repro. gcomes, can you help confirm? If you disable the autorepeat functionality by swapping in 0's for 6's in selmenu.cpp does it repro? Need to confirm the issue you're seeing is related to auto-repeat before attempting any fixes.
User avatar
No.13345
gcomes
Tester
Nov 10, 2016, 00:07
I can confirm that disabling autorepeat by swapping in 0's for 6's in selmenu.cpp fixes the problem for me.