Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
03356 Graphics Minor Always Jul 25, 2009, 19:12 May 5, 2016, 09:22
Tester hap View Status Public Platform MAME (Self-compiled)
Assigned To Resolution Won't fix OS
Status [?] Closed Driver
Version 0.133 Fixed in Version Build
Fixed in Git Commit Github Pull Request #
Summary 03356: driftout: Player car flickers on DirectX renderer + multithreading
Description The player car always flickers black
Steps To Reproduce play the game
Additional Information
Github Commit
Flags
Regression Version 0.127u6
Affected Sets / Systems driftout
Attached Files
jpg file icon drift_black.jpg (14,816 bytes) Jul 25, 2009, 23:34
Relationships
There are no relationship linked to this issue.
Notes
30
User avatar
No.04698
Haze
Senior Tester
Jul 25, 2009, 19:56
there is a black flickering shadow which looks normal, I don't see any obvious glitches?
User avatar
No.04701
hap
Developer
Jul 25, 2009, 20:24
Ahh, I see now that it only happens with mame.ini "multithreading" set to 1, strange. Can you confirm?
User avatar
No.04703
Firewave
Senior Tester
Jul 25, 2009, 21:19
I cannot confirm. Can you try to produce snapshots that show the differences?
User avatar
No.04704
hap
Developer
Jul 25, 2009, 23:40
Another thing I just found out: it only happens on DirectX hardware renderers, and the effect is not internal: F12 (snapshot) outputs normal data. So the problem's on my end due to a vidcard driver bug, or a bug in MAME's renderer.

Very strange though that, in this game, it only affects the car. Does MAME use multiple textures? eg. one for each layer.
User avatar
No.04705
Tafoid
Administrator
Jul 26, 2009, 01:59
It's likely the your driver and not MAME. I tried with and without -mt switch and it looks fine (mamedev 0.133 - 32 bit build).

Closing this out. If you find out anything more regarding this, contact me privately.
User avatar
No.04775
Tafoid
Administrator
Aug 7, 2009, 00:11
Reopened on word that there may be a renderer issue that was found.
User avatar
No.04776
hap
Developer
Aug 7, 2009, 01:08
edited on: Aug 7, 2009, 01:09
Thanks Tafoid.

The problem started after the palette/renderer changes in 0.127u6. render.c function add_container_primitives CONTAINER_ITEM_QUAD section changed prim->texture.palette assignment to texture_get_adjusted_palette.
In the case of this odd driftout bug here, palette_entry_list_adjusted under TEXFORMAT_PALETTE16 returns the wrong palette if multithreading is set on for me, the actual cause is unknown to me, and may have existed before 0.127u6.
Changing this part to pre-0.127u6 behaviour fixes the problem for me (that is, switching around machine palette check and no-adjustment check), I don't know if this workaround is harmless or not: whether or not the order of these checks matters.

In short, I'm still clueless about the cause (at least unrelated to 03379), but pretty sure the problem's in MAME, not videocard driver related.
User avatar
No.04835
hap
Developer
Aug 20, 2009, 19:48
edited on: Aug 20, 2009, 20:06
Ok, I dug into it some more. The cause is simple and can affect any game with multithreading on.

If multithreading is on, rendering uses the bitmaps from the driver VIDEO_UPDATE containing pen data that points to the current palette, not the palette contents at the time of the update.

(some more info)
[21:50] <n_n> rename your mame.ini, then do "mame driftout -multithreading", and play the game
[21:52] <Tafoid> Hap - same as tested before - no repro with or without -mt swtich
[21:52] <n_n> it probably varies per computer
[21:53] <n_n> depending on the time the renderer fetches palette data
[21:54] <n_n> driftout rewrites the palette in mid-frame
[21:54] <n_n> if the renderer gets the palette when driftout's not yet done, it will be glitchy
User avatar
No.04838
hap
Developer
Aug 22, 2009, 18:00
edited on: Sep 12, 2009, 17:10
The specific effect in driftout (car flickering) was fixed with a workaround.
The fact that renderer update is not synced to video update when mt is on remains.
User avatar
No.04903
Tafoid
Administrator
Sep 4, 2009, 15:08
Reopened this bug so that it can get some user/developer discussion as well as finding a way to fix the underlaying problem, rather than patching the specific instance in question.
User avatar
No.04904
Haze
Senior Tester
Sep 4, 2009, 15:48
edited on: Sep 4, 2009, 15:50
I requested this be reopened because to me it's a core issue rather than being something driver specific. The kludge in the driver might work around the issue in this case, but it's just as liable to appear elsewhere in the same situation, and hacking around the issue on a per driver basis is not the correct solution.

