Thread: two small bugs in the query tool

two small bugs in the query tool

From
Ian Barwick
Date:
on a build from CVS HEAD on SUSE 9.1, LANG=en_US.UTF-8

- when starting the query tool with an empty sheet, then immediately
exiting via the file menu (without having entered any text, so the
"Do you want to save changes?" dialogue is not triggered) sometimes
I get segfaults, though I can't always reproduced them.

- when starting the query tool with an empty sheet and entering
non-ASCII characters
(such as German umlaut letters, e.g. 'ä') the following message pops up:  src/common/string.cpp(1060): assert "nLen !=
(size_t)-,1"failed. Do you want to stop the program? 

Selecting no or cancel doesn't seem to cause any problems.


Ian Barwick


Re: two small bugs in the query tool

From
Andreas Pflug
Date:
Ian Barwick wrote:
> on a build from CVS HEAD on SUSE 9.1, LANG=en_US.UTF-8
> 
> - when starting the query tool with an empty sheet, then immediately
> exiting via the file menu (without having entered any text, so the
> "Do you want to save changes?" dialogue is not triggered) sometimes 
> I get segfaults, though I can't always reproduced them.

I can't reproduce this. Please provide a stack trace if you can.

> - when starting the query tool with an empty sheet and entering
> non-ASCII characters
> (such as German umlaut letters, e.g. 'ä') the following message pops up:
>   
>   src/common/string.cpp(1060): assert "nLen != (size_t)-,1" failed.

This is a wx problem; Thanks for reporting. A patch (1072408) is posted 
upstream.
To avoid the problem, you can compile without debugging. Alternatively, 
you may safely ignore the message.

Regards,
Andreas


Re: two small bugs in the query tool

From
Ian Barwick
Date:
On Wed, 24 Nov 2004 12:24:38 +0000, Andreas Pflug
<pgadmin@pse-consulting.de> wrote:
> Ian Barwick wrote:
> > on a build from CVS HEAD on SUSE 9.1, LANG=en_US.UTF-8
> >
> > - when starting the query tool with an empty sheet, then immediately
> > exiting via the file menu (without having entered any text, so the
> > "Do you want to save changes?" dialogue is not triggered) sometimes
> > I get segfaults, though I can't always reproduced them.
> 
> I can't reproduce this. Please provide a stack trace if you can.

Hmm, seems to have gone away. I presume something in my local
environment is / was screwed up, but I'll keep an eye out for it.

Ian Barwick


Re: two small bugs in the query tool

From
Ian Barwick
Date:
On Wed, 24 Nov 2004 22:16:21 +0100, Ian Barwick <barwick@gmail.com> wrote:
> On Wed, 24 Nov 2004 12:24:38 +0000, Andreas Pflug
> <pgadmin@pse-consulting.de> wrote:
> > Ian Barwick wrote:
> > > on a build from CVS HEAD on SUSE 9.1, LANG=en_US.UTF-8
> > >
> > > - when starting the query tool with an empty sheet, then immediately
> > > exiting via the file menu (without having entered any text, so the
> > > "Do you want to save changes?" dialogue is not triggered) sometimes
> > > I get segfaults, though I can't always reproduced them.
> >
> > I can't reproduce this. Please provide a stack trace if you can.
> 
> Hmm, seems to have gone away. I presume something in my local
> environment is / was screwed up, but I'll keep an eye out for it.

Another day, another computer: SUSE 9.0, wxWidgets 2.5.3, pgAdmin CVS
HEAD; I can reproduce the problem there too. It's _very_ sporadic. A
stack trace is appended.

Ian Barwick


Thread 1 (Thread 16384 (LWP 2413)):
#0  0x00000069 in ?? ()
#1  0x0826945d in frmQuery::OnActivate(wxActivateEvent&) (this=0x8c40550,   event=@0xbfffece0) at ui/frmQuery.cpp:259
#2  0x0855ac46 in wxAppConsole::HandleEvent(wxEvtHandler*, void
(wxEvtHandler::*)(wxEvent&), wxEvent&) const (this=0x89172e8,
handler=0x8c40550, func=     {__pfn = 0x8269438 <frmQuery::OnActivate(wxActivateEvent&)>,
__delta = 0}, event=@0xbfffece0) at src/common/appbase.cpp:305
#3  0x085d9d5a in
wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&) (entry=@0x88df4d8, handler=0x8c40550,   event=@0xbfffece0) at src/common/event.cpp:1169
#4  0x085d8e19 in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) (   this=0x88df2c0, event=@0xbfffece0,
self=0x8c40550)  at src/common/event.cpp:837
 
