2009/12/27

Error 0x800704b8 occurs when I do 'ipv6 install" on XP

I did 'ipv6 install' to use ipv6 on Windows XP; However, the ipv6 tell the following:

Failed to complete the action. Error 0x800704b8

This problem is solved by the following method:

  1. Do the command
    esentutl /p %windir%\security\Database\secedit.sdb
  2. Select OK on recovery
  3. Input 'ipv6 install' on the console
  4. Then, the ipv6 has been installed with success.

These may be caused by certain security software or network utility.

I found the solution at saychan71's blog.

2009/12/06

Memo on Boost Spirit 2.0

Boost Spirit 2.0 is updating now and was not fixed at Boost 1.40.0. For example, multi_pass was not complete at 1.40.0.

As I want to use such as new functionary, I replaced the files in /library/boost/boost/spirit from 1.40.0 to head of Subversion.

SystemDirector UML editor

SystemDirector Application Modeler UML Editor V2.0 is a free UML 2.0 editor, which allow business use, too.(Article in Japanese) Although I use other tool, Enterprise Architect (EA), but EA can not use in other's PC because the EA is not free and requires cost. In this case, I found the System Director.

System Director runs on Eclipse 3.2 (Callist). I tried to use newest Eclipse 3.5 (Galileo), but modules Sytem Director requires are not fit to the Galileo. Thus, I am using System Director on the Galileo.

I wrote mainly sequence chart and state chart with the System Director. These charts are clear and enough to use.

2009/12/02

MISRA C++

I bought MISRA-C++:2008 of pdf personally. It is enough useful for me, but text copy forbidden on the pdf is just a little inconvenience. It is not serious problem since it allows text search on the pdf.
Not only MISRA but most pdf documents nowadays are same, I feel so. Of course, EULA of most of documents excluding Free Software restricts duplication, redistribution, republication, and so on.

Although I will not break Japanese copyright act and disclose documents of course, the act allows reasonable local copy and translation for private use as restriction against copyright. It would help my work more if I could use my English-Japanese translator software because I can read Japanese more quickly than English.

2009/11/20

Google go

I installed Google go to CentOS on VMWare. I will use it.

2009/11/15

Google Go - Preparation

I tried installation into Cento OS 5.3 on VMWare.

Preparation

Easy Install, the Python Package Manager.

  1. # wget http://peak.telecommunity.com/dist/ez_setup.py
  2. # python ez_setup.py

Mercurial, the Versioning System

  1. # easy_install Mercurial

Although I use Subversion, Google Go language requires the Mercurial...

Vim on Linux

  • set tabstop=4
  • set vb t_vb=
  • set nobackup
  • set writebackup
  • noexpandtab
  • set autoindent

Suppress Beep on Linux

Configuration file is in the following on CentOS:
/etc/initrc

write or comment out the folowing:
set bell-style none

2009/11/05

Boost ProgramOptions Link Error

Boost Program-Options occurs link error on dynamic linking.

Its reason is here. (See also here and here)

The following is patched.

In file options_description.hpp, line 158: Replaced
static const unsigned m_default_line_length;
with
BOOST_STATIC_CONSTANT (unsigned, m_default_line_length = 80);

This is an old fix that I found in the mail archives (2005), seems to have been erroneously dropped from the base-line.

In file options_description.cpp: removed the declaration of m_default_line_length.

arg() is not fixed now, since I can use static version of Program-Options.

2009/10/30

SIGPIIPE occured.

On Linux, send service call of Socket occurs SIGPILE signal if a socket to use has broken when it sends any. Process which receive the signal is down instantly by default.

MSG_NOSIGNAL parameter of the send() can suppress the signal. In this case, the send returns EPIPE error instead of the SIGPIPE.

Or, signal service call can ignore the signal: signal(SIGPIPE, SIG_IGN); But, GDB catch the signal and break the process on debugging in this case.

On Windows, the MSG_NOSIGNAL is not provided.... I see, it may be caused as Windows seems to support signals just little.

2009/10/17

VS2005 Express for VS2008 Upgrade

Visual Studio (VS) have upgrade packages, which are more reasonable than regular package although the upgrade packages are special for old version or lower edition of VS series users only.

The old version of VS series contains VC++2005 Express edition (Ex), which Ex can use free. So, if you register the VC++2005 Ex, you can buy reasonable upgrade package of VS2008 Std; Otherwise, you must buy more expensive regular package.

See here

  • VC++2005 Ex -> VS2008 Std: OK
  • VC++2005 Ex -> VS2008 Pro: OK
  • VC++2008 Ex -> VS2008 Std: NG (not allowed)
  • VC++2008 Ex -> VS2008 Pro: OK

All edition of VS2005 can upgrade to any edition of VS2008. So, VS2008 Std can be upgraded from VS2005 Ex. But, VS9 Std cannot be upgraded from VC++2005 Ex, although VS2008 Pro or upper edition can be upgraded from any edition of VS2005 including the VC++2005 Ex.

Thus, if you want to buy VS2008, you'd better register VC++2005 before that. But, VC++2005 Ex has already not provided via main page of Visual Studio because current major version is not VC++2005 but VC++2008.

