.obj import to cycles crashes the program. #52742

Closed
opened 2017-09-14 05:00:36 +02:00 by Peter Chappell · 13 comments

Windows 7 Pro SP1 Nvidea Geforce 970

Blender 2.79. Function not available in 2.78c.

Import an .obj. Try viewing object in rendered mode and program crashes.

Took a saved .obj with simple data (diffuse and specular values only) and opened it in Blender With Cycles render selected, checked node editor. 18 nodes set up (for what should only be, at most, 3 nodes). Select method of display as 'rendered view', program crashes.
wall section test.mtl

wall section test.obj

bug report.blend

Windows 7 Pro SP1 Nvidea Geforce 970 Blender 2.79. Function not available in 2.78c. Import an .obj. Try viewing object in rendered mode and program crashes. Took a saved .obj with simple data (diffuse and specular values only) and opened it in Blender With Cycles render selected, checked node editor. 18 nodes set up (for what should only be, at most, 3 nodes). Select method of display as 'rendered view', program crashes. [wall section test.mtl](https://archive.blender.org/developer/F797198/wall_section_test.mtl) [wall section test.obj](https://archive.blender.org/developer/F797199/wall_section_test.obj) [bug report.blend](https://archive.blender.org/developer/F797200/bug_report.blend)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @piersyf

Added subscriber: @piersyf

Added subscriber: @Sergey

Added subscriber: @Sergey

Can not reproduce the issue, but the files are missing texture which might be essential for this issue to happen. So:

  • Provide all dependent files (maybe there's something else apart from the texture?)
  • Try packing all images into .blend file and render then and see crash still happens.
Can not reproduce the issue, but the files are missing texture which might be essential for this issue to happen. So: - Provide all dependent files (maybe there's something else apart from the texture?) - Try packing all images into .blend file and render then and see crash still happens.

Added subscriber: @ArtoKitula

Added subscriber: @ArtoKitula

If OBJ file has:

mtllib  wall section test.mtl

importer doesn't find correct mtl file (tries 'wall' 'section' and 'test.mtl')
so spaces there in filename are one problem.

If OBJ file has: ``` mtllib wall section test.mtl ``` importer doesn't find correct mtl file (tries 'wall' 'section' and 'test.mtl') so spaces there in filename are one problem.
Author

Thank you both. Your answers helped me to identify the cause. The other program compiling the .obj (exporter) is creating corrupt images of the materials, and I suspect this faulty code is causing Blender to crash. After manually replacing the texture images in the export file with valid images, the Blender import to Cycles worked fine.
BTW, I had tried 4 different objects before posting here and all had resulted in the same issues. My bad for not including the exporter in the possible fault line.
This can be closed, no bug here....

Thank you both. Your answers helped me to identify the cause. The other program compiling the .obj (exporter) is creating corrupt images of the materials, and I suspect this faulty code is causing Blender to crash. After manually replacing the texture images in the export file with valid images, the Blender import to Cycles worked fine. BTW, I had tried 4 different objects before posting here and all had resulted in the same issues. My bad for not including the exporter in the possible fault line. This can be closed, no bug here....

Can you attach an example of corrupted image? I would like to see if we can make Blender to identify such images and prevent crashes (rendering magenta-color as a missing texture for corrupted image is more friendly than crashing)

Can you attach an example of corrupted image? I would like to see if we can make Blender to identify such images and prevent crashes (rendering magenta-color as a missing texture for corrupted image is more friendly than crashing)
Author

Sure. I also did another experiment. I exported a model from Poser as an .obj. I did this twice, once with full texture path names and once exporting the textures to the folder.

With the first one I opened the .mtl file and checked the texture path. It is valid and accurate. When importing to Blender that texture shows magenta in material view and if I try rendered view the program crashes. If I then physically search for the image from the cycles node it works. For some reason Blender is not following the path automatically, but can do so if I manually point it to the file.

The second option (exporting the textures) results in the corrupted images. 041.jpg I can't view this in Windows picture viewer and the size of the file is different to the original.

Sure. I also did another experiment. I exported a model from Poser as an .obj. I did this twice, once with full texture path names and once exporting the textures to the folder. With the first one I opened the .mtl file and checked the texture path. It is valid and accurate. When importing to Blender that texture shows magenta in material view and if I try rendered view the program crashes. If I then physically search for the image from the cycles node it works. For some reason Blender is not following the path automatically, but can do so if I manually point it to the file. The second option (exporting the textures) results in the corrupted images. ![041.jpg](https://archive.blender.org/developer/F802362/041.jpg) I can't view this in Windows picture viewer and the size of the file is different to the original.

Can you maybe save .blend file with all the referenced textures etc, pack them to an archive? But also weird why importing doesn't happen correctly. Perhaps worth separating two reports:

  1. Crash when special "corruption" happens.
  2. MTL is not imported correctly.
Can you maybe save .blend file with all the referenced textures etc, pack them to an archive? But also weird why importing doesn't happen correctly. Perhaps worth separating two reports: 1. Crash when special "corruption" happens. 2. MTL is not imported correctly.

Added subscriber: @mont29

Added subscriber: @mont29

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Bastien Montagne self-assigned this 2017-10-10 09:53:12 +02:00

More than a week without reply. Due to the policy of the tracker archiving for until required info/data are provided.

More than a week without reply. Due to the policy of the tracker archiving for until required info/data are provided.
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#52742
No description provided.