powroupi / blender_mmd_tools

mmd_tools is a blender addon for importing Models and Motions of MikuMikuDance.
GNU General Public License v3.0
1.83k stars 277 forks source link

'Convert Materials for Cycles' operator randomly crash Blender #56

Open consilium538 opened 7 years ago

consilium538 commented 7 years ago

I'm using Blender 2.78a, recent updated version of blender_mmd_tool ( b10cb8c1f2ce0c681d246a7bce9ae7491e925040 ). When I import a model and hit Convert Materials for Cycles button, Blender randomly crash with no notification or alert. In terminal, I can see only EXCEPTION_ACCESS_VIOLATION error. How could I evade this issue?

powroupi commented 7 years ago

Thank you for reporting this issue, I will check it. :smile:

And just some questions:

consilium538 commented 7 years ago

Thank's for quick reply. Answer for questions

powroupi commented 7 years ago

Well, I don't have this issue on my system and the code seems to be fine, so I may not be able to solve it. :cry:

You might try convert materials manually. If Blender still crash randomly, that probably is the issue of system or Blender. If Blender works fine, there may have some bugs need to be fixed about this operator, and you might convert materials manually at this period. :smile:

consilium538 commented 7 years ago

Maybe my Computer-like thing is the problem. It often spit out bugs... Thank's for your consideration.

powroupi commented 7 years ago

You're welcome. :) Maybe it is caused by other operators, so you might keep tracking the issue and feel free to report issues you find. You can close this issue if you're sure that is the computer issue. Thank you. :smile:

PaulBRobinson commented 7 years ago

I just wanted to add that this random crashing happens to me too. There doesn't seem to be a particular model type, but I've noticed it generally only crashes if you click 'Convert Material To Cycles' when you are in any viewport mode that shows materials or textures. So clicking while in 'Solid Viewport Shading' will generally be fine, but if you are in 'Texture' or 'Material' view it will crash.

This could just be my computer, but it has always done this even using sugiany's MMD Tools. Does that information help at all?

Also thanks @powroupi (and everyone else) for all the hard work on MMD Tools.

nagadomi commented 7 years ago

I had encountered the same problem several weeks ago. At that time I was using blender 2.79 nightly build on linux, which was then fixed by the update. Perhaps it is a bug of blender and I think that it will fixed in the next version.

powroupi commented 7 years ago

So clicking while in 'Solid Viewport Shading' will generally be fine, but if you are in 'Texture' or 'Material' view it will crash.

Thank you for sharing your experience, @Nabesaka. Maybe @consilium538 could try to see if that will solve his/her issue. :smile:

Perhaps it is a bug of blender and I think that it will fixed in the next version.

Yea, I think so, @nagadomi. Or maybe it is a graphic card driver issue and updating driver might solve the issue. :smile:

consilium538 commented 7 years ago

Strangely, in my computer&blender 2.79, 'Convert Materials for Cycles' butten perfectly work well with in 'Texture' or 'Material' view in several try. I tweak little in blender_mmd_tools/mmd_tools/cycles_converter.py to make MMDBasicShader's reflection from 0.02 to 0, but I think that dosen't make any effect in this weird bug. Anyway I can convert material with no several crash...

gitspyder commented 6 years ago

I still have issues with this every now and then and come back here to refresh myself on the solution and realized my fix isn't here, so thought I'd add it.

Solution: