高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】debug assertion in readfile90
debug assertion in readfile()
debug assertion in readfile()
hi,
we're using dd libs, version 1.14.02. our application has to deal with multiple file formats for import (dwg and dxf are among these).
to check if a file is a valid drawing or not we call (using partial loading) readfile() method and trap the exception. if no exception is generated and we get a non-null oddbdatabaseptr then we say that we can import the file as dwg/dxf.
the problem is that when our app (which also supports import excel files) calls readfile() on an ms excel file, an assert is generated multiple times (screenshot attached). the call stack looks like the following:
.....
...!_chvalidator()
...!isspace()
...!oddbasciidxffilerimpl::readnext()
...!oddbasciidxffilerimpl::nextitem()
...!oddbdxfloader::getfileinfo()
...!oddbdxfloader::loaddrawing()
...!oddbdxfloader::enddbloading()
...!oddbdatabase::closeinput()
...!oddbdatabase::readfile()
...!oddbhostappservices::readfile()
.....
this is reproducible with any ms excel file.
we tried setting ballowcpconversion to both true and false with the same result.
of course, this does not occur when we use builds linked with release version of the libs. but that stops us from automating the testing of debug builds.
any suggestions?
thanks
attached images
i can't reproduce it with exel file in odamfcapp (probably this happens on computer with multibyte code page?).
maybe this can be handled with _crtsetreportmode() and _crtsetreportfile() functions? try to look at "debug reporting functions of the c run-time library" article in msdn help.
sergey slezkin
|