VS2005 Ex can be gain here today, 17 Oct 2009. This link would break someday. Maybe it would be when VS2010 or later version will be released.

Quotation Scrap

Visual Studio 2008 Standard Edition Upgrade package is for only the users licensed any edition of the following:

  • MSDN® Subscription(excluding MSDN Library Subscription)
  • Visual Studio® .NET Version 2002, 2003/Visual Studio 2005
  • Visual Basic® .NET Version 2002, 2003/Visual Basic 2005(including Express Edition)
  • Visual C++® .NET Version 2002, 2003/Visual C++ 2005(including Express Edition)
  • Visual C#® .NET Version 2002, 2003/Visual C# 2005(including Express Edition)
  • Visual J#® .NET Version 2003/Visual J# 2005(including Express Edition)
  • Visual Web Developer™ 2005 Express Edition
  • Visual SourceSafe® 6.0/2005
  • Visual Studio Tools for the Microsoft® Office System Version 2003/2005

Visual Studio 2008 Professional Edition Upgrade package is for only the users licensed any edition of the following:

  • MSDN® Subscription (excluding MSDN Library Subscription)
  • Visual Studio® .NET Version 2002, 2003/Visual Studio 2005, 2008
  • Visual Basic® .NET Version 2002, 2003/Visual Basic 2005, 2008 (including 2005, 2008 Express Edition)
  • Visual C++® .NET Version 2002, 2003/Visual C++ 2005, 2008 (including 2005, 2008 Express Edition)
  • Visual C#® .NET Version 2002, 2003/Visual C# 2005, 2008 (including 2005, 2008 Express Edition)
  • Visual J#® .NET Version 2003/Visual J# 2005 (including 2005 Express Edition)
  • Visual Web Developer™ 2005, 2008 Express Edition
  • Visual SourceSafe® 6.0/2005
  • Visual Studio Tools for the Microsoft® Office System Version 2003/2005

2009/10/11

OpenProj

I found OpenProj, which is a project management tool.

The tool is made by Java and can use data of Microsoft Project.

2009/09/24

Spirit memo - Debug support

Spirit supports to debug as following:

  1. Define BOOST_SPIRIT_DEBUG macro before including Spirit's headers.
  2. Use BOOST_SPIRIT_DEBUG_NODE() macro after rule definition in grammar constructor.

Then, Spirit dumps matching rule to console during parsing.

Spirit memo - new_

What such as boost::lambda::new_ptr()(args) is boost::phoenix::new_(args) in phoenix.

2009/09/07

Boost.Spirit 2.x (Qi, Karma, Lex)

I am fighting with the Boost.Spirit v2.x instead of Boost 1.8 (as Classic).

2009/08/16

MscGen

MscGen is a Message Sequence Chart Generator, which is supported by Doxygen.

Doxygen has @msc and @endmsc tags, and mscgen's code can be written between the tags.

Example is here:

/** Request a fandango on core.
 * Sending this signal to the Iberian dance task will cause it to create a
 * wild pointer which is then used to corrupt the malloc arena leading to
 * mysterious failures later on in the program execution.
 *
 *\msc
 *  T,"Iberian Dance Task";
 *
 *  T->"Iberian Dance Task" [label="IbFandangoReq", URL="\ref IbFandangoReq"];
 *  T<<"Iberian Dance Task" [label="IbFandangoCnf", URL="\ref IbFandangoCnf", ID="1"];
 *\endmsc
 *
 * 
    *
  1. In some cases, the system may have failed before this signal is sent * or received, in which case the confirm maybe lost. *
*/ typedef struct IbFandangoReqTag { TaskId reqTaskId; } IbFandangoReq;

Boost 1.40 Bata1

Beta1 version of Boost 1.40 is announced in Boost-developpers' ML.

2009/05/31

TRACE and CString of VC in UNICODE

Default TCHAR of VC2005 or later is UNICODE. CString template class also use UNICODE as CStringW by default. For example, TRACE(_T"%s"), _T("Foo"));

Bug on Various Arguments

TRACE and other printf-like function have varargs, which are not work implicit type conversion because these types are not known by the compiler. As conversion operator of CString works in other case, the fact that conversion is not work may be forgotten. This mismatch occurs undefined-behavior of C++. The below example is modified to the following; CString foo; TRACE(_T("%s"),static_cast(foo));

IO error on TRACE in Japanese with UNICODE

TRACE may fail to output Japanese by default. In this case, VC say "_CrtDbgReport: String too long or IO Error". Its solution is the following; #include
std::setlocale(LC_ALL, "Japanese");

2009/05/11

C2977 on MPL's List

Boost.Statechart uses Boost.Mpl's list. The list is limited to size by default, which yields the error C2977.

if the macro BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS and BOOST_MPL_LIMIT_MAP_SIZE as upper-limit number are defined, the error is resolved.

2009/05/10

Deserialization of Polymorphic Pointers does not work...

Deserialization of polymorphic pointers does not work...

Firstly, it is strange that BOOST_CLASS_EXPORT does not work, and seems no effects. text_iarchive throws unregistered class exception.

