Process hang in allocating memory for sample

2 posts / 0 new
Last post
frgo's picture
Offline
Last seen: 6 years 1 month ago
Joined: 12/28/2011
Posts: 20
Process hang in allocating memory for sample

Hi all,

I have a fairly complex data structure called "msg" (see attached IDL files, esp. pib_dds_msg.idl).  When running the following function I get a process hang (or, a very (!) long execution time - I gave up at 10 minutes ...):

<pre class="brush: C">

RTIBool test_pib_dds_msg_alloc( RTIBool allocate_pointers )

{

    RTIBool       is_ok               = RTI_TRUE;

    RTIBool       deallocate_pointers = PIB_FALSE;

    pib_dds_msg  *p_msg               = NULL;

    // Allocate memory

    p_msg  = pib_dds_msgPluginSupport_create_data_ex( allocate_pointers );

    if( p_msg == NULL )

      is_ok = RTI_FALSE;

    // Print data (just for checking if printing works

    // with allocated and non-allocated memory ...

    pib_dds_msgPluginSupport_print_data( p_msg, "MSG:", 0 );

    // Deallocate memory 

    deallocate_pointers = allocate_pointers;

    pib_dds_msgPluginSupport_destroy_data_ex( p_msg, deallocate_pointers );    

    return is_ok;

  }

</pre>

The process hangs in 

<pre class="brush: C">

pib_dds_msg_elementSeq_set_maximum(&sample->msg_elements,                                ((pib_dds_MSG_MAX_NR_MSG_ELEMENTS)))

</pre>

which is part of the autogenerated file pib_dds_msg.c, function pib_dds_msg_initialize_ex().

I am lost here - what am I doing wrong? Any help really appeciated.

Thanks in advance.

Regards

   Frank

 

 

 

frgo's picture
Offline
Last seen: 6 years 1 month ago
Joined: 12/28/2011
Posts: 20

Ok, newbie "error" - did not define string length of my wstrings. This creates a very, very, very ling running set of  ...initialize_ex() calls.

Problem is: My data model is like it is. What now?! I am posting this question in another message in this forum.

Regards

   Frank