I'm the only one running with a wx debug build?
ASSERT INFO:
./src/gtk/dcclient.cpp(2251): assert "Ok()" failed in
DoSetClippingRegion(): invalid window dc
BACKTRACE:
[1] DIALOG_PAGES_SETTINGS::UpdatePageLayoutExample()
[2] DIALOG_PAGES_SETTINGS::OnPaperSizeChoice(wxCommandEvent&)
[3] DIALOG_PAGES_SETTINGS::initDialog()
[4] DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS(EDA_DRAW_FRAME*)
[5] EDA_DRAW_FRAME::Process_PageSettings(wxCommandEvent&)
[6] wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&)
[7] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[8] wxEvtHandler::ProcessEvent(wxEvent&)
[9] EDA_BASE_FRAME::ProcessEvent(wxEvent&)
[10] wxEvtHandler::ProcessEvent(wxEvent&)
[11] wxWindowBase::TryParent(wxEvent&)
[12] wxAuiToolBar::OnLeftUp(wxMouseEvent&)
[13] wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&)
[14] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[15] wxEvtHandler::ProcessEvent(wxEvent&)
[16] g_closure_invoke()
[17] g_signal_emit_valist()
[18] g_signal_emit()
[19] gtk_propagate_event()
[20] gtk_main_do_event()
[21] g_main_context_dispatch()
[22] g_main_loop_run()
[23] gtk_main()
This seems to be caused by the page layout preview drawing code, which
sets the MemoryDC properties *before* attaching the bitmap to it.
The fix is trivial:
=== modified file 'common/dialogs/dialog_page_settings.cpp'
--- common/dialogs/dialog_page_settings.cpp 2012-05-27 05:24:33 +0000
+++ common/dialogs/dialog_page_settings.cpp 2012-07-11 06:51:37 +0000
@@ -636,8 +636,8 @@
// Prepare DC.
wxSize example_size( lyWidth, lyHeight );
wxMemoryDC memDC;
+ memDC.SelectObject( *m_page_bitmap );
memDC.SetClippingRegion( wxPoint( 0, 0 ), example_size );
- memDC.SelectObject( *m_page_bitmap );
memDC.Clear();
memDC.SetUserScale( scaleW, scaleH );