[Scummvm-tracker] [ScummVM :: Bugs] #14652: SCI: Additional crash context when ScummVM errors

ScummVM :: Bugs trac at scummvm.org
Thu Nov 9 23:04:16 UTC 2023


#14652: SCI: Additional crash context when ScummVM errors
--------------------------------------+--------------------------
Reporter:  deckarep                   |       Owner:  (none)
    Type:  feature request            |      Status:  new
Priority:  normal                     |   Component:  Engine: SCI
 Version:                             |  Resolution:
Keywords:  Bug reporting and crashes  |        Game:
--------------------------------------+--------------------------
Comment (by sluicebox):

 This was a great start, thanks! I'm excited for the higher quality bug
 reports it will generate.

 The PR was merged into master too quickly, as `errorString` had many
 crashes, so I've been playing catch-up so that the daily builds no longer
 eat SCI error messages. We should be in good shape now, and in the process
 I've learned a bunch and found unrelated things to cleanup.

 I added a comment about this but I'll repeat it here: it's critical that
 this function not crash or call `error` (infinite recursion / stack-
 overflow) or else we lose the original message and the debugger. This
 feature is inherently difficult because it has to be perfect, or else it's
 better to do nothing, and `error` can be called at any time. Complicating
 things is that a lot of this core engine code is 1990s-style C from
 FreeSCI, so there are uninitialized variables, out of date comments, all
 our favorites.

 I played around with formatting options, and landed on one where all the
 info is condensed into a single-line header. That's what the
 `error`/`errorString` structure expects, and that's working well for the
 SCUMM engine. By limiting the context to the same line as the error
 message, this gives us the greatest chance of the info reaching us in a
 bug report. Put another way: the target audience for this text isn't the
 user who gets the error, it's us when it gets reported back. The
 formatting needs be terse, not pretty, so that it survives the trip. We
 can of course play with the formatting further as we gain experience.

 I am now convinced that we don't need or want function parameters in the
 string: they take up too much space, their length is unpredictable, object
 addresses are meaningless out of context, and ultimately it's just not
 that important when you start with room,script,function,pc. If we still
 can't reproduce, we're already in "serious" territory, and will probably
 have follow-up questions anyway and can ask for a backtrace.

 I think we can close this ticket, but I'll leave it open for now in case
 there's more someone wants to discuss.

 Thanks for making this happen! It's a solid feature, and I can think of
 many tickets this little text string would have sped up.
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/14652#comment:5>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list