If I was cleaning the driver the kludge is something I'd probably remove as it really shouldn't be needed and doesn't document the hardware...
User avatar
No.04905
hap
Developer
Sep 4, 2009, 16:06
It annoyed me :P

Yes, you're right that this workaround is ugly and doesn't document the hardware. A better fix for this driver, suggested by Kale, would be to use partial updates whenever a game writes to video hardware in mid-frame.
User avatar
No.04907
Haze
Senior Tester
Sep 4, 2009, 20:26
edited on: Sep 4, 2009, 20:26
I'm not even convinced that a better fix would be to use partial updates.

The underlying concern is that MAME handles an identical situation in a different way depending on if the -mt switch is specified. This is a problem that could potentially affect any correctly coded driver, and workarounds (be it buffering the palette, or using partial updates) _SHOULD NOT_ be in the driver.

Drivers should behave in the same way, and the final output should be the same regardless of switches.
User avatar
No.04938
hap
Developer
Sep 12, 2009, 17:11
I reverted the driftout kludge
User avatar
No.09736
Stiletto
Developer
Aug 17, 2013, 15:35
Related?
http://www.mameworld.info/ubbthreads/showflat.php?Cat=&Board=mamechat&Number=312973#Post312973
User avatar
No.09737
Haze
Senior Tester
Aug 17, 2013, 15:44
probably.

I had the same issue with Casanova when buffering the video, with -mt it was broken, ended up having to convert it to rgb32

ind16 drivers don't work with -mt properly because the palette and video end up out of sync.

that's a lot of them, still don't know why we turned it on by default.
User avatar
No.09740
Firewave
Senior Tester
Aug 20, 2013, 13:46
edited on: Aug 20, 2013, 13:47
Since nobody ever reported a reproducible(!) issue before and -mt gives quite a nice speed increase (even if people state that it is impossible). Will take a look at this and revert the default -mt setting if it is reproducible. I have a feeling this might actually be something system-related (maybe video drivers) instead of MAME. Although we now know the multi-threading code in MAME is garbage, so anything is possible.
User avatar
No.09749
Haze
Senior Tester
Aug 22, 2013, 22:13
take something like raphero too, the palette fade at the start / end of levels is totally busted with -mt, you have to use -nomt here to fix it.

there are tons of problems with -mt, always has been..
User avatar
No.09750
Firewave
Senior Tester
Aug 23, 2013, 00:37
Well, I compared snapshots from -mt testruns with -nomt testruns and there were no differences. And I never saw any problems when playing stuff with -mt. So I guess it's something not that obvious and it needs some special circumstances as the chdman issue.
User avatar
No.09751
hap
Developer
Aug 23, 2013, 00:46
It won't be visible with your regtest tools: screenshots taken with F12 look fine.
and yeah, it's already been determined this problem doesn't happen on every PC.
User avatar
No.09752
Tafoid
Administrator
Aug 23, 2013, 01:05
I can confirm that right now, with recent svn, player car flashes with -mt, doesn't with -nomt on Windows. It is possible it might behave differently on SDL.
User avatar
No.09754
Haze
Senior Tester
Aug 25, 2013, 16:36
yeah, regtests won't show you anything, even if you single step it you get a bad frame then a good frame in a single step.

