Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
08318 Graphics Minor Always May 18, 2022, 09:23 Jan 19, 2024, 13:45
Tester hap View Status Public Platform MAME (Official Binary)
Assigned To Resolution Open OS Windows 10/11 (64-bit)
Status [?] Acknowledged Driver
Version 0.243 Fixed in Version Build 64-bit
Fixed in Git Commit Github Pull Request #
Summary 08318: Artwork: Screen element is not same size as rect element
Description MAME artwork /.lay related issue:
Since the screen element, and a rect are both aliased rectangular textures, one would expect them to be the exact same size when laid on top of eachother. But apparently this is not the case in MAME. It can lead to unwanted surprises when making for example a screen overlay for an artwork file.

It happens with all video backends from what I tried (d3d, opengl, bgfx default, gdi).
Doesn't matter if it's a 16-bit (eg. pacman) or 32-bit (eg. ddpdfk) screen bitmap.
Steps To Reproduce Try the attached pacman test artwork in windowed mode.
Resize the screen bit by bit to see the issue that's visible in the attached screenshots, see bottom-right.

I also checked image elements, but those are fine (they are the same size as rect element)
Additional Information
Github Commit
Flags
Regression Version
Affected Sets / Systems
Attached Files
zip file icon pacman.zip (1,058 bytes) May 18, 2022, 09:23 Uploaded by hap
png file icon Screenshot (202).png (24,712 bytes) May 18, 2022, 09:25 Uploaded by hap
hap
png file icon Screenshot (203).png (2,828 bytes) May 18, 2022, 09:25 Uploaded by hap
hap
Relationships
There are no relationship linked to this issue.
Notes
5
User avatar
No.20200
hap
Developer
May 18, 2022, 09:29
Huh, a bonus bugreport, anyone can confirm that this artwork file crashes MAME with -video gdi -window?

mame pacman -video gdi -window

-----------------------------------------------------
Exception at EIP=00007ff7bb40127a (software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::draw_quad_palette16_none(render_primitive const&, unsigned int*, unsigned int, software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::quad_setup_data const&)+0x00da): ACCESS VIOLATION
While attempting to read memory at 000002351ce13b10
-----------------------------------------------------
RAX=00000000fffffe80 RBX=000002331cece11c RCX=000002331b96c6b0 RDX=000002331ce13e10
RSI=000000000000002d RDI=000000000000b07c RBP=000002331cea1040 RSP=000000ca27f38d40
 R8=00000000ffffffc8 R9=000000ca27f38e10 R10=00000000000003bb R11=0000000000005104
R12=00000000000003ec R13=00000000ffffc0fc R14=000002331aa58a70 R15=000000000000002d
-----------------------------------------------------
Stack crawl:
  000000ca27f38d90: 00007ff7bb40127a (software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::draw_quad_palette16_none(render_primitive const&, unsigned int*, unsigned int, software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::quad_setup_data const&)+0x00da)
  000000ca27f38f20: 00007ff7bb406d68 (software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::setup_and_draw_textured_quad(render_primitive const&, unsigned int*, int, int, unsigned int)+0x09e8)
  000000ca27f39120: 00007ff7be054f61 (renderer_gdi::draw(int)+0x0231)
  000000ca27f39180: 00007ff7bb37cd77 (win_window_info::draw_video_contents(HDC__*, bool)+0x0057)
  000000ca27f39270: 00007ff7bb37f5f9 (win_window_info::video_window_proc(HWND__*, unsigned int, unsigned long long, long long)+0x01d9)
  000000ca27f392a0: 00007ff7bda513a9 (winwindow_video_window_proc_ui(HWND__*, unsigned int, unsigned long long, long long)+0x0009)
  000000ca27f39430: 00007ffcdfb0e858 (CallWindowProcW+0x03f8)
  000000ca27f394d0: 00007ffcdfb0de1b (SendMessageW+0x086b)
  000000ca27f39520: 00007ffcdfb0d68a (SendMessageW+0x00da)
  000000ca27f39570: 00007ff7bb37cfc1 (win_window_info::update()+0x01e1)
  000000ca27f395b0: 00007ff7bb3966da (windows_osd_interface::update(bool)+0x003a)
  000000ca27f39640: 00007ff7bb3f5ad5 (video_manager::frame_update(bool)+0x0205)
  000000ca27f396b0: 00007ff7b7c1ded3 (screen_device::vblank_begin()+0x0233)
  000000ca27f39720: 00007ff7b7c212ed (screen_device::device_timer(emu_timer&, unsigned int, int)+0x013d)
  000000ca27f39750: 00007ff7b7c16164 (emu_timer::device_timer_expired(emu_timer&, int)+0x0024)
  000000ca27f397c0: 00007ff7b7c170bb (device_scheduler::timeslice()+0x014b)
  000000ca27f39920: 00007ff7b7e3d6d8 (running_machine::run(bool)+0x0198)
  000000ca27f3ed90: 00007ff7bb38c91b (mame_machine_manager::execute()+0x020b)
  000000ca27f3f170: 00007ff7bdc6d1ef (cli_frontend::start_execution(mame_machine_manager*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)+0x03cf)
  000000ca27f3f430: 00007ff7bdc6d7fd (cli_frontend::execute(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&)+0x004d)
  000000ca27f3f490: 00007ff7bb386fc9 (emulator_info::start_frontend(emu_options&, osd_interface&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&)+0x0029)
  000000ca27f3f860: 00007ff7bed04bc7 (main+0x0197)
  000000ca27f3f930: 00007ff7b35e13b1 (__tmainCRTStartup+0x0231)
  000000ca27f3f960: 00007ff7b35e14e6 (mainCRTStartup+0x0016)
  000000ca27f3f990: 00007ffcdf577034 (BaseThreadInitThunk+0x0014)
  000000ca27f3fa10: 00007ffce0162651 (RtlUserThreadStart+0x0021)
User avatar
No.20201
Robbbert
Senior Tester
May 18, 2022, 12:05
edited on: May 18, 2022, 12:15
Can confirm the red line on the right/bottom inside of the yellow area, but you have to drag the window by increments. It can take a few goes to get it to appear.

Unable to get the crash.
User avatar
No.20202
hap
Developer
May 18, 2022, 12:16
augitesoul (discord) gets the same crash as in my above comment
User avatar
No.20205
Foxhack
Tester
May 18, 2022, 14:55
edited on: May 18, 2022, 15:02
I don't get the crash referenced above, either. I'm using the official Windows x64 build.

Edit: However, at the request of hap, I did this after renaming the mame.ini file, and THEN the crash happened. I'm guessing a local setting changed in my ini file is preventing the crash.
User avatar
No.21897
hap
Developer
Dec 26, 2023, 15:55
The crash is fixed here: https://github.com/mamedev/mame/commit/642c89bd14853b9de8a0ca33d4179ecbd0e21a3f