Opened 15 years ago

Closed 15 years ago

#4720 closed defect (fixed)

DRAGON: Crash in Intro

Reported by: raziel- Owned by: rspalek
Priority: blocker Component: Engine: Draci
Version: Keywords:
Cc: Game: Dragon History

Description

ScummVM 1.1.0svn46243 (Dec 3 2009 07:58:05) Features compiled in: Vorbis FLAC MP3 RGB zLib

Right after the lines "But there was also a magic wand" "It was evil and it was called Eveline" "because it is really boring to be a magic wand..." the game crashes with no console message, instead the platform gives a crash message (Grim Reaper).

Log from ScummVM and GrimReaper attached

AmigaOS4 gcc version 4.2.4 (adtools build 20090118)

Dragon Historie (DOS/English) freely available

Ticket imported from: #2907954. Ticket imported from: bugs/4720.

Attachments (4)

Crashlog_SDL thread 0x60f43c18_2009-12-03_08-14-45.txt (27.7 KB ) - added by raziel- 15 years ago.
Grim Reaper log
draci.log (1.6 KB ) - added by raziel- 15 years ago.
ScummVM -d9 log
Crashlog_scummvm_2010-02-23_09-18-35.txt (36.0 KB ) - added by raziel- 15 years ago.
Crash when quitting the intro (exe not stripped)
Crashlog_SDL thread 0x68709f40_2010-02-23_09-24-21.txt (28.8 KB ) - added by raziel- 15 years ago.
Crash after some time in intro (exe not stripped)

Download all attachments as: .zip

Change History (25)

by raziel-, 15 years ago

Grim Reaper log

by raziel-, 15 years ago

Attachment: draci.log added

ScummVM -d9 log

comment:1 by raziel-, 15 years ago

I forgot to add that after the game crashed there seem to be still some background activity. Some sound bits are played without the game being seen on screen.

comment:2 by raziel-, 15 years ago

Little Update.

Music is crashing. The game itself runs along with sound effects until the player would take control. Then the game is stuck on the screen with Berta.

I'm using MIDI with a MT-32 device and upto the point where Eveline is introduced everything runs fine. Then the crash happens and MIDI is gone.

Hope this helps

comment:3 by jvprat, 15 years ago

Owner: set to rspalek

comment:4 by rspalek, 15 years ago

thank you for the report.

I'm not sure if I'll be able to debug MIDI-related bugs, because I learned the very basics of MIDI-playback just when I was porting this game, and most of the code I just took from another engine. I'm not sure if the fact that you have a MT-32 device is relevant or whether one could reproduce it on another device. also, I only have access to Mac OS X and Linux.

to begin with: (1) does the game crash with music disabled? and with another device (if supported) (2) could you run it with -d9 --debugflags=sound ? maybe --debugflags=general,bytecode,logic,sound , and maybe even with ",animation", but that will make it much more verbose. just -d9 doesn't help at all, because our log messages are categorized

comment:5 by raziel-, 15 years ago

Sorry, i haven't thought of that myself

1) If music is set to <default> (which is AdLib i think) the games goes on without throwing errors. The same with setting the music to <off> 2) I have attached the verbose with -d9 --debugflags=general,bytecode,logic,sound,animation I hope you can read something out of it, i definitely cannot not :-) If you need a log with fewer arguments, just shout

comment:6 by raziel-, 15 years ago

File far too big :-) Sent to your sourceforge.net account

comment:7 by rspalek, 15 years ago

let me record my observations a while ago. I couldn't read anything out of the attached log. the problem is probably architecture-related and I cannot reproduce it Mac OS X. it's probably needed to run the game in the debugger there to fix this problem.

comment:8 by sev-, 15 years ago

Raising priority. This is a release-critical bug.

comment:9 by sev-, 15 years ago

Priority: normalblocker

comment:10 by rspalek, 15 years ago

