Can we have a bit more information regarding this error: SU_ERROR_SERIALIZATION if the serialization operation itself fails
It happens in SUModelSaveToFileWithVersion() when trying to create a very large SketchUp file. I’m not sure of the exact size it would be, but probably in the realm of several GBs. Is there a file size limit the SDK can produce?
One more thing.
We use Electron, so the easiest is to attach the debugger once Transmutr is already launched. Electron uses multiple processes, so you might need to try a few of them. Usually, the first process in the debugger selection window is the one, but that’s not true 100% of the time.
Transmutr doesn’t crash, but SUModelSaveToFileWithVersion() returns SU_ERROR_SERIALIZATION
We handle the error to avoid a crash, but no .skp file is being generated. That’s what I was asking: can you check why we get SU_ERROR_SERIALIZATION in this case?
It’s failing to copy the temp file to the target location for some reason.
I see the temp skp* file being written to C:\Users\tthomas2\AppData\Local\Temp - but post-write checks for the file before copying fails.
When I tried to copy the temp file to my desktop and append .skp to it SketchUp appear to crash. So I’m not sure yet what is causing all this. The file is ~2.5 GB - I’m not sure if the filesize itself is causing problems with some of the system file functions we are calling…
I’ll to more tests tomorrow, but I suspect this is the culprit. (I tried to load the temp file again, and this time it worked.)
If this is the case, then I think the only workaround you can use right now is to check the temp directory for a skp* (skp2 or skp3 etc.) is try to manually move it after a failed serialization. It’s a bit fragile and relies on implementation details, so mileage might vary. At least you can instruct your users to try to manually recover the file.