[Ace-users] Broken ACE_DEBUG messages when using TAO compiled with ACE_USES_WCHAR

Karl-Heinz wind at itq.de
Wed Nov 7 03:29:33 CST 2007


    ACE VERSION: 5.5.8

    HOST MACHINE and OPERATING SYSTEM:
        PC, Windows XP, VC8

    TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
    COMPILER NAME AND VERSION (AND PATCHLEVEL):

    THE $ACE_ROOT/ace/config.h FILE: config-win32.h, ACE_USES_WCHAR,
    _USE_32BIT_TIME_T 1

    THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE:

    CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/
default.features
    (used by MPC when you generate your own makefiles): MFC=0

    AREA/CLASS/EXAMPLE AFFECTED:
    TAO/IIOP_Connector, TAO/IIOP_Connection_Handler, ACE_INET_Addr

    DOES THE PROBLEM AFFECT:
        COMPILATION? no
        LINKING? no
        EXECUTION? no
        OTHER (please specify)? unreadable trace output

    SYNOPSIS:
    ACE_DEBUG messages contain unreadable information (e.g.
hostaddress)

    DESCRIPTION:
    When compiling TAO with ACE_USES_WCHAR some ACE_DEBUG messages
contain
    unreadable information:

    TAO (3488|4020) Loaded default protocol <??????>
    TAO (3488|4020) created new ORB <>
    TAO (3488|4020) - Transport_Cache_Manager::fill_set_i,
current_size = 0, cache_maximum = 512
    TAO (3488|4020) - IIOP_Connector::begin_connection, to
<127.0.0.1:12345> which should block
    TAO (3488|4020) - IIOP_Connection_Handler::open, The local addr is
<????1?8??????????
:1309>
    TAO (3488|4020) - IIOP_Connection_Handler::open, IIOP connection
to peer <127.0.0.1:12345> on 36940
    TAO (3488|4020) - IIOP_Connector::make_connection, new connected
connection to <127.0.0.1:12345> on Transport[36940]

    Explanation: sometimes a character pointer (const char*) is passed
to the
    ACE_DEBUG macro which expects const wchar_t*.


    REPEAT BY:
    Compiler using ACE_USES_WCHAR, TAO_debug_level=10, run ORB, watch
output

    SAMPLE FIX/WORKAROUND:
    1. ACE_INET_Addr should support ACE_TEXT instead of const char
    2. Use ACE_INET_Addr::addr_to_string to convert string before
passing it to ACE_DEBUG


Hi,
I get broken debug messages in my output window when running TAO (see
above). The problem arises when
TAO is compiled with option ACE_USES_WCHAR. Is it possible that
ACE_DEBUG crashes my system when
searching for the wchar-string end (00 00)... I fear that this could
lead to unpredictable access violations.
Best regards
Karl-Heinz Wind



More information about the Ace-users mailing list