I'm sorry, but I cannot fix it. I have no access to this architecture, and the error message doesn't even include a stack trace. from register dump and a few addresses I have no chance to figure anything out.

comment:11 by rspalek, 15 years ago

Owner: rspalek removed

comment:12 by raziel-, 15 years ago

Huh?

What would you call this (in the GrimReaper log)?

Crash log for task "SDL thread 0x60f43c18" Generated by GrimReaper 52.7 Crash occured in module scummvm_SVN at address 0x7D6C817C Type of crash: DSI (Data Storage Interrupt) exception

Register dump: GPR (General Purpose Registers): 0: 0000001C 5F683D40 26BF4F23 00000003 00000020 5F409AD4 00000007 000000FF 8: 00000080 00000000 65C00EBC 5F683D40 26F51496 FFD1D1D1 680A3E80 65CEBCF0 16: 00350008 EFE60C60 00000000 021B6876 681CA310 5F2741B8 CCCCCCCD 00017028 24: 00000000 5F274430 00000000 7D364D88 5F85FD50 0000000A 5F27BA9C 5F683D40

FPR (Floating Point Registers, NaN = Not a Number): 0: nan 432 851 0 4: 0 575.8 48.8 0 8: 0 -0.00392924 575.8 48.8 12: 1008 4.34585e-311 0 0 16: 0 0 0 0 20: 0 0 0 0 24: 0 0 0 0 28: 0 0 0 0

FPSCR (Floating Point Status and Control Register): 0x82004000

SPRs (Special Purpose Registers): Machine State (msr) : 0x0000F030 Condition (cr) : 0x35FF3F33 Instruction Pointer (ip) : 0x7D6C817C Xtended Exception (xer) : 0xC000FF7F Count (ctr) : 0x7DEDF3E8 Link (lr) : 0x7D6C8164 DSI Status (dsisr) : 0x40000000 Data Address (dar) : 0x00000000

680x0 emulated registers: DATA: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ADDR: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 FPU0: 0 0 0 0 FPU4: 0 0 0 0

Symbol info: Instruction pointer 0x7D6C817C belongs to module "scummvm_SVN" (HUNK/Kickstart)

Stack trace: module scummvm_SVN at 0x7D6C817C (section 4 @ 0x37215C) module scummvm_SVN at 0x7D6C8468 (section 4 @ 0x372448) module scummvm_SVN at 0x7D4B9348 (section 4 @ 0x163328) module scummvm_SVN at 0x7DED675C (section 4 @ 0xB8073C) module scummvm_SVN at 0x7DED643C (section 4 @ 0xB8041C) module scummvm_SVN at 0x7DED7AC8 (section 4 @ 0xB81AA8) module scummvm_SVN at 0x7D6C8CBC (section 4 @ 0x372C9C) module scummvm_SVN at 0x7DF22A80 (section 4 @ 0xBCCA60) module scummvm_SVN at 0x7D364DB0 (section 4 @ 0xED90) libSDL-1.2.so:SDL_ThreadedTimerCheck()+0xEC (section 10 @ 0x30210) libSDL-1.2.so:RunTimer()+0x74 (section 10 @ 0x4340) libSDL-1.2.so:SDL_RunThread()+0x54 (section 10 @ 0x306f4) libSDL-1.2.so:RunThread()+0x78 (section 10 @ 0x2f68) native kernel module dos.library.kmod+0x0001ea6c native kernel module kernel+0x0003cbf0 native kernel module kernel+0x0003cc70

PPC disassembly: 7d6c8174: 3929000c addi r9,r9,12 7d6c8178: 81290000 lwz r9,0(r9) *7d6c817c: 81290000 lwz r9,0(r9) 7d6c8180: 39290030 addi r9,r9,48 7d6c8184: 80090000 lwz r0,0(r9)

I'm really sorry too, but gdb is broken on my system, otherwise i could share more information.

Maybe someone can tell me how to run the game in debugger mode, if that helps?

by raziel-, 15 years ago

