Maniphest T24636

15mb Collada DAE file import crashes Blender to Desktop
Closed, Resolved

Assigned To
Nathan Letwory (jesterking)
Authored By
Dominique Lorre (dlorre)
Nov 10 2010, 10:29 AM
Tags
  • Import/Export
  • BF Blender
Subscribers
Brecht Van Lommel (brecht)
Dominique Lorre (dlorre)
Jeroen Bakker (jbakker)
Martijn Berger (juicyfruit)
Mike Sloman (mikes)
Nathan Letwory (jesterking)
Ton Roosendaal (ton)

Description

Patches: T25296

Blender 2.55
Reproduced on Linux 64 bits 4Gb and Windows XP 32 bits (about 3Gb)


I have exported the basic daz quickstart scene to Collada DAE Generic format.
Then it crashes Blender almost immediatly after clicking the import button.

With a smaller scene (5mb, just the trainers) Blender imports successfully but crashes after a few manipulations.

Exporting from DAZ to Obj seems to work better. The number of vertices don't seem to be the issue.

The dae textures are not necessary to reproduce the bug (it crashes wether or not textures are there).

Event Timeline

Dominique Lorre (dlorre) edited a custom field.Nov 10 2010, 10:29 AM
Dominique Lorre (dlorre) attached 1 file(s): F12165: quickstart.7z.
Ton Roosendaal (ton) added a comment.Nov 10 2010, 11:50 AM

Assigned to Nathan to investigate.
Our Collada code is very weak still, we can use help here from experienced people.

Mike Sloman (mikes) added a comment.Nov 10 2010, 12:55 PM

OSX 64bit BF 32983

