Opened 15 years ago

Closed 15 years ago

Last modified 5 months ago

#1362 closed defect (invalid)

ScummVM crashes with

Reported by: SF/sdiconov Owned by: fingolfin
Priority: low Component: Port: Linux
Keywords: Cc:
Game:

Description

This bug seems to affect all ScummVM versions on my
machine (Linux, ASUS P4PE i845 mainboard with built-in
sound (snd-intel8x0 alsa driver)). It dies showing the
"Illegal instruction" message. It takes several seconds
when run as root and becomes an immediate crash from a
user's account.

I do not know the exact reason, but suspect that the
reason is hardware, possibly sound device drivers. It
works with an SBLive! card on another PC with the same
Linux distro installed.

Ticket imported from: #867342. Ticket imported from: bugs/1362.

Attachments (1)

scummtrace.txt (44.7 KB) - added by SF/sdiconov 15 years ago.
Strace output

Download all attachments as: .zip

Change History (22)

Changed 15 years ago by SF/sdiconov

Attachment: scummtrace.txt added

Strace output

comment:1 Changed 15 years ago by fingolfin

To process your bug report appropriately, we need you to
provide the following additional information:

* ScummVM version (PLEASE test the latest CVS/Daily build)
* Bug details, including instructions on reproducing it
* Language of game (English, German, ...)
* Version of game (talkie, floppy, ...)
* Platform and Compiler (Win32, Linux, MacOS, ...)
* Attach a save game if possible
* If this bug only occurred recently, please note the last
version without the bug, and the first version including
the bug. That way we can fix it quicker by looking at the
changes made.

This should only take you a little time but will make it much easier for
us to process your bug report in a way that satisfies both you and us.

Thank you for your support!

comment:2 Changed 15 years ago by fingolfin

Hm, if you think it's a HW issue... why not research that first,
before reporting a bug to us ? :-) Like, driver different music
drivers, or different audio drivers in SDL...

comment:3 Changed 15 years ago by fingolfin

Status: newpending
Summary: ScummVM crashes with "Illegal instruction" (strace attached)ScummVM crashes with

comment:4 Changed 15 years ago by SF/sdiconov

* I have just tested snapshot 20031229.
The problem persists. It crashes immediately after start.
* Just run it. No special actions needed.
* Does not matter (Russian, English, German)
* Does not matter (all)
* Linux x86, gcc3.2
* Not possible
* All versions.

I tried all scummvm options - nothing works. "scummvm
-enull" still produces the same error. Unloading and turning
off all sound and video4linux drivers does not help.

It is not related to the kernel version because it failed
with the kernel identical to what is installed on the
"compatible" machine.

comment:5 Changed 15 years ago by SF/sdiconov

Status: pendingnew

comment:6 Changed 15 years ago by SF/ender

A gdb backtrace is a thousand times more useful than a strace,
please attach one if you can :)

Also, is this a self-compiled binary, and if so with what compiler and
glibc, SDL, etc versions?

comment:7 Changed 15 years ago by fingolfin

Well in any case, this sound indeed like a bug with the submitters
hardware or system, not like a bug in ScummVM.

comment:8 Changed 15 years ago by fingolfin

Priority: normallow

comment:9 Changed 15 years ago by SF/sdiconov

Sorry, it NEW YEAR now. You'll probably have to wait for gdb
dump until tomorrow because I'm busy with presents and
celebrations and have no time to learn gdb's syntax (I've
never used it before). I get no core files.

[slava@alpha slava]$ ulimit
unlimited

An example how to get the data you asked for would be much
appreciated.

I am sure that there are no significant problems with my
"incompatible" primary system because I run many other games
and multimedia apps on it every day reliably and upgrade the
OS every month. There are no real hardware faults either
(Tested). I believe that Scummvm has a hidden bug triggered
by certain rare conditions.

Anyway, HaPpY NeW YEAR!!!

comment:10 Changed 15 years ago by SF/ender

at shell: gdb /path/to/scummvm
at GDB prompt: run
Start via launcher as usual
after crash: bt full

Paste. Rinse. Repeat :)

Hope your new years was good!

comment:11 Changed 15 years ago by SF/sdiconov

There is no launcher! All I see after running scummvm is the
"Illegal instruction" error message in console and it aborts
_before_ showing the UI or asking for any type of user input.

