[Scummvm-devel] Bugs blocking the DS port: SAGA Engine font loading crash, Options menus crash, GMM load/save crash
Max Horn
max at quendi.de
Mon May 16 12:13:47 CEST 2011
Am 16.05.2011 um 11:43 schrieb Neil Millstone:
> On 16/05/2011 10:34, Willem Jan Palenstijn wrote:
>> On Sun, May 15, 2011 at 11:46:01AM +0100, Neil Millstone wrote:
[...]
>>> Inherit the Earth in the Saga engine now doesn't run on the DS, crashing
>>> to a white screen (it's a wierd kind of crash which I can't trap).
>>>
>>> I spent hours reverting to older versions of ScummVM and building until
>>> I came accross the commit that broke the build. It's this one:
>>>
>>> * SAGA: replace Font "::*alloc"& "::free" with Common::Array
>>> https://github.com/scummvm/scummvm/commit/1bd1a253f0bdc063b4795a68fab52e2d98d2f181
>>>
>>> I can't see any problems with it, but if someone who knows the code
>>> better than me can take a look at it, I would be very grateful.
>> Is there any way you could get information on where/when exactly it crashes?
>> (Maybe with printfs, or stepping through the code in a debugger?)
>> It would already be very helpful to know if it crashes when loading/initializing
>> the plugin/engine, or when loading the fonts, or when using the fonts, or...
>>
>> -Willem Jan
> Sorry, yes, I did do that.
>
> It crashes on the line _fonts.resize(_vm->getFontsCount()), on font.cpp
> line 46.
Maybe an out-of-memory error? Resize may after all end up allocating a new array, and copying the old stuff over to the new location. IIRC the DS port compiles with assertions turned off to conserve memory, and sadly our Array::resize code only checks for out-of-memory using an assert (bad!). Maybe you can hack your copy of common/array.h, replacing the assert in the reserve() method by a proper "if (!_storage) error("out of memory");"
That way, we would at least know if it is out of memory or not ?
Bye,
Max
More information about the Scummvm-devel
mailing list