title: I am getting my application killed randomly
body: <p>In my GTK+ application in C, the following error occurs randomly and my application gets killed:</p>
  
  <blockquote>
    <p><code>gtk_text_buffer_emit_insert: assertion 'g_utf8_validate (text, len, NULL)' failed</code></p>
  </blockquote>
  
  <p>Please help me if someone else also got the same issue and resolved it.</p>
  
  <p>Follow is an example of what I am doing ,
  `</p>
  
  <pre><code>char text[1024];
  int size = 0;
  
  sprintf(text+0,"Be Still &amp; Please Follow Instructions");
  size = strlen((char *)text)
  gtk_text_buffer_set_text (GTK_TEXT_BUFFER(text_buff),(char *)text,size);
  </code></pre>
  
  <p>`</p>