Обсуждение: Error: cannot mix different types of client data

Поиск
Список
Период
Сортировка

Error: cannot mix different types of client data

От
Colin Beckingham
Дата:
Houston, we have a problem.
Using 1.15 dev latest pull from git.

Steps:
1. connect to postgresql server
2. select a database but the wrong one (deliberate misstep)
3. open query builder and enter an sql statement referring to another db
4. error, no relation 'xxxx' exists, ok
5. QB menu bar offers dropdown which contains name of currently 
connected db and 'new connection'
6. select 'new connection', dialog box appears
7. database list offers the db you really need, select it
8. OK, crash.

If this is a contextually illegal request, probably best that the user 
is prevented from hitting the error.

Workaround is easy, select the right db to begin with.

======================

ASSERT INFO:
./include/wx/ctrlsub.h(180): assert "GetClientDataType() != 
wxClientData_Void" failed in InsertItems(): can't mix different types of 
client data

BACKTRACE:
[1] wxOnAssert(char const*, int, char const*, char const*, wchar_t const*)
[2] wxBitmapComboBox::Insert(wxString const&, wxBitmap const&, unsigned 
int, wxClientData*)
[3] frmQuery::OnChangeConnection(wxCommandEvent&)
[4] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, 
wxEvent&) cons)
[5] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, 
wxEvtHandler*, wxEvent&)
[6] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[7] wxEvtHandler::DoTryChain(wxEvent&)
[8] wxEvtHandler::ProcessEvent(wxEvent&)
[9] wxWindowBase::TryAfter(wxEvent&)
[10] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[11] wxChoice::SendSelectionChangedEvent(int)
[12] g_closure_invoke()
[13] g_signal_emit_valist()
[14] g_signal_emit()
[15] gtk_combo_box_set_active_iter()
[16] g_closure_invoke()
[17] g_signal_emit_valist()
[18] g_signal_emit()
[19] gtk_widget_activate()
[20] gtk_menu_shell_activate_item()
[21] g_closure_invoke()
[22] g_signal_emit_valist()
[23] g_signal_emit()
[24] gtk_propagate_event()
[25] gtk_main_do_event()
[26] g_main_context_dispatch()
[27] g_main_loop_run()
[28] gtk_main()



-- 
---
Colin Beckingham
613-454-5369
http://www.it4gh.com


Re: Error: cannot mix different types of client data

От
Guillaume Lelarge
Дата:
On Wed, 2012-03-07 at 07:07 -0500, Colin Beckingham wrote:
> Houston, we have a problem.
> Using 1.15 dev latest pull from git.
> 
> Steps:
> 1. connect to postgresql server
> 2. select a database but the wrong one (deliberate misstep)
> 3. open query builder and enter an sql statement referring to another db
> 4. error, no relation 'xxxx' exists, ok
> 5. QB menu bar offers dropdown which contains name of currently 
> connected db and 'new connection'
> 6. select 'new connection', dialog box appears
> 7. database list offers the db you really need, select it
> 8. OK, crash.
> 

Thanks for the report, it should be fixed now.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com



Re: Error: cannot mix different types of client data

От
Colin Beckingham
Дата:
On 03/07/2012 09:10 AM, Guillaume Lelarge wrote:
> On Wed, 2012-03-07 at 07:07 -0500, Colin Beckingham wrote:
>> Houston, we have a problem.
>> Using 1.15 dev latest pull from git.
>>
>> Steps:
>> 1. connect to postgresql server
>> 2. select a database but the wrong one (deliberate misstep)
>> 3. open query builder and enter an sql statement referring to another db
>> 4. error, no relation 'xxxx' exists, ok
>> 5. QB menu bar offers dropdown which contains name of currently
>> connected db and 'new connection'
>> 6. select 'new connection', dialog box appears
>> 7. database list offers the db you really need, select it
>> 8. OK, crash.
>>
>
> Thanks for the report, it should be fixed now.
>
>

Immediate problem has gone, thankyou.

If I am deliberately obstructive and leave the QB open with its two db 
connections, then go back to the main pgadmin3 screen and disconnect the 
database I just connected in QB, database in QB remains connected and 
operational. Is this a contradiction that can lead to issues?

-- 
---
Colin Beckingham
613-454-5369
http://www.it4gh.com


Re: Error: cannot mix different types of client data

От
Guillaume Lelarge
Дата:
On Wed, 2012-03-07 at 09:28 -0500, Colin Beckingham wrote:
> On 03/07/2012 09:10 AM, Guillaume Lelarge wrote:
> > On Wed, 2012-03-07 at 07:07 -0500, Colin Beckingham wrote:
> >> Houston, we have a problem.
> >> Using 1.15 dev latest pull from git.
> >>
> >> Steps:
> >> 1. connect to postgresql server
> >> 2. select a database but the wrong one (deliberate misstep)
> >> 3. open query builder and enter an sql statement referring to another db
> >> 4. error, no relation 'xxxx' exists, ok
> >> 5. QB menu bar offers dropdown which contains name of currently
> >> connected db and 'new connection'
> >> 6. select 'new connection', dialog box appears
> >> 7. database list offers the db you really need, select it
> >> 8. OK, crash.
> >>
> >
> > Thanks for the report, it should be fixed now.
> >
> >
> 
> Immediate problem has gone, thankyou.
> 
> If I am deliberately obstructive and leave the QB open with its two db 
> connections, then go back to the main pgadmin3 screen and disconnect the 
> database I just connected in QB, database in QB remains connected and 
> operational. Is this a contradiction that can lead to issues?
> 

No, it's the standard behaviour. When you launched the query tool, the
browser connection is cloned, so that the query tool and the browser
have different connections. It's really difficult to share a connection
because you cannot execute two different queries on the same connection
at the same time. And sharing connections can bring quite a lot of
issues.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com