notaz / picodrive

Fast MegaDrive/MegaCD/32X emulator
Other
290 stars 165 forks source link

Segfault on Kolibri (Sega 32X) #27

Closed EXL closed 6 years ago

EXL commented 9 years ago

On 2nd stage of this game.

Backtrace:

(gdb) r
Starting program: /storage/exl/Projects/picodrive/PicoDrive 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
plat_sdl: using 1366x768 as fullscreen resolution
plat_sdl: overlay: fmt 59565955, planes: 1, pitch: 1280, hw: 1
input: new device #0 "sdl:keys"
input: async-only devices detected..
# drv probed binds name
0   0      y     y sdl:keys
config_readsect: unhandled val for "Video output mode": "Video Overlay"
config_readsect: loaded from /home/exl/.picodrive/config2.cfg
[New Thread 0x7fffee4ba700 (LWP 15093)]
using sdl audio output driver
[Thread 0x7fffee4ba700 (LWP 15093) exited]
platform/libpicofe/readpng.c: unexpected font image size 256x320, needed 128x160
platform/libpicofe/readpng.c: unexpected selector image size 16x20, needed 8x10
found skin.txt
selected file: /storage/exl/Downloads/Kolibri (32X) (W) [!].32x
emu_ReloadRom(/storage/exl/Downloads/Kolibri (32X) (W) [!].32x)
warning: failed to do hugetlb mmap (0x2000000, 3145732): 12
config_readsect: loaded from /home/exl/.picodrive/config2.cfg
config_readsect: loaded from /home/exl/.picodrive/config2.cfg
00000:000: sram: 200000 - 203fff; eeprom: 0
starting audio: 44100 len: 735 stereo: 1, pal: 0
[New Thread 0x7fffee4ba700 (LWP 15094)]
00002:074: 32X startup
saveLoad (0, 0): /home/exl/.picodrive/mds/Kolibri (32X) (W) [!].mds.gz
00360:228: idle: patch ff1d46 66f8 71f8 y m #0
saveLoad (0, 0): /home/exl/.picodrive/mds/Kolibri (32X) (W) [!].mds.gz
saveLoad (1, 0): /home/exl/.picodrive/mds/Kolibri (32X) (W) [!].mds.gz
saveLoad (1, 0): /home/exl/.picodrive/mds/Kolibri (32X) (W) [!].mds.gz

Program received signal SIGSEGV, Segmentation fault.
0x000000000043aecb in p32x_sh2_read16 (a=<optimized out>, sh2=sh2@entry=0x822208 <sh2s+4872>) at pico/32x/memory.c:1475
1475        return *(u16 *)((p << 1) + ((a & sh2_map->mask) & ~1));
(gdb) bt full
#0  0x000000000043aecb in p32x_sh2_read16 (a=<optimized out>, sh2=sh2@entry=0x822208 <sh2s+4872>) at pico/32x/memory.c:1475
        sh2_map = 0x70dd50 <sh2_read16_map+16>
        p = 16777216
#1  0x00000000004ba305 in MOVWL0 (n=1, m=1, sh2=0x822208 <sh2s+4872>) at cpu/sh2/mame/sh2.c:1229
No locals.
#2  op0000 (opcode=285, sh2=0x822208 <sh2s+4872>) at cpu/sh2/mame/sh2.c:1886
No locals.
#3  sh2_execute_interpreter (sh2=sh2@entry=0x822208 <sh2s+4872>, cycles=<optimized out>) at cpu/sh2/mame/sh2pico.c:138
        opcode = 285
#4  0x00000000004385ad in sh2_execute (use_drc=<optimized out>, cycles=<optimized out>, sh2=0x822208 <sh2s+4872>) at ./cpu/sh2/sh2.h:105
        ret = <optimized out>
#5  run_sh2 (m68k_cycles=<optimized out>, sh2=0x822208 <sh2s+4872>) at pico/32x/32x.c:376
        cycles = <optimized out>
#6  p32x_sync_sh2s (m68k_target=m68k_target@entry=2007328362) at pico/32x/32x.c:461
        now = 2007326461
        target = 2007326809
        timer_cycles = 2007326461
        cycles = <optimized out>
        m68k_target = 2007328362
#7  0x000000000043a9e7 in p32x_reg_read16 (a=44) at pico/32x/memory.c:195
        cycles = 2007328362
        comreg = 64
#8  0x000000000049b387 in fm68k_emulate (cycles=3208306, cycles@entry=482, idle_mode=7396688) at cpu/fame/famec_opcodes.h:17948
        Opcode = 19025
#9  0x0000000000437d47 in SekSyncM68k () at pico/32x/../pico_cmn.c:42
        cyc_do = 482
#10 0x0000000000438f0c in SekRunM68k (cyc=488) at pico/32x/../pico_cmn.c:56
No locals.
#11 PicoFrameHints () at pico/32x/../pico_cmn.c:262
        lines = 262
        y = 239
        line_sample = 93
        lines_vis = 224
        skip = <optimized out>
        vcnt_wrap = 235
        cycles = <optimized out>
        hint = <optimized out>
#12 PicoFrame32x () at pico/32x/32x.c:554
No locals.
#13 0x000000000041e10d in PicoFrame () at pico/pico.c:321
No locals.
#14 0x0000000000408ad5 in emu_loop () at platform/common/emu.c:1473
        skip = <optimized out>
        diff = <optimized out>
        frames_done = <optimized out>
        frames_shown = <optimized out>
        target_frametime_x3 = 50000
        timestamp_x3 = <optimized out>
        timestamp_aim_x3 = 1464387534
        timestamp_fps_x3 = 1462537534
        notice_msg = 0x0
        fpsbuff = '\000' <repeats 23 times>
        fskip_cnt = 0
#15 0x00000000004041c4 in main (argc=1, argv=0x7fffffffdad8) at platform/common/main.c:135
No locals.
Oggom commented 9 years ago

I've been able to play past that level with no crashes. However, I've noticed at some part in the level the entire game slowed down for no apparent reason.

notaz commented 6 years ago

There have been 32X fixes that are likely to fix things like this, reopen if you still get it with the latest code.