"BadName" run error about cross compiled gtk+ example on target



Title: Mail
Hi,gtk-devel-list,
 
In the environment of cross compiled GTK+Tinyx, gcc 3.3.4, there are run errors when both the
executive in the directory of gtk-2.10.3/examples/entry and my own example run on target of ARM
platform as the following:

[root@(none) tmp]# ./entry
The program 'entry' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadName'.
 (Details: serial 118 error_code 15 request_code 45 minor_code 0)
 (Note to programmers: normally, X errors are reported asynchronously;
 that is, you will receive the error a while after causing it.
 To debug your program, run it with the --sync command line
 option to change this behavior. You can then get a meaningful
 backtrace from your debugger if you break on the gdk_x_error() function.)

Before running the executive I open X server with the following command
[root@(none) tmp]# Xfbdev -fp /usr/share/fonts/75dpi/ -fn
-adobe-utopia-bold-i-normal--10-100-75-75-p-58-iso8859-1 -fc
-adobe-times-medium-i-normal--8-80-75-75-p-42-iso8859-1

Then we copied all directories and files in /usr/X11R6/lib/X11/fonts/ from x86 platform to the
directory of /usr/share/fonts of target, and copied /etc/fonts/fonts.conf, which includes
<dir>/usr/share/fonts</dir> statement, from x86 platform to target.

The example is as the following where the line of gtk_container_add (GTK_CONTAINER(window), entry);
would crash.

#include <gtk/gtk.h>
int main( int argc, char *argv[] )
{
  GtkWidget *window;
  GtkWidget *entry;
  gtk_init (&argc, &argv);
 
  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (gtk_main_quit), NULL);
  gtk_window_set_title (GTK_WINDOW(window), "Linphonec");
  gtk_widget_set_size_request (GTK_WIDGET(window), 240, 160);
  entry = gtk_entry_new ();
 
  gtk_container_add (GTK_CONTAINER(window), entry); //crash
 
  gtk_widget_show_all (window);
  gtk_main ();
 
  return 0;
}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]