Crashes for me too, with a number of "Cannot create image" errors on the system log and produces this crash dump (at the UVDataWrapper::getUV function::


Identifier: org.blenderfoundation.blender
Version: 2.55-beta (2.55-beta, 2010-Nov-10, Blender Foundation)
Code Type: X86-64 (Native)
Parent Process: launchd [186]

Date/Time: 2010-11-10 22:21:13.470 +1030
OS Version: Mac OS X 10.6.4 (10F569)
Report Version: 6

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000079617272
Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 org.blenderfoundation.blender 0x000000010068fb48 UVDataWrapper::getUV(int*, float*) + 56
1 org.blenderfoundation.blender 0x000000010068fc48 MeshImporter::set_face_uv(MTFace*, UVDataWrapper&, COLLADAFW::IndexList&, int, bool) + 104
2 org.blenderfoundation.blender 0x0000000100690fc6 MeshImporter::read_faces(COLLADAFW::Mesh*, Mesh*, int) + 2598
3 org.blenderfoundation.blender 0x000000010069144a MeshImporter::write_geometry(COLLADAFW::Geometry const*) + 346
4 org.blenderfoundation.blender 0x00000001006772f0 Writer::writeGeometry(COLLADAFW::Geometry const*) + 16
5 org.blenderfoundation.blender 0x00000001016e220f COLLADASaxFWL::GeometryLoader::end__geometry() + 63
6 org.blenderfoundation.blender 0x00000001017e563e COLLADASaxFWL::GeometryLoader14::end__geometry() + 14
7 org.blenderfoundation.blender 0x00000001017d1534 COLLADASaxFWL14::ColladaParserAutoGen14Private::_end__geometry() + 20
8 org.blenderfoundation.blender 0x0000000101786709 GeneratedSaxParser::ParserTemplate<COLLADASaxFWL14::ColladaParserAutoGen14Private, COLLADASaxFWL14::ColladaParserAutoGen14>::elementEnd(char const*) + 489
9 org.blenderfoundation.blender 0x0000000101958006 GeneratedSaxParser::LibxmlSaxParser::endElement(void*, unsigned char const*) + 22
10 libxml2.2.dylib 0x00007fff889667cc xmlParseXMLDecl + 8401
11 libxml2.2.dylib 0x00007fff8896e38b xmlParseElement + 1545
12 libxml2.2.dylib 0x00007fff8896b9a9 xmlParseContent + 232
13 libxml2.2.dylib 0x00007fff8896e19e xmlParseElement + 1052
14 libxml2.2.dylib 0x00007fff8896b9a9 xmlParseContent + 232
15 libxml2.2.dylib 0x00007fff8896e19e xmlParseElement + 1052
16 libxml2.2.dylib 0x00007fff88970208 xmlParseDocument + 856
17 org.blenderfoundation.blender 0x0000000101958468 GeneratedSaxParser::LibxmlSaxParser::parseFile(char const*) + 136
18 org.blenderfoundation.blender 0x0000000101732e1c COLLADASaxFWL::VersionParser::createAndLaunchParser() + 92
19 org.blenderfoundation.blender 0x00000001016dae2c COLLADASaxFWL::FileLoader::load() + 92
20 org.blenderfoundation.blender 0x00000001017073e5 COLLADASaxFWL::Loader::loadDocument(std::string const&, COLLADAFW::IWriter*) + 325
21 org.blenderfoundation.blender 0x0000000101927cef COLLADAFW::Root::loadDocument(std::string const&) + 31
22 org.blenderfoundation.blender 0x0000000100675a02 DocumentImporter::import(bContext*, char const*) + 98
23 org.blenderfoundation.blender 0x000000010066b24a collada_import + 26
24 org.blenderfoundation.blender 0x000000010015de16 wm_collada_import_exec + 166
25 org.blenderfoundation.blender 0x0000000100156676 wm_handlers_do + 1590
26 org.blenderfoundation.blender 0x0000000100156abe wm_event_do_handlers + 734
27 org.blenderfoundation.blender 0x0000000100150330 WM_main + 32
28 org.blenderfoundation.blender 0x000000010014eec2 main + 530
29 org.blenderfoundation.blender 0x000000010014e378 start + 52

Martijn Berger (juicyfruit) added a comment.Dec 9 2010, 11:48 AM

Backtrace on 64bit linux rev: 33568

#0 0x00000000013c6bf7 in UVDataWrapper::getUV(int*, float*) ()
#1 0x00000000013c6ef5 in MeshImporter::set_face_uv(MTFace*, UVDataWrapper&, COLLADAFW::IndexList&, int, bool) ()
#2 0x00000000013c7bdb in MeshImporter::read_faces(COLLADAFW::Mesh*, Mesh*, int) ()
#3 0x00000000013c928e in MeshImporter::write_geometry(COLLADAFW::Geometry const*) ()
#4 0x00000000013a1f98 in Writer::writeGeometry(COLLADAFW::Geometry const*) ()
#5 0x0000000001e88048 in COLLADASaxFWL::GeometryLoader::end__geometry() ()
#6 0x0000000001a5c1e7 in COLLADASaxFWL::GeometryLoader14::end__geometry() ()
#7 0x0000000001b2ad25 in COLLADASaxFWL14::ColladaParserAutoGen14Private::_end__geometry() ()
#8 0x0000000001bb61b5 in GeneratedSaxParser::ParserTemplate<COLLADASaxFWL14::ColladaParserAutoGen14Private, COLLADASaxFWL14::ColladaParserAutoGen14>::elementEnd(char const*) ()
#9 0x0000000001f2dab6 in GeneratedSaxParser::LibxmlSaxParser::endElement(void*, unsigned char const*) ()
#10 0x00007ffff42ca7b5 in ?? () from /usr/lib/libxml2.so.2
#11 0x00007ffff42d18ab in xmlParseElement () from /usr/lib/libxml2.so.2
#12 0x00007ffff42d1b8a in xmlParseContent () from /usr/lib/libxml2.so.2
#13 0x00007ffff42d16cb in xmlParseElement () from /usr/lib/libxml2.so.2
#14 0x00007ffff42d1b8a in xmlParseContent () from /usr/lib/libxml2.so.2
#15 0x00007ffff42d16cb in xmlParseElement () from /usr/lib/libxml2.so.2

Jeroen Bakker (jbakker) added a comment.Dec 19 2010, 7:51 AM

The name that will be set to the custom data layer for UV coordinates are larger then blender can handle. the data pointer of customdatalayer will be overriden by data. this makes blender instable.

CustomDataLayer
line 1449:
strcpy(data->layers[index].name, name);
--> strncpy?
strncpy(data->layers[index].name, name, len);
data->layers[index].name[len-1]='\0';
changed to strncpy(data->layers[index].name, name, 32);
data->layers[index].name[31] ='\0';

patch will be included

Jeroen Bakker (jbakker) attached 1 file(s): F12170: patch-opencollada-names.txt.Dec 19 2010, 7:58 AM
Brecht Van Lommel (brecht) added a comment.Dec 19 2010, 10:18 AM

Jeroen, BLI_strncpy can be used here to avoid manual 0 termination. But further, I guess you can commit this directly, fix is simple enough?

Jeroen Bakker (jbakker) added a comment.Dec 19 2010, 11:41 AM

Brecht, thanks for the tip, fixed.

will let Nathan commit it (I have no svn rights)

Nathan Letwory (jesterking) added a comment.Dec 19 2010, 9:31 PM

applied and committed r33797. Attached file imports very fast :)

Nathan Letwory (jesterking) changed the task status from Unknown Status to Resolved.Dec 19 2010, 9:31 PM