Crash when quitting the intro (exe not stripped)

by raziel-, 15 years ago

Crash after some time in intro (exe not stripped)

comment:13 by raziel-, 15 years ago

I should really start thinking before i submit reports.

I have added two more crash logs. This time with the exe NOT stripped and it gives (hopefully) a better insight of the functions that crash, at least the stack trace is more readable (i hope)

comment:14 by jvprat, 15 years ago

The last crash logs look definitely much better. Hubert, can you please try changing engines/draci/music.cpp so the lines around 62 look like this? : warning("channelNumber = %d", channel); warning("volume = %d", _channelVolume[channel]); warning("channelPtr = %x", _channel[channel]); int newVolume = _channelVolume[channel] * _masterVolume / 255; warning("newVolume = %d", newVolume);

This should make it show a few warning lines before it crashes. Please paste them here.

My bet is the issue comes from line 127: _channel[channel] = (channel == 9) ? _driver->getPercussionChannel() : _driver->allocateChannel();

This may be an issue with the CAMD MIDI driver (definitely platform specific and just affecting AmigaOS), though I haven't looked at the channel allocation code yet.

comment:15 by raziel-, 15 years ago

Thank you very much, Jordi

Here is the output: /the SPACE inbetween marks the second part of the warnings before the crash)

User picked target 'draci' (gameid 'draci')... Looking for a plugin supporting this gameid... Draci Historie Engine Starting 'Draci Historie' WARNING: channelNumber = 1! WARNING: volume = 255! WARNING: channelPtr = 626f4c30! WARNING: newVolume = 192! WARNING: channelNumber = 15! WARNING: volume = 255! WARNING: channelPtr = 626f4c3c! WARNING: newVolume = 192! WARNING: channelNumber = 2! WARNING: volume = 255! WARNING: channelPtr = 626f4c48! WARNING: newVolume = 192! WARNING: channelNumber = 3! WARNING: volume = 255! WARNING: channelPtr = 626f4c54! WARNING: newVolume = 192!

WARNING: channelNumber = 0! WARNING: volume = 255! WARNING: channelPtr = 626f4c60! WARNING: newVolume = 192! WARNING: channelNumber = 4! WARNING: volume = 255! WARNING: channelPtr = 626f4c6c! WARNING: newVolume = 192! WARNING: channelNumber = 5! WARNING: volume = 255! WARNING: channelPtr = 626f4c78! WARNING: newVolume = 192! WARNING: channelNumber = 6! WARNING: volume = 255! WARNING: channelPtr = 626f4c84! WARNING: newVolume = 192! WARNING: channelNumber = 7! WARNING: volume = 255! WARNING: channelPtr = 0! WARNING: newVolume = 192!

comment:16 by jvprat, 15 years ago

Owner: set to rspalek

comment:17 by jvprat, 15 years ago

I've just commited a fix for it in r48147. It was running out of channels since the MT32 just has 9 of them. At least it shouldn't be a showstopper anymore. In the end I could reproduce the crash by selecting a native MIDI driver (ALSA in my case) and checking the "True Roland MT-32" option, even if I didn't have mine connected, so it wasn't platform specific. I'm assigning it back to Robert in case he wants to do something with having less channels than expected (maybe freeing or remapping some of them?).

comment:18 by raziel-, 15 years ago

Awesome!

No crash anymore, thank you so much, Jordi

comment:19 by rspalek, 15 years ago

no, I don't wanna do anything specific. I don't do any tricks with MIDI music, but just play the stream I've read from disk. the player is completely generic and taken from other engines. if there are not enough channel available, then just ignoring some arbitrary subset of them seems the best solution (other than disabling the music completely), because I don't have any information on which of them are more important.

comment:20 by rspalek, 15 years ago

Resolution: fixed
Status: newclosed

comment:21 by rspalek, 15 years ago

closing the bug. thank you, jvprat!

Note: See TracTickets for help on using tickets.