#5  0x085d9f45 in wxEvtHandler::ProcessEvent(wxEvent&) (this=0x8c40550,   event=@0xbfffece0) at
src/common/event.cpp:1231
#6  0x0843cb8d in gtk_frame_focus_in_callback (widget=0x8c40118, win=0x8c40550)   at src/gtk/toplevel.cpp:113
#7  0x40253492 in gtk_propagate_event ()  from /opt/gnome/lib/libgtk-x11-2.0.so.0
#8  0x404ffe6b in g_closure_invoke () from /opt/gnome/lib/libgobject-2.0.so.0
#9  0x405125ce in signal_emit_unlocked_R ()  from /opt/gnome/lib/libgobject-2.0.so.0
#10 0x40511799 in g_signal_emit_valist ()  from /opt/gnome/lib/libgobject-2.0.so.0
#11 0x40511b22 in g_signal_emit () from /opt/gnome/lib/libgobject-2.0.so.0
#12 0x40338779 in gtk_widget_send_expose ()  from /opt/gnome/lib/libgtk-x11-2.0.so.0
#13 0x40252017 in gtk_main_do_event () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#14 0x4040fcf1 in gdk_add_client_message_filter ()  from /opt/gnome/lib/libgdk-x11-2.0.so.0
#15 0x40555148 in g_main_dispatch () from /opt/gnome/lib/libglib-2.0.so.0
#16 0x405561a8 in g_main_context_dispatch ()  from /opt/gnome/lib/libglib-2.0.so.0
#17 0x405565a8 in g_main_context_iterate ()  from /opt/gnome/lib/libglib-2.0.so.0
#18 0x40556bf7 in g_main_loop_run () from /opt/gnome/lib/libglib-2.0.so.0
#19 0x402516ff in gtk_main () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#20 0x08537392 in wxEventLoop::Run() (this=0x896f450) at src/gtk/evtloop.cpp:83
#21 0x084a5c32 in wxAppBase::MainLoop() (this=0x89172e8)   at src/common/appcmn.cpp:272
#22 0x084a5d7b in wxAppBase::OnRun() (this=0x89172e8)   at src/common/appcmn.cpp:340
#23 0x085938f0 in wxEntry(int&, wchar_t**) (argc=@0xbffff470, argv=0x890d110)   at src/common/init.cpp:410


Re: two small bugs in the query tool

From
Andreas Pflug
Date:
Ian Barwick wrote:

>>>>- when starting the query tool with an empty sheet, then immediately
>>>>exiting via the file menu (without having entered any text, so the
>>>>"Do you want to save changes?" dialogue is not triggered) sometimes
>>>>I get segfaults, though I can't always reproduced them.
> 
> #0  0x00000069 in ?? ()
> #1  0x0826945d in frmQuery::OnActivate(wxActivateEvent&) (this=0x8c40550,
>     event=@0xbfffece0) at ui/frmQuery.cpp:259
> #2  0x0855ac46 in wxAppConsole::HandleEvent(wxEvtHandler*, void
> (wxEvtHandler::*)(wxEvent&), wxEvent&) const (this=0x89172e8,
> handler=0x8c40550, func=
>       {__pfn = 0x8269438 <frmQuery::OnActivate(wxActivateEvent&)>,
> __delta = 0}, event=@0xbfffece0) at src/common/appbase.cpp:305

This looks like a corrupted stack or so to me. frmQuery.cpp:259 is just 
a call to updateMenu(), which does very simple stuff.
You could try other gtk versions, other gcc versions/options, ...
Summarized: I don't have a good hint for you.

Regards,
Andreas