Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
05646 Crash/Freeze Critical (emulator) Random Jul 29, 2014, 17:47 Nov 23, 2014, 21:48
Tester M.A.S.H. View Status Public Platform MAME (Self-compiled)
Assigned To Haze Resolution Fixed OS Windows XP
Status [?] Resolved Driver
Version 0.154 Fixed in Version 0.156 Build Normal
Fixed in Git Commit Github Pull Request #
Summary 05646: mt_soni2: Crash shortly after start
Description Sonic The Hedgehog 2 is the only game in the megatech.c driver that crashed since MAME 0.153:


Changes to the driver (01.53):

- Palette is now device. Removal of unused code in machine\segamsys.c. Some modernization [Miodrag Milanovic].
- Removed some more dead code and cleaned up some function names to clarify their usage. First attempt to use modern 315-5124 code for SMS games in MegaTech, exploiting the parent class of the MegaDrive VDP class. Please report regressions, if any. Brought back the full vertical size of the screen for SMS games, by using custom code to copy from the SMS VDP bitmap. I could use some help from people with a better knowledge of the 315-5124, to e.g. understand if the problem is in the raw screen parameters, in the VDP or anywhere else. Updated MegaPlay to use modern SMS VDP. With this, it was finally possible to remove the other outdated (& non-device) implementation which was lurking inside segamsys.c. Clean-up of the MegaTech driver classes. Changed Sega Genesis VDP to use macros instead of direct usage of callback defines. Fixed Megatech vertical offset when running standalone SMS games. This temporarily breaks the vertical offset when launching the multislot system with both SMS and MD games mounted [Fabio Priuli].
Steps To Reproduce Start the game and wait...
Additional Information
Github Commit
Flags
Regression Version 0.153
Affected Sets / Systems mt_soni2
Attached Files
png file icon mt_soni2.png (4,041 bytes) Jul 29, 2014, 17:47 Uploaded by M.A.S.H.
M.A.S.H.
Relationships
There are no relationship linked to this issue.
Notes
4
User avatar
No.10874
Tafoid
Administrator
Jul 29, 2014, 20:44
Does not crash very often for me .. which leads me to believe it might be something uninit'd.
I'll confirm
User avatar
No.10971
etabeta
Developer
Sep 4, 2014, 05:11
it does never crash on MacOSX. on the one hand this seems to confirm that it is due to something being uninit'd, on the other hand this makes impossible for me to fix the issue unless more info (namely a full backtrace) is provided...
User avatar
No.10972
Osso
Moderator
Sep 4, 2014, 07:33
Your wish is my command. ;)

GNU gdb (GDB) 7.5.50.20120804-cvs
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-w64-mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from D:\temp\Nuova cartella\mame64d.exe...done.
(gdb) run mt_soni2 -w
Starting program: D:\temp\Nuova cartella\mame64d.exe mt_soni2 -w
[New Thread 5036.0x10d8]
[New Thread 5036.0x1244]
[New Thread 5036.0x3bc]
[New Thread 5036.0x12d8]
[New Thread 5036.0x37c]
[New Thread 5036.0x2cc]
[New Thread 5036.0x1324]
[New Thread 5036.0x1254]
[New Thread 5036.0x12fc]
[New Thread 5036.0x1164]
[New Thread 5036.0xa74]
[New Thread 5036.0xc94]
[New Thread 5036.0x11a0]
[New Thread 5036.0x72c]
[New Thread 5036.0xde8]
[New Thread 5036.0x5e8]
Resetting Megadrive / Genesis

Program received signal SIGSEGV, Segmentation fault.
0x0000000002aeef69 in sega315_5313_device::render_videobuffer_to_screenbuffer
    (this=0x474cff18, scanline=262) at src/emu/video/315_5313.c:2530
2530 lineptr[x] = m_palette_lookup[(dat & 0x3
f)];
(gdb) bt 10
#0 0x0000000002aeef69 in sega315_5313_device::render_videobuffer_to_screenbuffe
r (this=0x474cff18, scanline=262) at src/emu/video/315_5313.c:2530
#1 0x0000000002aef385 in sega315_5313_device::render_scanline (
    this=0x474cff18) at src/emu/video/315_5313.c:2598
#2 0x0000000002ae68b3 in render_timer_callback (machine=..., ptr=0x474cff18,
    param=0) at src/emu/video/315_5313.c:55
#3 0x0000000004521363 in delegate_base<void, void*, int, _noparam, _noparam, _n
oparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam>::o
perator() (this=0x5279e810, p1=0x474cff18, p2=0)
    at src/lib/util/delegate.h:651
#4 0x0000000004118f17 in device_scheduler::execute_timers (this=0x22e110)
    at src/emu/schedule.c:907
#5 0x0000000002ee1a75 in device_scheduler::timeslice (this=0x22e110)
    at src/emu/schedule.c:517
#6 0x0000000000000000 in ?? ()
(gdb) quit
A debugging session is active.

        Inferior 1 [process 5036] will be killed.

Quit anyway? (y or n) y
User avatar
No.11260
Haze
Senior Tester
Nov 21, 2014, 12:56
should be fixed now.

it was allocating a buffer based on the screen size, which was set to a non-interlace size in the megatech driver, it was then trying to use twice that once it switched to interlace mode.