Critical error when trying to retrieve text value of GTKEntry
<p>I'm learning the basics of GTK for a school project and I am trying to create a basic program which prints the value of a text entry as it is changed. Whilst I am getting an output of some kind, it is a critical error which says :</p>

<pre><code>Gtk-CRITICAL **: gtk_entry_get_text: assertion 'GTK_IS_ENTRY (entry)' failed
The text is : (null)
</code></pre>

<p>My code is as follows :</p>

<pre><code>#include&lt;gtk/gtk.h&gt;
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;string.h&gt;
#include "salesbase.h"
#include &lt;sqlite3.h&gt;
#include &lt;unistd.h&gt;

static void change_text(GtkWidget *widget, GtkEntry *data){
    const char* output = gtk_entry_get_text(data);
    printf("The text is : %s\n", output);
}

int main(int argc, char *argv[]){
    GtkBuilder *builder;
    gtk_init(&amp;argc, &amp;argv);
    GObject *window;
    GtkEntry *input;

    builder = gtk_builder_new();
    gtk_builder_add_from_file(builder, "ui/main.ui", NULL);

    window = gtk_builder_get_object(builder, "mainwindow");
    g_signal_connect (window, "destroy", G_CALLBACK(gtk_main_quit), NULL);
    input = GTK_ENTRY(gtk_builder_get_object(builder, "test_entry"));
    g_signal_connect(input, "changed", G_CALLBACK(change_text), &amp;input);



    gtk_main();

    return 0;
}
</code></pre>