Crash at SUModelRelease(SUModelRef*)

Hi Experts,

When we read the contador.skp by SketchUp SDK, it crashes at SUModelRelease(SUModelRef*). SketchUp 2016 also crashes when it is closing the file. The file is of version 6.4.12, and after it is saved to SketchUp 2016 version, the crash is gone.

Could you help to take a look at this issue?

Regards,
Phillip

contador.skp (2.2 MB)

Could you provide a minimal complete code example that reproduce this?

@tt_su, my modified ReadingFromASkpFile example gives…

Segmentation fault: 11

is it the old version thumbnail?

john

@tt_su, please build and run a simple code as below:

int main()
{
    SUInitialize();

    SUModelRef model;
    SUSetInvalid(model);

    SUModelCreateFromFile(&model, "contador.skp");

    SUModelRelease(&model);
    SUSetInvalid(model);

    SUTerminate();

    return 0;
}

I get an exception thrown at SUModelRelease()

Thanks!

I can replicate the exception.

I also see a crash in SketchUp when closing after opening the file. There is something corrupted in it.
I’ll log an issue. (SU-38123)

I also found that if the file was repaired the file would no longer crash:
2017-11-08_11h15_22

Thanks a lot!

Now that SU2018 is finally released, the SU2018 version of the SDK have a new function SUModelFixErrors which allows you to trigger the Fix Model functionally from the C API as well.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.