Other games (NWN, QuakeForge, UT2003, TuxRacer, AlephOne,
exult, FreeSCI...) and applications (zapping, xawtv, xmms,
xine, mplayer, sdl-based emulators of old computers...) do
work before and after running scummvm.

[root@alpha scummvm]# gdb ./scummvm
GNU gdb ALT Linux (5.3-alt2)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public
License, and you are
welcome to change it and/or distribute copies of it under
certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show
warranty" for details.
This GDB was configured as "i586-alt-linux"...
(gdb) run
Starting program: /usr/src/RPM/BUILD/scummvm/scummvm
[New Thread 1024 (LWP 31892)]

[2]+ Stopped gdb ./scummvm

[root@alpha scummvm]#

I can't enter the "bt full" command because gdb aborts too.

comment:12 Changed 15 years ago by SF/sdiconov

I tried to debug the main.cpp file and by inserting
"error("BREAK!");" in the code and found that the app
crashes at line 252 which is:

// Create the system object
OSystem *system = OSystem::instance();

????

I am by no means a skilled C coder, but I compile many
different programs in the same system as part of my RPM
package maintaining activities and ScummVM is the only
application that crashes.

comment:13 Changed 15 years ago by fingolfin

Since gdb exits, that means that it doesn't crash, rather it just
exits silently for some reason.

Instead of putting an "error" manually into the source code, you
can use the breakpoint facilities of gdb:
1) compile scummvm
2) start gdb with scummvm like this: "gdb scummvm"
3) Set a breakpoint on the offending line, i.e. enter this command:
b base/main.cpp:252
4) run (by entering command "run")
5) It should drop into the debugger at the specified line. Now you
can step through the code with the "n" and "s" commands (one will
step-over instructions, the other step-into; that is, if you type "s"
it will descend into the function call, deeper, and deeper; you can
do that, then once you are inside the OSystem code, you can use n
to step through the code to see where exactly it crashes.

BTW, see, it's really irrelevant which programs/kernel/operating
systems all run fine and well one your system. :-). It tells us
nothing and doesn't help in any way to figure out what's wrong.

comment:14 Changed 15 years ago by SF/sdiconov

[root@alpha scummvm]# gdb ./scummvm
GNU gdb ALT Linux (5.3-alt2)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public
License, and you are
welcome to change it and/or distribute copies of it under
certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show
warranty" for details.
This GDB was configured as "i586-alt-linux"...
(gdb) b backends/sdl/sdl-common.cpp:65
Breakpoint 1 at 0x804b1b6: file backends/sdl/sdl-common.cpp,
line 65.
(gdb) run
Starting program: /usr/src/RPM/BUILD/scummvm/scummvm
[New Thread 1024 (LWP 9659)]
[Switching to Thread 1024 (LWP 9659)]

Breakpoint 1, OSystem_SDL_Common::init_intern(int)
(this=0x831d378, gfx_mode=0) at backends/sdl/sdl-common.cpp:65
65 _mode_flags = 0;
(gdb) s
67 if (joystick_num > -1)
(gdb) s
70 if (SDL_Init(sdlFlags) ==-1) {
(gdb) s

[7]+ Stopped gdb ./scummvm
[root@alpha scummvm]#

It does not step into the SDL_Init(), but it is a standard
function used by other SDL apps isn't it?

comment:15 Changed 15 years ago by fingolfin

Indeed. What version of SDL do you use, precisely? And do you
have a joystick connected to your system, by chance?

comment:16 Changed 15 years ago by SF/sdiconov

It works for me now. The bug is resolved, but I still do not
quite understand how and why.

1) I reinstalled SDL and ScummVM from the distro packages 3
times and it did not help.

2) I made custom builds of SDL and ScummVM with debugging
enabled and it worked. Custom SDL was RPMed and installed
instead of the standard RPMS. It worked.

3) I removed custom SDL and scummvm builds and installed the
same standard RPMs as in step 1 and it still works. No
source changes were made.

Could it be some linking problem (wrong headers?) and why
did the init function work for other SDL apps? Where did the
"Illegal instruction" message come from?

Anyway it really was in my system.

comment:17 Changed 15 years ago by SF/sdiconov

Now it is time to prepare for the Christmas (which is on the
7th of January) and Julian style New Year (14th of January) :^)

comment:18 Changed 15 years ago by fingolfin

