Qt アプリケーションでdxflibを使用します。ビルド プロセスは問題ありませんが、実行しようとすると、アプリケーションは最初に次のエラーで動作を停止します。
Unhandled exception at 0x776415de in DXFOpen.exe: 0xC00000FD: Stack overflow.
これが私のシンプルなアプリです:
class CreatorAdaptor : public DL_CreationAdapter
{
QGraphicsScene *_scene;
public:
explicit CreatorAdaptor(QGraphicsScene *scene);
virtual void addLine(const DL_LineData &d);
virtual void addLayer(const DL_LayerData& data);
virtual void addPoint(const DL_PointData& data);
virtual void addArc(const DL_ArcData& data);
virtual void addCircle(const DL_CircleData& data);
virtual void addPolyline(const DL_PolylineData& data);
virtual void addVertex(const DL_VertexData& data);
virtual void add3dFace(const DL_3dFaceData& data);
};
そしてクラスの定義:
CreatorAdaptor::CreatorAdaptor(QGraphicsScene *scene) :_scene(scene)
{
}
void CreatorAdaptor::addLine(const DL_LineData &d)
{
qDebug()<<"add line";
_scene->addLine(d.x1, d.y1, d.x2, d.y2);
}
...
これが私のメインです:
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QGraphicsView *view = new QGraphicsView;
QGraphicsScene * scene = new QGraphicsScene;
view->setScene(scene);
CreatorAdaptor *dxfscene = new CreatorAdaptor(scene);
DL_Dxf dxf;
if(dxf.in("demo.dxf", dxfscene))
QMessageBox::warning(0,"error", "error");
view->show();
return a.exec();
}
コール スタック:
ntdll.dll!77af15de()
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
ntdll.dll!77af15de()
ntdll.dll!77ae014e()
kernel32.dll!755e14dd()
> msvcr100d.dll!_free_base(void * pBlock) Line 50 + 0x13 bytes C
0041f648()
QtCored4.dll!qFree(void * ptr) Line 60 + 0xa bytes C++
QtCored4.dll!QVectorData::free(QVectorData * x, int alignment) Line 82 + 0x9 bytes C++
QtCored4.dll!QVectorTypedData<char *>::free(QVectorTypedData<char *> * x, int alignment) Line 99 + 0x10 bytes C++
QtCored4.dll!QVector<char *>::free(QVectorTypedData<char *> * x) Line 468 + 0x12 bytes C++
QtCored4.dll!QVector<char *>::~QVector<char *>() Line 124 + 0x30 bytes C++
QtCored4.dll!qWinMain(HINSTANCE__ * instance, HINSTANCE__ * prevInstance, char * cmdParam, int cmdShow, int & argc, QVector<char *> & argv) Line 193 C++
0041f7e0()
DXFOpen.exe!__security_init_cookie() Line 143 C
DXFOpen.exe!WinMainCRTStartup() Line 371 C
kernel32.dll!755e339a()
ntdll.dll!77b09ef2()
ntdll.dll!77b09ec5()