On Tue, 11 Dec 2001, Chris Kennedy wrote:

> I've been downloading this for months and using it, and I think freesci is
> great. I build it under the Win32 platform.

Thanks!

> Recently, I have had an issue of it crashing when starting up with a memory
> related error. I believe it began with the 20011208 CVS image.
>
> Directly after it parses the config file, it crashes with a Application
> Error (The instruction at <hex number> referenced memory at "0x00000000".
> The memory could not be "read".
>
> If you debug it, it points to the source code inside of sci_memory.c to this
> function:

The problem is a NULL pointer is being passed to _SCI_STRDUP, which then
passes it to strdup(). For me, it was doing it on the options for the gfx
driver. I emailed Alex (who made the change that introduced the problem)
earlier today, hopefully he'll look into a proper fix tonight.

> It highlights the Memory Allocation line. Not quite sure what's going on. I
> haven't personally had to use memory allocation much in C++, so I can't fix
> it on my local copy this time. :)

I worked around this by checking for NULL being passed and returning NULL
in that case before the real strdup() is called.


--
http://www.clock.org/~matt


Reply via email to