in the case of the raphero fade I mention having -mt enabled turns it from a fade to some kind of flickering mess that looks like somebody trashed the entire video emulation.
User avatar
No.09790
mahlemiut
Developer
Sep 12, 2013, 00:52
edited on: Sep 12, 2013, 00:54
I get the flickering on SDL (Ubuntu 10.04) with -mt also, only in-game, and only with the OpenGL renderer (is fine with the software renderer).
User avatar
No.11335
Firewave
Senior Tester
Dec 29, 2014, 20:46
I ran sms with -mt and ThreadSanitizer on Linux and it came up with the following

WARNING: ThreadSanitizer: data race (pid=21262)
  Write of size 4 at 0x7ff820218530 by main thread:
    #0 copybitmap(bitmap_rgb32&, bitmap_rgb32&, int, int, int, int, rectangle const&) /home/notroot/trunk/src/emu/drawgfx.c:1920:2 (mess64d+0x000003e4de9f)
    #1 sega315_5124_device::screen_update(screen_device&, bitmap_rgb32&, rectangle const&) /home/notroot/trunk/src/emu/video/315_5124.c:1525:2 (mess64d+0x000003908268)
    #2 sms_state::screen_update_sms(screen_device&, bitmap_rgb32&, rectangle const&) /home/notroot/trunk/src/mess/machine/sms.c:1214:2 (mess64d+0x000001e1aef5)
    #3 delegate_base<unsigned int, screen_device&, bitmap_rgb32&, rectangle const&, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam>::operator()(screen_device&, bitmap_rgb32&, rectangle const&) const /home/notroot/trunk/src/lib/util/delegate.h:652:76 (mess64d+0x000003f887f1)
    #4 screen_device::update_partial(int) /home/notroot/trunk/src/emu/screen.c:625 (mess64d+0x000003f887f1)
    #5 video_manager::finish_screen_updates() /home/notroot/trunk/src/emu/video.c:649:3 (mess64d+0x000003fe16ec)
    #6 video_manager::frame_update(bool) /home/notroot/trunk/src/emu/video.c:202:27 (mess64d+0x000003fe1157)
    #7 screen_device::vblank_begin() /home/notroot/trunk/src/emu/screen.c:822:3 (mess64d+0x000003f88106)
    #8 screen_device::device_timer(emu_timer&, unsigned int, int, void*) /home/notroot/trunk/src/emu/screen.c:404:4 (mess64d+0x000003f87efd)
    #9 device_t::timer_expired(emu_timer&, unsigned int, int, void*) /home/notroot/trunk/src/emu/device.h:190:83 (mess64d+0x000003f8280c)
    #10 device_scheduler::execute_timers() /home/notroot/trunk/src/emu/schedule.c:902 (mess64d+0x000003f8280c)
    #11 device_scheduler::timeslice() /home/notroot/trunk/src/emu/schedule.c:517:2 (mess64d+0x000003f804e5)
    #12 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:391:5 (mess64d+0x000003eed148)
    #13 device_mixer_interface::interface_pre_start() /home/notroot/trunk/src/emu/disound.c:406:2 (mess64d+0x000003e17c47)
    #14 device_t::start() /home/notroot/trunk/src/emu/device.c:386:3 (mess64d+0x000003e00b10)
    #15 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1099:6 (mess64d+0x000003eec8e2)
    #16 device_t::start() /home/notroot/trunk/src/emu/device.c:392:2 (mess64d+0x000003e00b56)
    #17 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1099:6 (mess64d+0x000003eec8e2)
    #18 running_machine::start() /home/notroot/trunk/src/emu/machine.c:281:2 (mess64d+0x000003eeb1a6)
    #19 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:345:3 (mess64d+0x000003eecf58)
    #20 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:216:11 (mess64d+0x000003ee7e75)
    #21 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:244:15 (mess64d+0x000003deed29)
    #22 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:343:9 (mess64d+0x000002665919)

  Previous read of size 4 at 0x7ff820218530 by thread T10:
    [failed to restore the stack]

  Location is heap block of size 369023 at 0x7ff82020f000 allocated by main thread:
    #0 malloc /home/ben/development/llvm/3.5/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:460:5 (mess64d+0x0000011999bd)
    #1 osd_malloc_array(unsigned long) /home/notroot/trunk/src/osd/sdl/sdlos_unix.c:108:9 (mess64d+0x000004406b59)
    #2 malloc_file_line(unsigned long, char const*, int, bool, bool, bool) /home/notroot/trunk/src/lib/util/corealloc.c:112:25 (mess64d+0x0000041251c6)
    #3 operator new[](unsigned long) /home/notroot/trunk/src/lib/util/corealloc.h:64:97 (mess64d+0x00000410617a)
    #4 bitmap_t::allocate(int, int, int, int) /home/notroot/trunk/src/lib/util/bitmap.c:149 (mess64d+0x00000410617a)
    #5 screen_device::register_screen_bitmap(bitmap_t&) /home/notroot/trunk/src/emu/screen.c:803:2 (mess64d+0x000003f86241)
    #6 screen_device::device_start() /home/notroot/trunk/src/emu/screen.c:294:3 (mess64d+0x000003f850ec)
    #7 device_t::start() /home/notroot/trunk/src/emu/device.c:392:2 (mess64d+0x000003e00b56)
    #8 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1099:6 (mess64d+0x000003eec8e2)
    #9 device_mixer_interface::interface_pre_start() /home/notroot/trunk/src/emu/disound.c:406:2 (mess64d+0x000003e17c47)
    #10 device_t::start() /home/notroot/trunk/src/emu/device.c:386:3 (mess64d+0x000003e00b10)
    #11 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1099:6 (mess64d+0x000003eec8e2)
    #12 device_t::start() /home/notroot/trunk/src/emu/device.c:392:2 (mess64d+0x000003e00b56)
    #13 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1099:6 (mess64d+0x000003eec8e2)
    #14 running_machine::start() /home/notroot/trunk/src/emu/machine.c:281:2 (mess64d+0x000003eeb1a6)
    #15 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:345:3 (mess64d+0x000003eecf58)
    #16 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:216:11 (mess64d+0x000003ee7e75)
    #17 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:244:15 (mess64d+0x000003deed29)
    #18 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:343:9 (mess64d+0x000002665919)

  Thread T10 (tid=21274, running) created by main thread at:
    #0 pthread_create /home/ben/development/llvm/3.5/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:847:3 (mess64d+0x00000119d6d1)
    #1 osd_thread_create(void* (*)(void*), void*) /home/notroot/trunk/src/osd/sdl/sdlsync_tc.c:309:7 (mess64d+0x000004407416)
    #2 osd_work_queue_alloc(int) /home/notroot/trunk/src/osd/sdl/sdlwork.c:211:20 (mess64d+0x000004407947)
    #3 sdl_osd_interface::window_init() /home/notroot/trunk/src/osd/sdl/window.c:234:16 (mess64d+0x00000269a052)
    #4 sdl_osd_interface::video_init() /home/notroot/trunk/src/osd/sdl/video.c:112:7 (mess64d+0x00000266ea34)
    #5 osd_interface::init_subsystems() /home/notroot/trunk/src/osd/osdepend.c:393:7 (mess64d+0x00000402598d)
    #6 sdl_osd_interface::init(running_machine&) /home/notroot/trunk/src/osd/sdl/sdlmain.c:686:2 (mess64d+0x000002666418)
    #7 running_machine::start() /home/notroot/trunk/src/emu/machine.c:225:2 (mess64d+0x000003eeaa1c)
    #8 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:345:3 (mess64d+0x000003eecf58)
    #9 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:216:11 (mess64d+0x000003ee7e75)
    #10 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:244:15 (mess64d+0x000003deed29)
    #11 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:343:9 (mess64d+0x000002665919)