I understand that register_type is not necessary if I use the BOOST_CLASS_EXPORT; However, the register_type is called explicitly, the exception is not thrown. But, in the case with register_type, deserialized pointer's type is differ from its original object.

Boost.Serialization registers the entries at only first time and does not change those? Old version from Subversion, which has not refactered these derived classes, seem to work. Umm...

Memo on Visual C++ Debugger

I look for the following in MSDN sometimes:

_crtBreakAlloc
It is the global variable to set bugging break at memory leak position by VC debugger.
If crt is DLL(msvcrtd), use "{,,msvcr71d.dll}_crtBreakAlloc" instead of this.
err
It is the global variable of VC for debugging, which always hold the result of GetLastError.
hr
It means the value with the hr on VC's watch windows as HRESULT type .
wm
It means the value with the wm on VC's watch windows as WM_MESSAGE type.

2009/05/07

Boost.Asio.ip.tcp.Socket

I have rewritten from ip::tcp::iostream of Boost.Asio to ip::tcp::socket.
Although I am debugging it, the problem on blocking seems to resolve.

2009/05/06

GURPS 4th Basic Sets in PDF

I bought the Basic sets, Campaigns & Character, of GURPS 4th edition via e32 site of Steve Jackson Games.

I have owned hard-covered books of the basic sets. The books can be read more faster than pdf on display; However, the pdf can be searched, which is also useful.

Furthermore, pdf downloaded is more inexpensive than physical books import in Japan.

Um, how many rule books of GURPS 4th Ed, I have owned....

  • Basic set: Campaigns
  • Basic set: Characters
  • High-tech
  • Ultra-tech
  • Bio-tech
  • Supers
  • Powers
  • Fantacy
  • Magic
  • Thaumatology
  • Martial Arts
  • Spaceships

Boost 1.39

I have updated my development environment from Boost 1.37 to 1.39 in the other day.

It is mostly no problems. But, the headers of Boost.spirit is deprecated. Thus, I must check these shortly...

Boost.asio.ip.tcp.iostream may be half-duplex ?

I understood that ip::tcp::iostream of Boost.Asio can be realize for multi threading interactive server using multiple io_servives; However, it may not be true. In fact, I wrote the following, but ip::tcp::iostream::write is blocking during the stream is reading.

  • Main thread (cui thread) creates accepting thread
  • The accepting thread creates thread pool for io_service using boost::thread_group.
  • The accepting thread creates each communication agent on a thread when a new connection is accepted.
  • The agent thread is receiving to client's requests.
    Such behavior of client's request and its response is fine as I expect.
  • However, the server sends requests to clients in some cases. Then, the sending is blocking.

I will change from ip::tcp::iostream to asynchronous sockets of Boost.Asio...
Um, ASIO stads for Asynchronous I/O, which means answer ?

2009/05/05

Boost.Serialization with multi thread ... I/O?

text_oarchive constructor has not been completed while receiving of text_iarchive. Are the text_iarchive and text_oarchive sequential?

Official sample of Boost.Asio with Serialization uses stringstream as buffer...
Firstly, text_oarchive binds with ostringstream, and the result of ostringstream::str() is written to ip::tcp::iostream.
Text_iarchive and istringstream, too.

The following code has also not returned from iarchive's construction;

boost::asio::ip::tcp::iostream ios;
boost::archive::text_oarchive(ios);
boost::archive::text_iarchive(ios); // <- It never returns.

What am I wrong ? ... Usage of Boost.Asio ?

Memo on Boost Serialization & Asio

register_type() is required on building a polymorphic pointer from oarchive. In my situation, BOOST_CLASS_EXPORT and BOOST_CLASS_EXPORT_GUID are no effects. Why is unknown..

And, some typical bugs occur;

  • such polymorphic pointer requires virtual destructor.
  • Because the operator << of iostream deals string, zero value is not written.
These are easy mistake.

2009/04/30

Boost::asio requires _WIN32_WINDOWS > 0x0400

Compier errors on QueueUserAPC occur in Boost.asio with VC7.1.

The QueueUserAPC is declareted in winbase.h with #if guard. The API is suppoeted by _WIN32_WINDOWS over 0x0400.

2009/04/12

C++0x Working Draft (n2857) 2009.03.23

Studying Working Draft of C++0x (n2857), I am waiting for implementations based on the C++0x standard.

LNK2005 occurs on Boost with VC7.1

On compiling test.exe as release module, many errors like the following occur:

error LNK2005: "struct check_is_small_t::boost::check_is_small_t boost::test_tools::`anonymous namespace'::check_is_small"

These erors are not occur as debug mode.

I found the information on problem of Boost with VC7.1, here(Boost-users ML)

I followed the information. When I turned pre-compiled header option off, the errors are cleared.

2009/03/03

C1055 of VC7.1SP1

Boost.Threads occurs the fatal error, C1055 on VC7.1SP1. I found solution there.

Format of debug information changes from /ZI(for edit continue) to /Zi(with pdb).

How to set parameters to debugging program on Visual Studio 2019 with CMake

Solution: MSDN Sometimes the "Debug and Launch Settings for CMake" bottun is disabled. In this case, change to the target view. ...