Open wwark opened 2 years ago
not having any issues here on manjaro linux x64 with cave and mame0248..
Where's the stack trace provided with SYMBOLS=1
at compile time, the log provided is useless.
I have compiled mame with SYMBOLS=1, the mamebin is now 1.4Go I tried the new build with those settings on mame.ini.
CORE DEBUGGING OPTIONS
verbose 1
log 0
oslog 1
debug 0
update_in_pause 0
debugscript
debuglog 1
The logs generated is the same without stack trace. Maybe I didn't check at the right place.
GL texture: copy 0, shader 0, dynamic 0, 320x240 320x240 [RGB32, Equal: 1, Palette: 0,
scale 1x1, border 0, pitch 512,320/16384], bytes/pix 4
GL texture: copy 0, shader 0, dynamic 0, 320x240 320x240 [RGB32, Equal: 1, Palette: 0,
scale 1x1, border 0, pitch 512,320/16384], bytes/pix 4
[:maincpu] ':maincpu' (00000010): unmapped internal write to ffffff84 = 0000a500 & 0000ffff (unk)
[:maincpu] ':maincpu' (00000014): unmapped internal write to ffffff84 = 0000a507 & 0000ffff (unk)
[:maincpu] ':maincpu' (00000018): unmapped internal write to ffffff84 = 5a000000 & ffff0000 (unk)
[:maincpu] ':maincpu' (0000001c): unmapped internal write to ffffff80 = 01120000 & ffff0000 (unk)
[:maincpu] ':maincpu' (00000022): unmapped internal write to 04000010 = 80000000 & ffff0000
[:maincpu] ':maincpu' (00000026): unmapped internal write to ffffff60 = c0080000 & ffff0000 (unk)
[:maincpu] ':maincpu' (0000002a): unmapped internal write to ffffff60 = 000039f0 & 0000ffff (unk)
[:maincpu] ':maincpu' (0000002e): unmapped internal write to ffffff64 = 95510000 & ffff0000 (unk)
[:maincpu] ':maincpu' (00000032): unmapped internal write to ffffff64 = 0000fdd7 & 0000ffff (unk)
[:maincpu] ':maincpu' (00000036): unmapped internal write to ffffff68 = 543c0000 & ffff0000 (unk)
[:maincpu] ':maincpu' (0000003a): unmapped internal write to ffffff70 = 0000a560 & 0000ffff (unk)
[:maincpu] ':maincpu' (0000003e): unmapped internal write to ffffff70 = a5000000 & ffff0000 (unk)
[:maincpu] ':maincpu' (00000042): unmapped internal write to ffffff6c = 0000a510 & 0000ffff (unk)
[:maincpu] ':maincpu' (00000048): unmapped internal write to ffffe880 = 00000000 & ffff0000 (unk)
[:maincpu] ':maincpu' (0000004e): unmapped internal write to 04000104 = aaaa0000 & ffff0000 (PCCR)
[:maincpu] ':maincpu' (00000050): unmapped internal write to 04000104 = 0000aaaa & 0000ffff (PDCR)
[:maincpu] ':maincpu' (00000052): unmapped internal write to 04000114 = aaaa0000 & ffff0000 (PLCR)
[:maincpu] ':maincpu' (00000058): unmapped internal write to 04000110 = a5440000 & ffff0000 (PJCR)
[:maincpu] ':maincpu' (0000005e): unmapped internal write to 04000108 = 19440000 & ffff0000 (PECR)
[:maincpu] ':maincpu' (00000066): unmapped io memory write to A0 = 00000000000000FF & FFFFFFFFFFFFFFFF
[:maincpu] ':maincpu' (0000006c): unmapped internal write to 04000108 = 00000009 & 0000ffff (PFCR)
[:maincpu] ':maincpu' (00000072): unmapped internal write to 0400010c = 00000000 & ffff0000 (PGCR)
[:maincpu] ':maincpu' (00000078): unmapped internal write to 0400010c = 00000000 & 0000ffff (PHCR)
[:maincpu] ':maincpu' (0000007e): unmapped internal write to 04000114 = 00000000 & 0000ffff (SCPCR)
[:maincpu] sh4_rtc_timer_callback uses m_m[] with SH3
[:maincpu] ':maincpu' (000000d8): INTC internal write to 04000014 = 00000430 & 0000ffff (IPRC)
[:maincpu] ':maincpu' (0c002c78): unmapped internal read from ffffffec mask ffffffff
[:maincpu] ':maincpu' (0c002c7c): unmapped internal write to ffffffec = 00000008 & ffffffff (unk)
[:maincpu] ':maincpu' (000000ea): unmapped internal write to ffffffec = 00000001 & ffffffff (unk)
[:] unknown serial_rtc_eeprom_w access offset 02 data 01
[:blitter] Detected firmware version D
[:blitter] Detected firmware version D
[:blitter] Detected firmware version D
[:] unknown serial_rtc_eeprom_w access offset 02 data fe
[:maincpu] ':maincpu' (0c04edee): TMU internal write to fffffe90 = 00000000 & 0000ff00 (SH3_TOCR_TSTR_ADDR)
[:maincpu] ':maincpu' (0c04ee20): TMU internal write to fffffe90 = 00000200 & 0000ff00 (SH3_TOCR_TSTR_ADDR)
[:maincpu] ':maincpu' (0c04ee28): INTC internal read from fffffee0 mask 0000ffff (SH3_ICR0_IPRA_ADDR - 00000000)
[:maincpu] ':maincpu' (0c04ee2e): INTC internal write to fffffee0 = 00000100 & 0000ffff (SH3_ICR0_IPRA_ADDR - IPRA)
[:maincpu] setting priorities TMU0 0 TMU1 1 TMU2 0 RTC 0
[:maincpu] ':maincpu' (0c002412): unmapped internal read from 04000004 mask ff000000 (IRR0)
[:maincpu] ':maincpu' (0c002416): unmapped internal write to 04000004 = 00000000 & ff000000 (IRR0)
[:maincpu] ':maincpu' (0c000104): unmapped internal read from ffffffd4 mask ffffffff (SH3 EXPEVT - 00000160)
[:maincpu] ':maincpu' (0c0028be): unmapped internal read from ffffffd0 mask ffffffff (SH3 TRA - 0000003c)
[:maincpu] ':maincpu' (0c16145a): unmapped internal read from ffffffec mask ffffffff
[:maincpu] ':maincpu' (0c16145e): unmapped internal write to ffffffec = 00000009 & ffffffff (unk)
Segmentation fault (core dumped)
Thanks for your help !
type gdb --args ./mame mushisam at the debugger prompt type run
when it drops back to the debugger type bt full
Thank you for your return.
Last logs of run:
[:] unknown serial_rtc_eeprom_w access offset 02 data 01
[:blitter] Detected firmware version D
[:blitter] Detected firmware version D
[:blitter] Detected firmware version D
[:] unknown serial_rtc_eeprom_w access offset 02 data fe
[:maincpu] ':maincpu' (0c04edee): TMU internal write to fffffe90 = 00000000 & 0000ff00 (SH3_TOCR_TSTR_ADDR)
[:maincpu] ':maincpu' (0c04ee20): TMU internal write to fffffe90 = 00000200 & 0000ff00 (SH3_TOCR_TSTR_ADDR)
[:maincpu] ':maincpu' (0c04ee28): INTC internal read from fffffee0 mask 0000ffff (SH3_ICR0_IPRA_ADDR - 00000000)
[:maincpu] ':maincpu' (0c04ee2e): INTC internal write to fffffee0 = 00000100 & 0000ffff (SH3_ICR0_IPRA_ADDR - IPRA)
[:maincpu] setting priorities TMU0 0 TMU1 1 TMU2 0 RTC 0
[:maincpu] ':maincpu' (0c002412): unmapped internal read from 04000004 mask ff000000 (IRR0)
[:maincpu] ':maincpu' (0c002416): unmapped internal write to 04000004 = 00000000 & ff000000 (IRR0)
[:maincpu] ':maincpu' (0c000104): unmapped internal read from ffffffd4 mask ffffffff (SH3 EXPEVT - 00000160)
[:maincpu] ':maincpu' (0c0028be): unmapped internal read from ffffffd0 mask ffffffff (SH3 TRA - 0000003c)
[:maincpu] ':maincpu' (0c16145a): unmapped internal read from ffffffec mask ffffffff
[:maincpu] ':maincpu' (0c16145e): unmapped internal write to ffffffec = 00000009 & ffffffff (unk)
Thread 1 "mamebin" received signal SIGSEGV, Segmentation fault.
0x0000555560876604 in sh34_base_device::sh4_exception () at ../../../../../src/devices/cpu/sh/sh4comn.cpp:412
412 standard_irq_callback(INPUT_LINE_NMI);
(gdb) bt full
(gdb) bt full
#0 0x0000555560876604 in sh34_base_device::sh4_exception(char const*, int) () at ../../../../../src/devices/cpu/sh/sh4comn.cpp:412
#1 0x000055556085df84 in sh34_base_device::sh4_check_pending_irq(char const*) () at ../../../../../src/devices/cpu/sh/sh4.h:409
#2 sh34_base_device::func_CHECKIRQ() () at ../../../../../src/devices/cpu/sh/sh4.cpp:2620
#3 cfunc_CHECKIRQ() () at ../../../../../src/devices/cpu/sh/sh4.cpp:2621
#4 0x00007ffff132f11d in ()
#5 0x0000000000004421 in ()
#6 0x00007fffffff7c00 in ()
#7 0x0000555561eafc3d in operator() () at ../../../../../src/devices/cpu/drcbex64.cpp:653
#8 _FUN() () at ../../../../../src/devices/cpu/drcbex64.cpp:653
#9 0x0c04f10c8c000000 in ()
#10 0x0c04f10c00000000 in ()
#11 0x0c422a2040000001 in ()
#12 0x0c267f3c00000004 in ()
#13 0x0000008000000840 in ()
#14 0x0000000000000001 in ()
#15 0x000001600c267f3c in ()
#16 0x0c246a880c002890 in ()
#17 0x0000000100000000 in ()
#18 0x0c246a700c246a74 in ()
#19 0x0c7fffa00c04a2bc in ()
#20 0x0000000000000000 in ()
Does it happens without drc? Call to NMI is weird, I don't think neither cv1k nor sh3 should really call it at all.
gdb --args ./mame mushisam -nodrc
it works with the option -nodrc
It very much looks like a NULL reference. Running it in valgrind
should expose the usage of the bad pointer - valgrind ./mame mushisam -nodrc
.
with valgrind and -nodrc option the game starts without issue it is just long.
Below the vagrind command without -nodrc parameter
[:maincpu] ':maincpu' (0c0023d4): unmapped internal read from 04000004 mask ff000000 (IRR0)
[:maincpu] ':maincpu' (0c0023d4): unmapped internal write to 04000004 = 00000000 & ff000000 (IRR0)
[:maincpu] ':maincpu' (0c000100): unmapped internal read from ffffffd4 mask ffffffff (SH3 EXPEVT - 00000160)
[:maincpu] ':maincpu' (0c002890): unmapped internal read from ffffffd0 mask ffffffff (SH3 TRA - 0000003c)
[:maincpu] ':maincpu' (0c16144c): unmapped internal read from ffffffec mask ffffffff
[:maincpu] ':maincpu' (0c16144c): unmapped internal write to ffffffec = 00000009 & ffffffff (unk)
==2012774==
==2012774== Process terminating with default action of signal 11 (SIGSEGV)
==2012774== General Protection Fault
==2012774== at 0xB42A494: sh34_base_device::sh4_exception(char const*, int) (sh4comn.cpp:412)
==2012774== by 0xB411E13: sh4_check_pending_irq (sh4.h:409)
==2012774== by 0xB411E13: func_CHECKIRQ (sh4.cpp:2620)
==2012774== by 0xB411E13: cfunc_CHECKIRQ(void*) (sh4.cpp:2621)
==2012774== by 0x1D959110: ???
==2012774== by 0xB412916: RTE (sh4.cpp:476)
==2012774== by 0xB412916: func_RTE (sh4.cpp:3012)
==2012774== by 0xB412916: cfunc_RTE(void*) (sh4.cpp:3013)
==2012774== by 0x1BB981AF: ???
==2012774== by 0x1BB981AF: ???
==2012774== by 0x1D87907F: ???
==2012774== by 0x1DDC4F43: ???
==2012774== by 0x1DDC55A3: ???
==2012774== by 0xDDEDB4E: apply_sample_rate_changes (sound.cpp:543)
==2012774== by 0xDDEDB4E: apply_sample_rate_changes (sound.cpp:532)
==2012774== by 0xDDEDB4E: sound_stream::apply_sample_rate_changes(unsigned int, unsigned int) (sound.cpp:813)
==2012774== by 0x4ECA9BEF: ???
==2012774== by 0x1B4B3A6F: ???
==2012774==
==2012774== HEAP SUMMARY:
==2012774== in use at exit: 388,233,076 bytes in 228,902 blocks
==2012774== total heap usage: 17,090,823 allocs, 16,861,921 frees, 7,276,723,332 bytes allocated
==2012774==
==2012774== LEAK SUMMARY:
==2012774== definitely lost: 4,960 bytes in 4 blocks
==2012774== indirectly lost: 87,224 bytes in 25 blocks
==2012774== possibly lost: 2,584,699 bytes in 22,939 blocks
==2012774== still reachable: 385,556,193 bytes in 205,934 blocks
==2012774== of which reachable via heuristic:
==2012774== newarray : 65,552 bytes in 2 blocks
==2012774== suppressed: 0 bytes in 0 blocks
==2012774== Rerun with --leak-check=full to see details of leaked memory
==2012774==
==2012774== Use --track-origins=yes to see where uninitialised values come from
==2012774== For lists of detected and suppressed errors, rerun with: -s
==2012774== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
Segmentation fault (core dumped)
Are you using a intel cpu processor by any chance? Compile with this.
make ARCHOPTS_C = -mcmodel=large ARCHOPTS_CXX = -mcmodel=large REGENIE=1
Yeah, it's definitely calling a SH4 NMI while being a SH3[BE].
https://github.com/mamedev/mame/blob/efbb20204ba7c60141598390b3ff9413be0064f3/src/mame/misc/cv1k.cpp#L234
I wonder if casting this to actual sh3be_device
fixes the issue.
I cant reproduce this if Jaunty gcc is setting it to small could cause issues on Intel. its more eliminate that possibility
Yes I have an Intel CPU. I will compile with the options provided let you know ! Thanks for your time
I just posted info on my mame box I use thought it had a amd but is is an intel.
Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz (ivybridge) it doesnt have the issue on manjaro.
No issues reported with ASAN or UBSAN on Ubuntu 20.04 with 0.249 compiled with Clang 14 with DRC on or off. I only played like a minute though.
Hello,
I am running into the same issue (with Ubuntu 22.04 however) - immediate crash when running mushisam, unless I use -nodrc.
MAME 0.251 compiled from sources using gcc ("make -j17").
I have given a try at "make -j17 SYMBOLS=1 ARCHOPTS_C=-mcmodel=large ARCHOPTS_CXX=-mcmodel=large REGENIE=1" for compiling (since I noticed there was no feedback for it), it makes no difference.
CPU: i5-12600KF.
gcc: gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
I ran it with gdb / ran bt full also, however the info seems 99% identical to what was posted for 0.249, so I would rather not clutter the thread and post it, please let me know if it's useful anyway.
Duplicate of #9186
You will find below the log:
Thanks