Debugger hung on dummy function
От | Heikki Linnakangas |
---|---|
Тема | Debugger hung on dummy function |
Дата | |
Msg-id | 49D62E84.60608@enterprisedb.com обсуждение исходный текст |
Ответы |
Re: Debugger hung on dummy function
(Dave Page <dpage@pgadmin.org>)
|
Список | pgadmin-hackers |
CREATE FUNCTION onelinefunc() RETURNS void AS $$ begin null; end; $$ LANGUAGE plpgsql; When I choose Debugging->debug on that function, pgAdmin hangs, consuming 100% of CPU. This is on latest svn version of pgAdmin, running on Debian linux with wxwidgets 2.8.10. The same doesn't happen if the function takes an argument: CREATE FUNCTION onelinefunc(i integer) RETURNS void AS $$ begin null; end; $$ LANGUAGE plpgsql; The same thing happens even if the function has more interesting contents, when I step to the end of the function. Attaching with gdb to the hung pgadmin process, I got a backtrace like this: #0 0xb698ae3d in IA__g_type_check_instance_cast (type_instance=0x8b12418, iface_type=145581776) at /build/buildd-glib2.0_2.20.0-2-i386-rcJiVy/glib2.0-2.20.0/gobject/gtype.c:372 #1 0xb775284c in wxWindow::DoSetSize (this=0x91d97d0, x=0, y=0, width=25, height=18, sizeFlags=<value optimized out>) at ../src/gtk/window.cpp:2754 #2 0xb7a06cdd in wxGrid::CalcWindowSizes (this=0x91d5ff0) at ../include/wx/window.h:225 #3 0xb7a12c1e in wxGrid::CalcDimensions (this=0x91d5ff0) at ../src/generic/grid.cpp:4653 #4 0xb7a12fc5 in wxGrid::OnSize (this=0x3) at ../src/generic/grid.cpp:6912 #5 0xb7475371 in wxAppConsole::HandleEvent (this=0x8a6d7f8, handler=0x91d5ff0, func=&virtual table offset 918020, event=@0xbfb54660) at ../src/common/appbase.cpp:320 #6 0xb7530dca in wxEvtHandler::ProcessEventIfMatches (entry=@0xb7a758d8, handler=0x91d5ff0, event=@0xbfb54660) at ../src/common/event.cpp:1225 #7 0xb75324c4 in wxEventHashTable::HandleEvent (this=0xb7a758a8, event=@0xbfb54660, self=0x91d5ff0) at ../src/common/event.cpp:898 #8 0xb7532616 in wxEvtHandler::ProcessEvent (this=0x91d5ff0, event=@0xbfb54660) at ../src/common/event.cpp:1287 #9 0xb753259c in wxEvtHandler::ProcessEvent (this=0x91d6338, event=@0xbfb54660) at ../src/common/event.cpp:1294 #10 0xb78a6b03 in wxScrollHelperEvtHandler::ProcessEvent (this=0x91d6338, event=@0xbfb54660) at ../src/generic/scrlwing.cpp:211 #11 0xb774a2fb in wxWindow::GTKProcessEvent (this=0x91d5ff0, event=@0xbfb54660) at ../src/gtk/window.cpp:1399 #12 0xb77507f7 in gtk_window_size_callback (alloc=0xbfb54a0c, win=0x91d5ff0) at ../src/gtk/window.cpp:2149 #13 0xb69798dc in IA__g_cclosure_marshal_VOID__BOXED (closure=0x91d72a8, return_value=0x0, n_param_values=2, param_values=0x91a2850, invocation_hint=0xbfb5484c, marshal_data=0xb77506d0) at /build/buildd-glib2.0_2.20.0-2-i386-rcJiVy/glib2.0-2.20.0/gobject/gmarshal.c:566 #14 0xb696cb6b in IA__g_closure_invoke (closure=0x91d72a8, return_value=0x0, n_param_values=2, param_values=0x91a2850, invocation_hint=0xbfb5484c) at /build/buildd-glib2.0_2.20.0-2-i386-rcJiVy/glib2.0-2.20.0/gobject/gclosure.c:767 #15 0xb6980ccf in signal_emit_unlocked_R (node=0x8a8e5c0, detail=0, instance=0x908e008, emission_return=0x0, instance_and_params=0x91a2850) at /build/buildd-glib2.0_2.20.0-2-i386-rcJiVy/glib2.0-2.20.0/gobject/gsignal.c:3244 #16 0xb6982159 in IA__g_signal_emit_valist (instance=0x908e008, signal_id=16, detail=0, var_args=0xbfb549f0 "\200�\b\t\001") at /build/buildd-glib2.0_2.20.0-2-i386-rcJiVy/glib2.0-2.20.0/gobject/gsignal.c:2977 #17 0xb69825b6 in IA__g_signal_emit (instance=0x908e008, signal_id=16, detail=0) ... I don't understand all the things that are going on, but this looks like some kind of a infinite resizing loop. Dunno what useful functionality this disables as a side-effect, but this patch fixes it for me: --- debugger/dlgDirectDbg.cpp (revision 7789) +++ debugger/dlgDirectDbg.cpp (working copy) @@ -295,7 +295,7 @@ font.SetStyle( wxFONTSTYLE_ITALIC ); grdParams->SetCellFont( 0, COL_NAME, font ); - grdParams->AutoSizeColumns(); + //grdParams->AutoSizeColumns(); activateDebugger(); } else -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com
В списке pgadmin-hackers по дате отправления:
Предыдущее
От: svn@pgadmin.orgДата:
Сообщение: SVN Commit by dpage: r7790 - trunk/pgadmin3/pgadmin/utils