Crash in SUModelCreateFromFile() when running sample code with the attached file


Hello SDK experts,

I am going to upgrade our SketchUp SDK from (11/3/2014) to (Oct-19-2015).

After I run the regression test, I found one model (Weldment_12_v26.skp) crashed under the new SDK environment.
It can be reproduced in the sample code “ReadingFromAskpFile”.
Crashed in the following line:
SUResult res = SUModelCreateFromFile(&model, “Weldment_12_v26.skp”);

Could anyone take a look why it crashes for the new SDK? Is this a regression bug?

There is no issue for the old SDK (11/3/2014) that we are using now.


Weldment_12_v26.skp (718.0 KB)


before even testing against the SDK…

I opened it in SU v16, noticed all the empty/un-named components in Outliner, and ran Fix Problems to see if it would remove them…

It ‘BugSplated’ SU so I sent it the report…

maybe @Barry can have a look at the splat?



Thanks for your comments, John.

By the way, the attached file was created by ourselves.
We want to know the detailed crash reason.
Is this crash a common workflow or only for this special model?



If the C API allows you to create groups/components with no names then that’s a bug in the API. I’ll file an issue for that.
Please review your code and make sure you always provide a name for components - and otherwise they are invalid.

We’ve not heard about this being a common crash.


Hi Thomas,

The C API allows clients to set empty names, please file a bug for it.

Try the following code:

SUResult sures = SUComponentDefinitionCreate(&SUCompDef);
char * name = "";           // Try an empty name
sures = SUComponentDefinitionSetName(SUCompDef, name);     // no error here.

The API SUComponentDefinitionSetName() returns SU_ERROR_NONE.


Hi Alex. Thanks for reporting. We have the issue logged.