wxgtk problem

View: New views
4 Messages — Rating Filter:   Alert me  

wxgtk problem

by Guru Kathiresan-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,
I'm using the wx.NET's wx-c wrapper for a new language binding. The code works fine in windows, but when I compile and run the code in wxGTK (wx 2.8.8 in Ubuntu 8.01 ), the application crashes. When ever i call a window to be shown, the app crashes.

Any help with this is greatly appreciated.

The backtrace of the program is :

Starting program: /home/guru/Desktop/Src/demo1/demo1
[Thread debugging using libthread_db enabled]

(process:19409): GLib-CRITICAL **: g_path_get_basename: assertion `file_name != NULL' failed
[New Thread 0xb6c0a720 (LWP 19409)]

(process:19409): Gdk-CRITICAL **: gdk_window_set_title: assertion `title != NULL' failed

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb6c0a720 (LWP 19409)]
0xb6f71283 in strlen () from /lib/tls/i686/cmov/libc.so.6
(gdb) bt
#0  0xb6f71283 in strlen () from /lib/tls/i686/cmov/libc.so.6
#1  0xb7396da9 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#2  0xb7399608 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#3  0xb739c0ab in gdk_window_new () from /usr/lib/libgdk-x11-2.0.so.0
#4  0xb76482ea in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#5  0xb72acaff in g_cclosure_marshal_VOID__VOID ()
   from /usr/lib/libgobject-2.0.so.0
#6  0xb729e079 in ?? () from /usr/lib/libgobject-2.0.so.0
#7  0xb729f759 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#8  0xb72b3bcb in ?? () from /usr/lib/libgobject-2.0.so.0
#9  0xb72b5c1f in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#10 0xb72b5f69 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#11 0xb7637e4d in gtk_widget_realize () from /usr/lib/libgtk-x11-2.0.so.0
#12 0xb7648afc in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#13 0xb72acaff in g_cclosure_marshal_VOID__VOID ()
   from /usr/lib/libgobject-2.0.so.0
#14 0xb729e079 in ?? () from /usr/lib/libgobject-2.0.so.0
#15 0xb729f759 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#16 0xb72b3bcb in ?? () from /usr/lib/libgobject-2.0.so.0
#17 0xb72b5c1f in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#18 0xb72b5f69 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#19 0xb7638837 in gtk_widget_show () from /usr/lib/libgtk-x11-2.0.so.0
#20 0xb74857ad in gtk_dialog_run () from /usr/lib/libgtk-x11-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#21 0xb7be9230 in wxMessageDialog::ShowModal () from /usr/local/lib/libwx-c.so
#22 0xb7b780a0 in wxMessageBox () from /usr/local/lib/libwx-c.so
#23 0xb7a72b25 in wxGlobal_wxMessageBox () from /usr/local/lib/libwx-c.so
#24 0x080be476 in WXMESSAGEBOX (MSG=0x81dca3c "Test",
    CAPTION=0x81ec3 STYLE=0, WIN=0x0, X=-1, Y=-1)3c "Message",

_______________________________________________
wx-users mailing list
wx-users@...
http://lists.wxwidgets.org/mailman/listinfo/wx-users

Re: wxgtk problem

by Vadim Zeitlin-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, 8 Sep 2008 02:53:38 -0700 (PDT) Guru Kathiresan <gkathire@...> wrote:

GK> The backtrace of the program is :
GK>
GK> Starting program: /home/guru/Desktop/Src/demo1/demo1
GK> [Thread debugging using libthread_db enabled]
GK>
GK> (process:19409): GLib-CRITICAL **: g_path_get_basename: assertion `file_name != NULL' failed
GK> [New Thread 0xb6c0a720 (LWP 19409)]

 This seems to be the problem. Put a breakpoint on g_log when running under
gdb to see where this is called from.

GK> (process:19409): Gdk-CRITICAL **: gdk_window_set_title: assertion `title != NULL' failed

 And this is another problem... I don't know where do these NULLs come from
but it shouldn't be hard to discover it under the debugger.

 Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/


_______________________________________________
wx-users mailing list
wx-users@...
http://lists.wxwidgets.org/mailman/listinfo/wx-users

attachment0 (202 bytes) Download Attachment

RE: wxgtk problem

by Guru Kathiresan-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Vadim,
I'm just calling the wxMessageBox (to which I just pass a valid string) in
the App's OnInit function. Do I need to call any other functions in the
wxGTK before showing a window?  Please let me know.

-regards,
Guru

> -----Original Message-----
> From: wx-users-bounces@... [mailto:wx-users-
> bounces@...] On Behalf Of Vadim Zeitlin
> Sent: Monday, September 08, 2008 1:24 PM
> To: wx-users@...
> Subject: Re: wxgtk problem
>
> On Mon, 8 Sep 2008 02:53:38 -0700 (PDT) Guru Kathiresan
> <gkathire@...> wrote:
>
> GK> The backtrace of the program is :
> GK>
> GK> Starting program: /home/guru/Desktop/Src/demo1/demo1
> GK> [Thread debugging using libthread_db enabled]
> GK>
> GK> (process:19409): GLib-CRITICAL **: g_path_get_basename: assertion
> `file_name != NULL' failed
> GK> [New Thread 0xb6c0a720 (LWP 19409)]
>
>  This seems to be the problem. Put a breakpoint on g_log when running
> under
> gdb to see where this is called from.
>
> GK> (process:19409): Gdk-CRITICAL **: gdk_window_set_title: assertion
> `title != NULL' failed
>
>  And this is another problem... I don't know where do these NULLs come
> from
> but it shouldn't be hard to discover it under the debugger.
>
>  Regards,
> VZ
>
> --
> TT-Solutions: wxWidgets consultancy and technical support
>                http://www.tt-solutions.com/

_______________________________________________
wx-users mailing list
wx-users@...
http://lists.wxwidgets.org/mailman/listinfo/wx-users

Re[2]: wxgtk problem

by Vadim Zeitlin-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, 9 Sep 2008 02:05:00 -0700 Guru Kathiresan <gkathire@...> wrote:

GK> Hi Vadim,
GK> I'm just calling the wxMessageBox (to which I just pass a valid string) in
GK> the App's OnInit function. Do I need to call any other functions in the
GK> wxGTK before showing a window?  Please let me know.

 You do need to initialize it (e.g. wxInitialize or create a wxApp). In any
case, even if you don't pass it a NULL string it does get passed from
somewhere and breaking on g_log in debugger as I wrote should allow you to
see where does this happen.

 Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/


_______________________________________________
wx-users mailing list
wx-users@...
http://lists.wxwidgets.org/mailman/listinfo/wx-users

attachment0 (202 bytes) Download Attachment
LightInTheBox - Buy quality products at wholesale price!