Status: newclosed

comment:19 Changed 15 years ago by SF/pkirlin

I recently received the same error message: When running
scummvm, I immediately get 'Illegal instruction' and the
program exits. No GUI, no nothing.

ScummVM version 0.5.1, self compiled with gcc.
SDL version 1.2.6
libmad-0.15.0b

all self compiled

-----
pkirlin@hermod:~/src/scummvm-0.5.1$ ./scummvm
Unable to open configuration file: /nfshomes/pkirlin/.scummvmrc.

Illegal instruction
-----pkirlin@hermod:~/src/scummvm-0.5.1$ gdb scummvm
GNU gdb Red Hat Linux (5.3post-0.20021129.18rh)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public
License, and you are
welcome to change it and/or distribute copies of it under
certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show
warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...
(gdb) run
Starting program: /nfshomes/pkirlin/src/scummvm-0.5.1/scummvm
[New Thread 1076475904 (LWP 32563)]
Unable to open configuration file: /nfshomes/pkirlin/.scummvmrc.

[New Thread 1089731776 (LWP 32584)]

Program received signal SIGILL, Illegal instruction.
[Switching to Thread 1076475904 (LWP 32563)]
0x4003a37d in BlitRGBtoRGBPixelAlphaMMX3DNOW (info=0x0) at
SDL_blit_A.c:659
659 }
Current language: auto; currently c
(gdb) up
#1 0x4002e433 in SDL_SoftBlit (src=0x822b408,
srcrect=0xbfffb038, dst=0x822db50, dstrect=0xbfffb038) at
SDL_blit.c:108
108 RunBlit(&info);
(gdb) up
#2 0x40044cfd in SDL_LowerBlit (src=0x822b408,
srcrect=0xbfffb038, dst=0x822db50, dstrect=0xbfffb038) at
SDL_surface.c:431
431 return(do_blit(src, srcrect, dst, dstrect));
(gdb) up
#3 0x40051a4b in X11_SetIcon (this=0x8209528,
icon=0x822b408, mask=0xbfffcd50 "") at SDL_x11wm.c:181
181 if ( SDL_LowerBlit(icon, &bounds, sicon,
&bounds) < 0 )
(gdb) up
#4 0x40048859 in SDL_WM_SetIcon (icon=0x822b408,
mask=0xbfffcd50 "") at SDL_video.c:1750
1750 video->SetIcon(this, icon,
mask);
(gdb) up
#5 0x0804d1f2 in OSystem_SDL_Common::setup_icon()
(this=0x81ff730) at backends/sdl/sdl-common.cpp:1193
1193 SDL_WM_SetIcon(sdl_surf, (unsigned char *)
mask);
Current language: auto; currently c++
(gdb) up
#6 0x0804b018 in OSystem_SDL_Common::init_intern(int, bool,
bool) (this=0x81ff730, gfx_mode=0) at
backends/sdl/sdl-common.cpp:77
77 setup_icon();
(gdb) up
#7 0x0804af93 in OSystem_SDL_Common::create(int, bool,
bool) (gfx_mode=1, full_screen=false, aspect_ratio=false)
at backends/sdl/sdl-common.cpp:52
52 syst->init_intern(gfx_mode, full_screen,
aspect_ratio);
(gdb) up
#8 0x0804af64 in OSystem_SDL_create(int, bool, bool)
(gfx_mode=1) at backends/sdl/sdl-common.cpp:46
46 return OSystem_SDL_Common::create(gfx_mode,
full_screen, aspect_ratio);
(gdb) up
#9 0x080d8cfa in GameDetector::createSystem()
(this=0xbfffcdd0) at common/gameDetector.cpp:711
711 return OSystem_SDL_create(_gfx_mode,
_fullScreen, _aspectRatio);
(gdb) up
#10 0x080d9214 in main (argc=1, argv=0xbffff414) at
common/main.cpp:189
189 OSystem *system = detector.createSystem();
(gdb) up
#11 0x42015574 in __libc_start_main () from /lib/tls/libc.so.6
(gdb) up

comment:20 Changed 10 years ago by Kirben

Owner: set to fingolfin
Resolution: invalid

comment:21 Changed 5 months ago by digitall

Component: Port: Linux
Summary: ScummVM crashes with ScummVM crashes with
Note: See TracTickets for help on using tickets.