|
Boost Users : |
Subject: Re: [Boost-users] [test] Crash when running my unit tests
From: Christian Henning (chhenning_at_[hidden])
Date: 2009-04-30 11:32:01
Thanks Ovanes for your quick reply. The only global variables I'm
using in my test suite are in some strings representing paths and
filenames. I have removed them to see if that changes anything but it
doesn't. Same problem as before.
The problem seems to be with tiff_test.cpp. When excluding it from the
test suite all works. Including it generates the crash.
One more thing regarding my test suite. I'm testing various image
formats, like bmp, png, etc, and each format basically runs through
similar tests. To avoid name collisions I use namespaces for each
format. Each of those namespaces contain tests with the same name,
like this:
bmp_test.cpp:
namespace bmp_test {
BOOST_AUTO_TEST_CASE( read_image_test ) {}
}
png_test.cpp:
namespace png_test {
BOOST_AUTO_TEST_CASE( read_image_test ) {}
}
I hope such use case is fine with boost::test.
Regards,
Christian
On Wed, Apr 29, 2009 at 7:30 PM, Ovanes Markarian
<om_boost_at_[hidden]> wrote:
> Christian,
>
> unfortunately I did not look into your files, but as an idea is there any
> chance that static or global variables initialiazation order is involved?
>
> Ovanes
>
> On Wed, Apr 29, 2009 at 11:26 PM, Christian Henning <chhenning_at_[hidden]>
> wrote:
>>
>> Hi there, when I try to run my tests the unit testing framework seems
>> to crash for no apparent reason. The point it's crashing is in
>> unit_test_suite.ipp[263]. It seems to crash before entering the first
>> test. The c++ runtime at this points tries to delete the memory of a
>> string which triggers the assertion.
>>
>> _ASSERTE(_BLOCK_TYPE_IS_VALID(pHead->nBlockUse));
>>
>> Here is my scenario: Everything used to run just fine before I added a
>> new file containing more tests. Meaning all of my tests are scattered
>> around a couple of files ( 20 files ) which sum up to about 120 tests.
>> I don't think that this usage is anything but exceptional. When I
>> exclude the new test file the tests are running fine. When including
>> the new test file it crashes.
>>
>> I'm running the boost trunk on a windows xp using MSVC 2005.
>>
>> Anyone any idea what I can do about this?
>>
>> My code is available here:
>> http://gil-contributions.googlecode.com/svn/trunk/
>>
>> The tests are here:
>>
>> http://gil-contributions.googlecode.com/svn/trunk/gil_2/libs/gil/io_new/test/
>>
>> Any help is more than welcome.
>>
>> Thanks ahead,
>> Christian
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net