Opened 15 years ago

Closed 15 years ago

Last modified 6 years ago

#4120 closed defect (fixed)

IRIX: immediate crash when launching ScummVM

Reported by: joostp Owned by: SF/tanoku
Priority: normal Component: Port: IRIX
Version: Keywords:
Cc: Game:


Since revision r35995 ScummVM segfaults at startup on my IRIX box.

The crash seems to be caused by changes in createRenderer(); on this particular machine the 16-bit video mode is 555 BGR, so it doesn't get picked up by matching against the 555 RGB (ColorMasks<555>) preset, and thus none of the CREATE_RENDERER_16() calls is being done.

I'm not sure how to best go about fixing this, hence the bug report.

Assigning to Max since he made the change. :)

Ticket imported from: #2537212. Ticket imported from: bugs/4120.

Change History (10)

comment:1 by lordhoto, 15 years ago

Currently we don't have any ColorMask for BGR555. One possible solution would be to add a certain ColorMask for that specific mode. Since we use an integer passed as mode description, it wouldn't be that nice though (555 is currently used for RGB555, which should be kept!).

This all leads back to our VectorRenderer implementation taking an ColorMask as template parameter. We should really think of changing it to take a PixelFormat as constructor parameter for example. Then we would also get rid of the HACK/FIXME in graphics/VectorRendererSpec.cpp. Also it could lead to a slightly decreased binary size (note the 'hack' with VECTOR_RENDERER_FORMAT and DISABLE_FANCY_THEMES a few lines above), but maybe at a slight performance cost.

comment:2 by fingolfin, 15 years ago

From my POV, the main reason VectorRendererSpec is a template is speed (well, and back when it was written, PixelFormat did not yet exist ;). Of course using a PixelFormat is more flexible and so on. But I wonder whether it will affect performance negatively. If we want to make such a conversion, we definitely should check the speed of the resulting code on various "slow" platforms.

comment:3 by fingolfin, 15 years ago

Owner: changed from fingolfin to SF/tanoku

comment:4 by SF/tanoku, 15 years ago

The vector renderer class does need a rewrite to support the generic PixelFormat struct. I might as well get started on that, but currently the binary theme format is on top of my todo list. Jeez, I'm a busy person.

Think there's some (proper) way to hack a fix for this issue without the rewrite? Is this really a top priority?

comment:5 by joostp, 15 years ago

The only hacks I can think of involve one or more #ifdef IRIX bits... easiest one probably being a special case in graphics/colormasks.h

About the priority, well, there will not be very many people running ScummVM on IRIX, however, it went from working fine (with some colour problems because of BGR<->RGB), to ScummVM not running at all without hacking the source, for no apparent -to most people- reason. In that regard it's quite severe.

comment:6 by joostp, 15 years ago

I just tried latest SVN on a different SGI Machine (Indigo2), and there the current GUI code / ScummVM seems to work fine, so it seems dependent on the type of videocard used. Therefore the #ifdef IRIX stuff in colormasks.h wouldn't work, and we really do need a proper solution that involves PixelFormat.

comment:7 by fingolfin, 15 years ago

I rewrote the vector renderer to use a Graphics::PixelFormat. Hopefully it works better now ?

comment:8 by joostp, 15 years ago

Resolution: fixed
Status: newclosed

comment:9 by joostp, 15 years ago

Works brilliantly now! Thanks!

comment:10 by digitall, 6 years ago

Component: Port: IRIX
Note: See TracTickets for help on using tickets.