Boost logo

Boost Users :

Subject: Re: [Boost-users] Runtime error with Boost's unit test framework
From: acorn12 (acorn12_at_[hidden])
Date: 2009-12-09 18:09:03

Gennadiy Rozental wrote:
> Joey Mink <joeymink <at>> writes:
>> Hi all,I'm a newbie using the boost unit test framework.
>> I'm getting a run-time exception that presents itself
>> with the following message:
>> Unhandled exception at 0x61c3b130 (msvcr80d.dll) in
>> test.exe: 0xC0000005: Access violation reading location
>> 0xcccccccc.
> Please post an trimmed example illustrating the problem and also describe how
> you build both boost library and your test module.
As I - as also a newb - am having similar problems, trying to use boost.
unit testing with wxWidgets,
I'll jump in here as well, hoping you won't mind.

As best as I can recall the building went something like:



.\bjam |

My project files - under MSVC 2008 C++ Express

// but86.cpp : Defines the entry point for the console application.

#include <boost/test/unit_test.hpp>
#include <boost/test/unit_test.hpp>
#include "chip8X86Dllh.h"
/* from
#define BOOST_TEST_MODULE example

// -------------------------------------------------------------
class F {
    BOOST_TEST_MESSAGE( "teardown fixture" );
    BOOST_TEST_MESSAGE( "Freeing DLL" );
    FreeLibrary( hExeLib );

  wchar_t *psz86DllName;// = ".\\dis8x86.dll";

  BOOST_TEST_MESSAGE( "setup fixture" );
  psz86DllName = L"../chips/chipx86.dll"; <<<< the DLL I need to test

// -------------------------------------------------------------
// test suite level fixture

// -------------------------------------------------------------

  long lProcrSpecifics(4);
    BOOST_REQUIRE_EQUAL(4, lProcrSpecifics);
  processorSpecifics_t *psProcessorSpecifics;


After returning to this project now after a number of days,
it seems to run with the code that is left right now ... but unless I
single step through at least a part of it,
I see nothing of the output, because it opens & shuts the console window
so fast.

Depending on how far I single step it seems to sometimes
give me some access errors, other time it doesn't.

If I single-step until I hit the point where the app returns to crt.exe,
things look OK, but I don't want to single step all the way all the time ;-)

The IDE output window does _not_ show the test output - neither during the
run, nor afterwards.

Thus my preference would be to build a GUI - using wxWidgets - but I
can't work out how
to call boost UTF from within a wxWidgets app.

If any one has a solution for this problem, I'd greatly appreciate it.


Fight Spam - report it with wxSR

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at