[Ohrrpgce] SVN: james/8208 Add an extra null pointer check in LookupSlice, in case the default star

Ralph Versteegen teeemcee at gmail.com
Fri Nov 11 16:34:37 PST 2016


(Main reply at "Re: SVN: james/8209 SUBify the GOSUB/RETRACE block that
loaded the hero formation previews...")

But SliceTable is not used in Custom anyway? Well, on checking, it turns
out that it is used in exactly two places: LookupSlice is the only function
in slices.bas (aside from SetupGameSlices and DestroyGameSlices) that
accesses SliceTable, and also enemydata in subs.rbas does
"SetSliceParent(preview, SliceTable.Root)", which appears to be an error,
since SliceTable.Root is NULL.

I've always been unhappy about SliceTable/SetupGameSlices/DestroyGameSlices
existing in slices.bas instead of Game-specific source files; if possible
to get rid of the LookupSlice dependency I would move it into GameState.

On 12 November 2016 at 11:04, James Paige <Bob at hamsterrepublic.com> wrote:

> I added this because Taoki was getting a crash
>
> $1 = 0x8801c0 <__fb_errmsg> "\nAborting due to runtime error 7 (null
> pointer access) at line 796 of slices.bas::LOOKUPSLICE()\n\n"
>
> Whenever he would highlight an "Empty" slot in the "Construct Formation Sets" menu on Linux 64 bit
>
> (I was unable to reproduce this on 32 bit linux)
>
> ---
>
> James
>
>
>
>
>
> On Fri, Nov 11, 2016 at 2:00 PM, <subversion at hamsterrepublic.com> wrote:
>
>> james
>> 2016-11-11 14:00:46 -0800 (Fri, 11 Nov 2016)
>> 112
>> Add an extra null pointer check in LookupSlice, in case the default start
>> slice of SliceTable.root is also null
>> ---
>> U   wip/slices.bas
>> _______________________________________________
>> Ohrrpgce mailing list
>> ohrrpgce at lists.motherhamster.org
>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>
>
>
> _______________________________________________
> Ohrrpgce mailing list
> ohrrpgce at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20161112/87b336df/attachment.htm>


More information about the Ohrrpgce mailing list