Hi,
So, I get a good new, the bug was solved by Robert on my last topic :
"Crash in ive writer"
Robert gave me 3 new cpp for the plugin ive. I compil them and the crash
in no longer there !
So I would recommend to submit these changes to avoid similar issues later.
Sorry for the inconvenience
Regards,
Vincent.
Vincent Bourdier a écrit :
I get the bug on a little osg file (16Mo) :
msvcp90d.dll!104ed4c3() [Frames below may be incorrect
and/or missing, no symbols loaded for msvcp90d.dll] >
osg55-osgd.dll!std::_Vector_const_iterator<unsigned
int,std::allocator<unsigned int> >::operator*() Line 98 + 0x14
bytes C++
osg55-osgd.dll!std::_Vector_iterator<unsigned
int,std::allocator<unsigned int> >::operator*() Line 340 C++
osg55-osgd.dll!std::vector<unsigned int,std::allocator<unsigned
int> >::front() Line 790 + 0x24 bytes C++
osg55-osgd.dll!osg::MixinVector<unsigned int>::front() Line 139 +
0x19 bytes C++
osgdb_ived.dll!ive::DrawElementsUInt::write(ive::DataOutputStream
* out=0x01e0f5c8) Line 37 + 0x27 bytes C++
osgdb_ived.dll!ive::Geometry::write(ive::DataOutputStream *
out=0x01e0f5c8) Line 55 C++
osgdb_ived.dll!ive::DataOutputStream::writeDrawable(const
osg::Drawable * drawable=0x059a6c30) Line 1181 + 0x2d bytes C++
osgdb_ived.dll!ive::Geode::write(ive::DataOutputStream *
out=0x01e0f5c8) Line 51 + 0xc bytes C++
osgdb_ived.dll!ive::DataOutputStream::writeNode(const osg::Node *
node=0x059a6b18) Line 1352 + 0x2d bytes C++
osgdb_ived.dll!ive::Group::write(ive::DataOutputStream *
out=0x01e0f5c8) Line 47 + 0xc bytes C++
osgdb_ived.dll!ive::DataOutputStream::writeNode(const osg::Node *
node=0x059a6710) Line 1346 + 0xc bytes C++
osgdb_ived.dll!ive::Group::write(ive::DataOutputStream *
out=0x01e0f5c8) Line 47 + 0xc bytes C++
osgdb_ived.dll!ive::MatrixTransform::write(ive::DataOutputStream *
out=0x01e0f5c8) Line 30 C++
osgdb_ived.dll!ive::DataOutputStream::writeNode(const osg::Node *
node=0x059a61a0) Line 1259 + 0xc bytes C++
osgdb_ived.dll!ive::Group::write(ive::DataOutputStream *
out=0x01e0f5c8) Line 47 + 0xc bytes C++
osgdb_ived.dll!ive::Transform::write(ive::DataOutputStream *
out=0x01e0f5c8) Line 29 C++
osgdb_ived.dll!ive::PositionAttitudeTransform::write(ive::DataOutputStream
* out=0x01e0f5c8) Line 29 C++
osgdb_ived.dll!ive::DataOutputStream::writeNode(const osg::Node *
node=0x059a5d28) Line 1268 + 0xc bytes C++
osgdb_ived.dll!ive::Group::write(ive::DataOutputStream *
out=0x01e0f5c8) Line 47 + 0xc bytes C++
osgdb_ived.dll!ive::DataOutputStream::writeNode(const osg::Node *
node=0x02d27b98) Line 1346 + 0xc bytes C++
osgdb_ived.dll!ive::Group::write(ive::DataOutputStream *
out=0x01e0f5c8) Line 47 + 0xc bytes C++
osgdb_ived.dll!ive::DataOutputStream::writeNode(const osg::Node *
node=0x02d27790) Line 1346 + 0xc bytes C++
osgdb_ived.dll!ReaderWriterIVE::writeNode(const osg::Node &
node={...}, std::basic_ostream<char,std::char_traits<char> > &
fout={...}, const osgDB::ReaderWriter::Options * options=0x04464e20)
Line 183 C++
osgdb_ived.dll!ReaderWriterIVE::writeNode(const osg::Node &
node={...}, const
std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
fileName="./data/converted/ConvertedModel.ive", const
osgDB::ReaderWriter::Options * options=0x00000000) Line 145 + 0x2d
bytes C++
osg55-osgDBd.dll!osgDB::Registry::writeNodeImplementation(const
osg::Node & node={...}, const
std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
fileName="./data/converted/ConvertedModel.ive", const
osgDB::ReaderWriter::Options * options=0x00000000) Line 1865 + 0x39
bytes C++
osg55-osgDBd.dll!osgDB::Registry::writeNode(const osg::Node &
node={...}, const
std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
fileName="./data/converted/ConvertedModel.ive", const
osgDB::ReaderWriter::Options * options=0x00000000) Line 321 + 0x18
bytes C++
osg55-osgDBd.dll!osgDB::writeNodeFile(const osg::Node &
node={...}, const
std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
filename="./data/converted/ConvertedModel.ive", const
osgDB::ReaderWriter::Options * options=0x00000000) Line 52 + 0x21
bytes C++
I don't know where the problem is...
Any idea ?
Thanks.
Regards,
Vincent.
Vincent Bourdier a écrit :
Hi all,
I'm currently looking at a way to simplify a big IVE file. (850Mbytes)
To make some test, I open the file, get all the geodes with a
visitor, simplify their geometries with osg Simplifier and write the
new file.
But, when I put the simplification sample ratio to 0.1 and 0.3
(currently testing 0.6), the simplification works well but during the
writing of the file there is a crash...
I cannot give you the original file... and I tested it on a little
file and it worked...
So, these are the questions :
Are there some limitation for the osg simplifier ?
Is there a way to ask the simplifier to remove about 80% of the datas
? (destructive simplification of course)
How can I use it better ?
Thanks for your help
Regards,
Vincent
__________ Information from ESET NOD32 Antivirus, version of virus
signature database 4485 (20091006) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
__________ Information from ESET NOD32 Antivirus, version of virus
signature database 4486 (20091007) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4486 (20091007) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
/**********************************************************************
*
* FILE: DrawElementsUByte.cpp
*
* DESCRIPTION: Read/Write osg::DrawElementsUByte in binary format to disk.
*
* CREATED BY: Auto generated by iveGenerated
* and later modified by Rune Schmidt Jensen.
*
* HISTORY: Created 20.3.2003
*
* Copyright 2003 VR-C
**********************************************************************/
#include "Exception.h"
#include "DrawElementsUByte.h"
#include "PrimitiveSet.h"
using namespace ive;
void DrawElementsUByte::write(DataOutputStream* out){
// Write DrawElementsUByte's identification.
out->writeInt(IVEDRAWELEMENTSUBYTE);
// If the osg class is inherited by any other class we should also write this to file.
osg::PrimitiveSet* prim = dynamic_cast<osg::PrimitiveSet*>(this);
if(prim){
((ive::PrimitiveSet*)(prim))->write(out);
}
else
throw Exception("DrawElementsUByte::write(): Could not cast this osg::DrawElementsUByte to an osg::PrimitiveSet.");
// Write DrawElementsUByte's properties.
// Write array length and its elements.
out->writeInt(size());
if (size()!=0) out->writeCharArray((const char*)&front(), size() * CHARSIZE);
}
void DrawElementsUByte::read(DataInputStream* in){
// Read DrawElementsUByte's identification.
int id = in->peekInt();
if(id == IVEDRAWELEMENTSUBYTE){
// Code to read DrawElementsUByte's properties.
id = in->readInt();
// If the osg class is inherited by any other class we should also read this from file.
osg::PrimitiveSet* prim = dynamic_cast<osg::PrimitiveSet*>(this);
if(prim){
((ive::PrimitiveSet*)(prim))->read(in);
}
else
throw Exception("DrawElementsUByte::read(): Could not cast this osg::DrawElementsUByte to an osg::PrimitiveSet.");
// Read array length and its elements.
int size = in->readInt();
resize(size);
if (size!=0) in->readCharArray((char*)&front(), size * CHARSIZE);
}
else{
throw Exception("DrawElementsUByte::read(): Expected DrawElementsUByte identification.");
}
}
/**********************************************************************
*
* FILE: DrawElementsUInt.cpp
*
* DESCRIPTION: Read/Write osg::DrawElementsUInt in binary format to disk.
*
* CREATED BY: Copied from DrawElementsUShort.cpp by Marco Jez
*
*
* HISTORY: Created 20.3.2003
*
* Copyright 2003 VR-C
**********************************************************************/
#include "Exception.h"
#include "DrawElementsUInt.h"
#include "PrimitiveSet.h"
#include <osg/Endian>
using namespace ive;
void DrawElementsUInt::write(DataOutputStream* out){
// Write DrawElementsUInt's identification.
out->writeInt(IVEDRAWELEMENTSUINT);
// If the osg class is inherited by any other class we should also write this to file.
osg::PrimitiveSet* prim = dynamic_cast<osg::PrimitiveSet*>(this);
if(prim){
((ive::PrimitiveSet*)(prim))->write(out);
}
else
throw Exception("DrawElementsUInt::write(): Could not cast this osg::DrawElementsUInt to an osg::PrimitiveSet.");
// Write DrawElementsUInt's properties.
// Write array length and its elements.
out->writeInt(size());
if (size()!=0) out->writeCharArray((const char*)&front(), size() * INTSIZE);
}
void DrawElementsUInt::read(DataInputStream* in)
{
// Read DrawElementsUInt's identification.
int id = in->peekInt();
if(id == IVEDRAWELEMENTSUINT){
// Code to read DrawElementsUInt's properties.
id = in->readInt();
// If the osg class is inherited by any other class we should also read this from file.
osg::PrimitiveSet* prim = dynamic_cast<osg::PrimitiveSet*>(this);
if(prim){
((ive::PrimitiveSet*)(prim))->read(in);
}
else
throw Exception("DrawElementsUInt::read(): Could not cast this osg::DrawElementsUInt to an osg::PrimitiveSet.");
// Read array length and its elements.
int size = in->readInt();
resize(size);
if (size!=0) in->readCharArray((char*)&front(), size * INTSIZE);
if (in->_byteswap)
{
for (int i = 0 ; i < size ; i++ )
{
osg::swapBytes4((char*)&((*this)[i])) ;
}
}
}
else{
throw Exception("DrawElementsUInt::read(): Expected DrawElementsUInt identification.");
}
}
/**********************************************************************
*
* FILE: DrawElementsUShort.cpp
*
* DESCRIPTION: Read/Write osg::DrawElementsUShort in binary format to disk.
*
* CREATED BY: Auto generated by iveGenerated
* and later modified by Rune Schmidt Jensen.
*
* HISTORY: Created 20.3.2003
*
* Copyright 2003 VR-C
**********************************************************************/
#include "Exception.h"
#include "DrawElementsUShort.h"
#include "PrimitiveSet.h"
#include <osg/Endian>
using namespace ive;
void DrawElementsUShort::write(DataOutputStream* out){
// Write DrawElementsUShort's identification.
out->writeInt(IVEDRAWELEMENTSUSHORT);
// If the osg class is inherited by any other class we should also write this to file.
osg::PrimitiveSet* prim = dynamic_cast<osg::PrimitiveSet*>(this);
if(prim){
((ive::PrimitiveSet*)(prim))->write(out);
}
else
throw Exception("DrawElementsUShort::write(): Could not cast this osg::DrawElementsUShort to an osg::PrimitiveSet.");
// Write DrawElementsUShort's properties.
// Write array length and its elements.
out->writeInt(size());
if (size()!=0) out->writeCharArray((const char*)&front(), size() * SHORTSIZE);
}
void DrawElementsUShort::read(DataInputStream* in){
// Read DrawElementsUShort's identification.
int id = in->peekInt();
if(id == IVEDRAWELEMENTSUSHORT){
// Code to read DrawElementsUShort's properties.
id = in->readInt();
// If the osg class is inherited by any other class we should also read this from file.
osg::PrimitiveSet* prim = dynamic_cast<osg::PrimitiveSet*>(this);
if(prim){
((ive::PrimitiveSet*)(prim))->read(in);
}
else
throw Exception("DrawElementsUShort::read(): Could not cast this osg::DrawElementsUShort to an osg::PrimitiveSet.");
// Read array length and its elements.
int size = in->readInt();
resize(size);
in->readCharArray((char*)&front(), size * SHORTSIZE);
if (in->_byteswap)
{
for (int i = 0 ; i < size ; i++ )
{
osg::swapBytes((char *)&((*this)[i]),SHORTSIZE) ;
}
}
}
else{
throw Exception("DrawElementsUShort::read(): Expected DrawElementsUShort identification.");
}
}
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org