SUMMARY: ThreadSanitizer: data race /home/notroot/trunk/src/emu/drawgfx.c:1920 copybitmap(bitmap_rgb32&, bitmap_rgb32&, int, int, int, int, rectangle const&)

It appears the bitmaps are being accessed by multiple threads without synchronization.
User avatar
No.11338
Osso
Moderator
Jan 2, 2015, 08:35
Fixed by r34147? Doesn't happen to me anymore.
User avatar
No.11339
Firewave
Senior Tester
Jan 2, 2015, 13:55
Even after the palette fixes I am still getting this (sorry about the missing stack trace before)

WARNING: ThreadSanitizer: data race (pid=6662)
  Write of size 4 at 0x7f895d26b530 by main thread:
    #0 copybitmap(bitmap_rgb32&, bitmap_rgb32&, int, int, int, int, rectangle const&) /home/notroot/trunk/src/emu/drawgfx.c:1920:2 (mess64d+0x000003e2dcaf)
    #1 sega315_5124_device::screen_update(screen_device&, bitmap_rgb32&, rectangle const&) /home/notroot/trunk/src/emu/video/315_5124.c:1525:2 (mess64d+0x0000038e8c68)
    #2 sms_state::screen_update_sms(screen_device&, bitmap_rgb32&, rectangle const&) /home/notroot/trunk/src/mess/machine/sms.c:1214:2 (mess64d+0x000001e0fe35)
    #3 delegate_base<unsigned int, screen_device&, bitmap_rgb32&, rectangle const&, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam>::operator()(screen_device&, bitmap_rgb32&, rectangle const&) const /home/notroot/trunk/src/lib/util/delegate.h:652:76 (mess64d+0x000003f68de1)
    #4 screen_device::update_partial(int) /home/notroot/trunk/src/emu/screen.c:625 (mess64d+0x000003f68de1)
    #5 video_manager::finish_screen_updates() /home/notroot/trunk/src/emu/video.c:649:3 (mess64d+0x000003fc1cdc)
    #6 video_manager::frame_update(bool) /home/notroot/trunk/src/emu/video.c:202:27 (mess64d+0x000003fc1747)
    #7 screen_device::vblank_begin() /home/notroot/trunk/src/emu/screen.c:822:3 (mess64d+0x000003f686f6)
    #8 screen_device::device_timer(emu_timer&, unsigned int, int, void*) /home/notroot/trunk/src/emu/screen.c:404:4 (mess64d+0x000003f684ed)
    #9 device_t::timer_expired(emu_timer&, unsigned int, int, void*) /home/notroot/trunk/src/emu/device.h:190:83 (mess64d+0x000003f62dfc)
    #10 device_scheduler::execute_timers() /home/notroot/trunk/src/emu/schedule.c:902 (mess64d+0x000003f62dfc)
    #11 device_scheduler::timeslice() /home/notroot/trunk/src/emu/schedule.c:517:2 (mess64d+0x000003f60ad5)
    #12 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:391:5 (mess64d+0x000003eccf58)
    #13 device_mixer_interface::interface_pre_start() /home/notroot/trunk/src/emu/disound.c:406:2 (mess64d+0x000003df7a57)
    #14 device_t::start() /home/notroot/trunk/src/emu/device.c:386:3 (mess64d+0x000003de0920)
    #15 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1099:6 (mess64d+0x000003ecc6f2)
    #16 device_t::start() /home/notroot/trunk/src/emu/device.c:392:2 (mess64d+0x000003de0966)
    #17 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1099:6 (mess64d+0x000003ecc6f2)
    #18 running_machine::start() /home/notroot/trunk/src/emu/machine.c:281:2 (mess64d+0x000003ecafb6)
    #19 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:345:3 (mess64d+0x000003eccd68)
    #20 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:216:11 (mess64d+0x000003ec7c85)
    #21 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:244:15 (mess64d+0x000003dcf759)
    #22 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:345:9 (mess64d+0x00000265bdf9)

  Previous read of size 4 at 0x7f895d26b530 by thread T10 (mutexes: write M414):
    #0 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::get_texel_rgb32(render_texinfo const&, int, int) /home/notroot/trunk/src/emu/rendersw.inc:290:4 (mess64d+0x000002686843)
    #1 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::draw_quad_rgb32(render_primitive const&, unsigned int*, unsigned int, software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::quad_setup_data&) /home/notroot/trunk/src/emu/rendersw.inc:1108 (mess64d+0x000002686843)
    #2 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) /home/notroot/trunk/src/emu/rendersw.inc:1886:5 (mess64d+0x000002682f0d)
    #3 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::draw_primitives(render_primitive_list const&, void*, unsigned int, unsigned int, unsigned int) /home/notroot/trunk/src/emu/rendersw.inc:1936:7 (mess64d+0x000002668224)
    #4 drawsdl_window_draw(sdl_window_info*, unsigned int, int) /home/notroot/trunk/src/osd/sdl/drawsdl.c:813:5 (mess64d+0x000002666f27)
    #5 draw_video_contents_wt(void*, int) /home/notroot/trunk/src/osd/sdl/window.c:1153:4 (mess64d+0x000002694c8e)
    #6 worker_thread_process(osd_work_queue*, work_thread_info*) /home/notroot/trunk/src/osd/sdl/sdlwork.c:723:19 (mess64d+0x0000043e8a49)
    #7 worker_thread_entry(void*) /home/notroot/trunk/src/osd/sdl/sdlwork.c:641:4 (mess64d+0x0000043e842b)

  Location is heap block of size 369023 at 0x7f895d262000 allocated by main thread:
    #0 malloc /home/ben/development/llvm/3.5/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:460:5 (mess64d+0x00000118c10d)
    #1 osd_malloc_array(unsigned long) /home/notroot/trunk/src/osd/sdl/sdlos_unix.c:108:9 (mess64d+0x0000043e73f9)
    #2 malloc_file_line(unsigned long, char const*, int, bool, bool, bool) /home/notroot/trunk/src/lib/util/corealloc.c:112:25 (mess64d+0x000004105a66)
    #3 operator new[](unsigned long) /home/notroot/trunk/src/lib/util/corealloc.h:64:97 (mess64d+0x0000040e6eba)
    #4 bitmap_t::allocate(int, int, int, int) /home/notroot/trunk/src/lib/util/bitmap.c:149 (mess64d+0x0000040e6eba)
    #5 screen_device::register_screen_bitmap(bitmap_t&) /home/notroot/trunk/src/emu/screen.c:803:2 (mess64d+0x000003f66831)
    #6 screen_device::device_start() /home/notroot/trunk/src/emu/screen.c:294:3 (mess64d+0x000003f656dc)
    #7 device_t::start() /home/notroot/trunk/src/emu/device.c:392:2 (mess64d+0x000003de0966)
    #8 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1099:6 (mess64d+0x000003ecc6f2)
    #9 device_mixer_interface::interface_pre_start() /home/notroot/trunk/src/emu/disound.c:406:2 (mess64d+0x000003df7a57)
    #10 device_t::start() /home/notroot/trunk/src/emu/device.c:386:3 (mess64d+0x000003de0920)
    #11 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1099:6 (mess64d+0x000003ecc6f2)
    #12 device_t::start() /home/notroot/trunk/src/emu/device.c:392:2 (mess64d+0x000003de0966)
    #13 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1099:6 (mess64d+0x000003ecc6f2)
    #14 running_machine::start() /home/notroot/trunk/src/emu/machine.c:281:2 (mess64d+0x000003ecafb6)
    #15 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:345:3 (mess64d+0x000003eccd68)
    #16 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:216:11 (mess64d+0x000003ec7c85)
    #17 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:244:15 (mess64d+0x000003dcf759)
    #18 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:345:9 (mess64d+0x00000265bdf9)

  Mutex M414 (0x7d0c0000a440) created at:
    #0 pthread_mutex_init /home/ben/development/llvm/3.5/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1031:3 (mess64d+0x000001191230)
    #1 osd_lock_alloc() /home/notroot/trunk/src/osd/sdl/sdlsync_tc.c:114:2 (mess64d+0x0000043e77c9)
    #2 render_primitive_list::render_primitive_list() /home/notroot/trunk/src/emu/render.c:297:11 (mess64d+0x000003f22e10)
    #3 render_target::render_target(render_manager&, char const*, unsigned int) /home/notroot/trunk/src/emu/render.c:993:1 (mess64d+0x000003f276bf)
    #4 render_manager::target_alloc(char const*, unsigned int) /home/notroot/trunk/src/emu/render.c:2517:10 (mess64d+0x000003f31cd4)
    #5 sdlwindow_video_window_create(running_machine&, int, sdl_monitor_info*, sdl_window_config const*) /home/notroot/trunk/src/osd/sdl/window.c:695:19 (mess64d+0x000002693eb9)
    #6 sdl_osd_interface::video_init() /home/notroot/trunk/src/osd/sdl/video.c:122:7 (mess64d+0x0000026653cc)
    #7 osd_interface::init_subsystems() /home/notroot/trunk/src/osd/osdepend.c:393:7 (mess64d+0x0000040055ed)
    #8 sdl_osd_interface::init(running_machine&) /home/notroot/trunk/src/osd/sdl/sdlmain.c:688:2 (mess64d+0x00000265c909)
    #9 running_machine::start() /home/notroot/trunk/src/emu/machine.c:225:2 (mess64d+0x000003eca82c)
    #10 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:345:3 (mess64d+0x000003eccd68)
    #11 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:216:11 (mess64d+0x000003ec7c85)
    #12 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:244:15 (mess64d+0x000003dcf759)
    #13 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:345:9 (mess64d+0x00000265bdf9)

  Thread T10 (tid=6674, running) created by main thread at:
    #0 pthread_create /home/ben/development/llvm/3.5/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:847:3 (mess64d+0x00000118fe21)
    #1 osd_thread_create(void* (*)(void*), void*) /home/notroot/trunk/src/osd/sdl/sdlsync_tc.c:309:7 (mess64d+0x0000043e7cb6)
    #2 osd_work_queue_alloc(int) /home/notroot/trunk/src/osd/sdl/sdlwork.c:212:20 (mess64d+0x0000043e81e7)
    #3 sdl_osd_interface::window_init() /home/notroot/trunk/src/osd/sdl/window.c:234:16 (mess64d+0x0000026917f2)
    #4 sdl_osd_interface::video_init() /home/notroot/trunk/src/osd/sdl/video.c:112:7 (mess64d+0x000002664f64)
    #5 osd_interface::init_subsystems() /home/notroot/trunk/src/osd/osdepend.c:393:7 (mess64d+0x0000040055ed)
    #6 sdl_osd_interface::init(running_machine&) /home/notroot/trunk/src/osd/sdl/sdlmain.c:688:2 (mess64d+0x00000265c909)
    #7 running_machine::start() /home/notroot/trunk/src/emu/machine.c:225:2 (mess64d+0x000003eca82c)
    #8 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:345:3 (mess64d+0x000003eccd68)
    #9 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:216:11 (mess64d+0x000003ec7c85)
    #10 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:244:15 (mess64d+0x000003dcf759)
    #11 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:345:9 (mess64d+0x00000265bdf9)

SUMMARY: ThreadSanitizer: data race /home/notroot/trunk/src/emu/drawgfx.c:1920 copybitmap(bitmap_rgb32&, bitmap_rgb32&, int, int, int, int, rectangle const&)
User avatar
No.11471
Osso
Moderator
Feb 23, 2015, 20:51
So can this be closed now?
User avatar
No.11478
Firewave
Senior Tester
Feb 26, 2015, 10:25
I think it can. I would like to do another test with ThreadSanitizer first though.
User avatar
No.11541
Firewave
Senior Tester
Mar 28, 2015, 20:05
edited on: Mar 28, 2015, 20:05
I ran ThreadSanitizer and still encountered something, that might somehow relate to this - see http://mametesters.org/view.php?id=5888
User avatar
No.12608
Osso
Moderator
May 5, 2016, 09:22
-mt functionality has been removed