lmi
[Top][All Lists]
Advanced

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

Re: [lmi] [PATCH] Add --gui_test_path command line option to the GUI tes


From: Vadim Zeitlin
Subject: Re: [lmi] [PATCH] Add --gui_test_path command line option to the GUI test.
Date: Tue, 3 Feb 2015 19:57:11 +0100

On Sun, 01 Feb 2015 16:32:43 +0000 Greg Chicares <address@hidden> wrote:

GC> On 02/01/2015 11:47 AM, Vadim Zeitlin wrote:
GC> > On Sat, 31 Jan 2015 23:42:09 +0000 Greg Chicares <address@hidden> wrote:
GC> > 
GC> > GC> Having just built lmi on debian, I figured this was the perfect time 
to
GC> > GC> return to this old email that I had marked for followup: I haven't put
GC> > GC> any of the proprietary test files here, so...
GC> > GC> 
GC> > GC> I've rebuilt wx, even though it's still using gtk+-2; this works fine:
GC> > GC> 
GC> > GC> /opt/lmi/build[0]$LD_LIBRARY_PATH=/usr/local/lib:/opt/lmi/local/lib 
./lmi_wx --ash_nazg
GC> > GC> 
GC> > GC> However, the GUI test doesn't work, presumably due to the special way
GC> > GC> it starts up (this is wx-3.1 git HEAD as of this morning, BTW):
GC> > GC> 
GC> > GC> /opt/lmi/build[0]$LD_LIBRARY_PATH=/usr/local/lib:/opt/lmi/local/lib 
./wx_test --ash_nazg
GC> > GC> 
GC> > GC> (process:5081): GLib-GObject-CRITICAL **: 
/tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gtype.c:2722: You forgot to 
call g_type_init()
GC> > ...
GC> > 
GC> >  I can confirm that I see this as well and it happens because the code
GC> > attempts to show a wxMessageBox before initializing GTK+. I clearly need 
to
GC> > fix this to avoid hanging/crashing in this case, but the trouble is that
GC> > it's not that obvious as there is no simple equivalent of
GC> > wxSafeShowMessage() in wxGTK.
GC> 
GC> Could we not do something like this in lmi at least?
GC> 
GC> #if defined wxGTK_or_whatever_the_macro_is
GC> void wxSafeShowMessage(char* s) {std::err << s << std::endl;}
GC> #endif // defined wxGTK_or_whatever_the_macro_is

 This is actually exactly what wxSafeShowMessage() itself does under
non-MSW platforms currently, so to achieve this behaviour it would be
enough to just wxSafeShowMessage() instead of warning() in
application_test::process_command_line().

 Thinking more about this, do we actually need to use any of warning(),
wxMessageBox() or wxSafeShowMessage() here? As this function deals with the
command line parsing, it seems reasonable to suppose that the program was
launched from some kind of a terminal and so perhaps we should just show
all output from it on standard output or error streams? Should I make the
(trivial) patch implementing this?

 Thanks,
VZ

reply via email to

[Prev in Thread] Current Thread [Next in Thread]