Hi all, Maxwell guy posting in the V-Ray forum. Matthew and I have been discussing this issue over email for a couple of months now, with respect to BuildEdge PLAN, and this morning he sent me a link to this forum thread, so I thought I'd post what I know about it.
@valerostudio said:
I think something happened in a recent update that affects the way materials are handled.
That's not the case, I just tested here with BuildEdge PLAN 2.0 (I don't have V-Ray) and Google SketchUp 8.0.3117, which is the initial SU8 release, and it crashes there too. However, I tried it in SketchUp 7, and was not able to reproduce the crash.
@valerostudio said:
It has something to do with materials that have additional information attached to them. Some of your materials may have bump files or settings from other engines and you don't even know it.
To be accurate, my tests have indicated that it specifically has to do with applying a SKM which is not contained in the model, and whose attribute data contains a string with a forward slash. That is why it affects SKMs written with render plugins active -- commonly, the data you need to store includes file paths with forward slashes. There could be other problem scenarios, this is just the one I've identified.
If you want to reproduce the issue, here are steps by which you should be able to do it, with as many variables removed as possible. You should perform these with all plugins uninstalled, except for the one you think is triggering the crash, apparently meaning V-Ray or BuildEdge PLAN:
- Open SketchUp, open the Ruby Console, and run this one-liner:
Sketchup.active_model.materials.add('m').set_attribute('d','k','/')
- Drag the new "m" material out into a library to create a SKM.
- Select the new "m" SKM and attempt to apply it to an entity.
Upon executing step 3, SketchUp should immediately crash. Note that you should not drag the SKM into the model materials before applying it, otherwise you will not trigger the issue -- just select the SKM in the material browser, then try to apply it to an entity. My guess is that the affected plugins are not doing anything wrong, and that this rather points to a bug in SketchUp. Plugins may be able to work around it by changing some code, though.
Seeing as how I have only personally reproduced this with BuildEdge PLAN, I have not reported it to the SketchUp people as a potential bug yet, and have rather reported it to the BuildEdge people, since they have the code capable of triggering it. I would have reported it to SketchUp, but I have not been successful in writing a test plugin that shows similar behavior.