Hi Lars,


> gfxw_new_list(): Somebody forgot a return statement here...

Good thing we're testing on different architectures :-)

> This fixes FreeSCI failing to startup on my machine. I still can't play any
> game with it, though The "Sierra presents" part of the SQ3 intro is garbled,

Right. Some view offsets are broken, not all parts of the screen are 
updated the way they ought to, and priority drawing appears not to work
correctly.

> and FreeSCI segfaults right after with this message:

Maybe I should explain some parts of this, since I still haven't come
around to provide documentation (apart from what's in the header
files) for this stuff:

> GFX Error: widgets.c, _gfxw_remove_widget() L344:Internal error: Attempt to remove 
>widget from container it was not contained in!
> Widget:    INVALID [(0,10)(320x190)]VC SORTED_LIST viszone=((0,10),(320x190))

This is a "sorted list" widget. They're used pretty exclusively for the
dynamic view list. It is flagged as INVALID, which means that it has been
deallocated and the memory it was stored in has been tagged appropriately.
The widget used to cover an area of 320x190 pixels, located at (0,10).
V means "visible".
C means "container" (the widget may contain other widgets).

The "viszone" is the clipped zone (absolute coordinates) sub-widgets may
draw to (and draw relative to).

> --dirty:

If the widget contains any dirty rectangles, they are listed here. Dirty
rectangles are zones on the screen that have been changed and need to be
re-drawn to the back buffer. Note that this is independant of (though it
uses the same functions as) the mechanism used to propagate changes from
the back buffer to the front buffer (the one you see).

> --contents:

If the widget had any contents, they would be listed here.


> Container:    v #00000002 [(0,10)(320x190)]VC SORTED_LIST viszone=((0,10),(320x190))

This container is preceeded by a 'v', which means that it's a valid
container. The #000000002 indicates that it has an ID, which is an
optional attribute. Interestingly, the actual parent of the list we're
freeing should be port #2 (the picture port), but it is shown as a sorted
list. A gfx_print_visual right before the crash identifies this as a port,
though.

> --dirty:
> dirty(0,10, (320x190))

Here we have a dirty rectangle.

> --contents:

No contents either.

> GFX Error: widgets.c, _gfxw_debug_remove_widget() L64:Failed to remove widget!

I'm renaming this to "Attempted removal of unregistered widget". Widget
allocation/deallocation is currently being double-checked (#undef
GFXW_DEBUG_WIDGETS to disable this); this error means that some function
attempted to deallocate a widget twice.

(I'm working on this now; just FYI if this pops up again).

> FreeSCI Sound server: Parent process is dead, terminating
> Trace/breakpoint trap

That's the BREAKPOINT() macro in action. If you're using a debugger, you
can get a full stack trace to nail down the culprit (DrawPic in this
case).


I hope this cleared up some issues. If you have any trouble understanding
the widget system, or why something was done one way or another, please
ask. A lot of bugs are still hiding in there, and looking away will only
encourage them.

llap,
 Christoph


Reply via email to