On 2016-01-05 14:13-0000 Phil Rosenberg wrote:

> Hi Alan
> After posting on the wx forum, I realised I had the full wx sourcecode
> (including wxGTK) on my system from their Git repo. A quick scan seems
> to have revealed the issue. Could you try the following test for me?
> In wxWidgets_dev.cpp on line 443, could you change wxBITMAP_SCREEN_DEPTH to 
> 24.
>
> I think the problem is that when creating the bitmap on Linux,
> wxWidgets tries to get the screen depth from the top level window,
> which doesn't exist in this case, whereas on Windows it creates a
> screen dc and uses this to get the depth. If the fix above works I'll
> report it as a wxWidgets bug.
>

Sorry, but that temporary fix did not work.  Here is the valgrind
result (in case you spot anything different from this change).

software@raven> valgrind examples/c/x00c -dev wxwidgets
==13810== Memcheck, a memory error detector
==13810== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==13810== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==13810== Command: examples/c/x00c -dev wxwidgets
==13810==

(process:13810): Gdk-CRITICAL **: IA__gdk_screen_get_width: assertion 
'GDK_IS_SCREEN (screen)' failed

(process:13810): Gdk-CRITICAL **: IA__gdk_screen_get_height: assertion 
'GDK_IS_SCREEN (screen)' failed

(process:13810): Gdk-CRITICAL **: IA__gdk_screen_get_width_mm: assertion 
'GDK_IS_SCREEN (screen)' failed

(process:13810): Gdk-CRITICAL **: IA__gdk_screen_get_height_mm: assertion 
'GDK_IS_SCREEN (screen)' failed

(process:13810): Gdk-CRITICAL **: IA__gdk_screen_get_width: assertion 
'GDK_IS_SCREEN (screen)' failed

(process:13810): Gdk-CRITICAL **: IA__gdk_screen_get_height: assertion 
'GDK_IS_SCREEN (screen)' failed

(process:13810): Gdk-CRITICAL **: IA__gdk_screen_get_width_mm: assertion 
'GDK_IS_SCREEN (screen)' failed

(process:13810): Gdk-CRITICAL **: IA__gdk_screen_get_height_mm: assertion 
'GDK_IS_SCREEN (screen)' failed

(process:13810): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(process:13810): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 
'G_TYPE_CHECK_INSTANCE (instance)' failed

(process:13810): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(process:13810): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 
'G_TYPE_CHECK_INSTANCE (instance)' failed

(process:13810): Gdk-CRITICAL **: IA__gdk_screen_get_default_colormap: 
assertion 'GDK_IS_SCREEN (screen)' failed

(process:13810): Gdk-CRITICAL **: IA__gdk_colormap_get_visual: assertion 
'GDK_IS_COLORMAP (colormap)' failed

(process:13810): Gdk-CRITICAL **: IA__gdk_screen_get_default_colormap: 
assertion 'GDK_IS_SCREEN (screen)' failed

(process:13810): Gdk-CRITICAL **: IA__gdk_screen_get_root_window: assertion 
'GDK_IS_SCREEN (screen)' failed

(process:13810): Gdk-CRITICAL **: IA__gdk_screen_get_root_window: assertion 
'GDK_IS_SCREEN (screen)' failed

(process:13810): Gdk-CRITICAL **: IA__gdk_window_new: assertion 'GDK_IS_WINDOW 
(parent)' failed
==13810== Invalid read of size 8
==13810==    at 0x90D0859: gdk_window_enable_synchronized_configure (in 
/usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0.2400.25)
==13810==    by 0x8C6E1DD: ??? (in 
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.25)
==13810==    by 0x9CB8473: ??? (in 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4200.1)
==13810==    by 0x9CD2086: g_signal_emit_valist (in 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4200.1)
==13810==    by 0x9CD29DE: g_signal_emit (in 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4200.1)
==13810==    by 0x8C62063: gtk_widget_realize (in 
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.25)
==13810==    by 0x7C5C0D9: ??? (in 
/usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.2.0)
==13810==    by 0x7C54469: wxNativeFontInfo::GetFamily() const (in 
/usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.2.0)
==13810==    by 0x7C85650: wxFont::wxFont(wxNativeFontInfo const&) (in 
/usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.2.0)
==13810==    by 0x7C93903: wxSystemSettingsNative::GetFont(wxSystemFont) (in 
/usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.2.0)
==13810==    by 0x7DEACE9: wxStockGDI::GetFont(wxStockGDI::Item) (in 
/usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.2.0)
==13810==    by 0x7C757E2: wxGTKDCImpl::wxGTKDCImpl(wxDC*) (in 
/usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.2.0)
==13810==  Address 0x18 is not stack'd, malloc'd or (recently) free'd
==13810== 
==13810== 
==13810== Process terminating with default action of signal 11 (SIGSEGV)
==13810==  Access not within mapped region at address 0x18
==13810==    at 0x90D0859: gdk_window_enable_synchronized_configure (in 
/usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0.2400.25)
==13810==    by 0x8C6E1DD: ??? (in 
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.25)
==13810==    by 0x9CB8473: ??? (in 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4200.1)
==13810==    by 0x9CD2086: g_signal_emit_valist (in 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4200.1)
==13810==    by 0x9CD29DE: g_signal_emit (in 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4200.1)
==13810==    by 0x8C62063: gtk_widget_realize (in 
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.25)
==13810==    by 0x7C5C0D9: ??? (in 
/usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.2.0)
==13810==    by 0x7C54469: wxNativeFontInfo::GetFamily() const (in 
/usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.2.0)
==13810==    by 0x7C85650: wxFont::wxFont(wxNativeFontInfo const&) (in 
/usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.2.0)
==13810==    by 0x7C93903: wxSystemSettingsNative::GetFont(wxSystemFont) (in 
/usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.2.0)
==13810==    by 0x7DEACE9: wxStockGDI::GetFont(wxStockGDI::Item) (in 
/usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.2.0)
==13810==    by 0x7C757E2: wxGTKDCImpl::wxGTKDCImpl(wxDC*) (in 
/usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.2.0)
==13810==  If you believe this happened as a result of a stack
==13810==  overflow in your program's main thread (unlikely but
==13810==  possible), you can try to increase the size of the
==13810==  main thread stack using the --main-stacksize= flag.
==13810==  The main thread stack size used in this run was 8388608.
==13810== 
==13810== HEAP SUMMARY:
==13810==     in use at exit: 430,557 bytes in 3,390 blocks
==13810==   total heap usage: 5,092 allocs, 1,702 frees, 1,206,877 bytes 
allocated
==13810== 
==13810== LEAK SUMMARY:
==13810==    definitely lost: 0 bytes in 0 blocks
==13810==    indirectly lost: 0 bytes in 0 blocks
==13810==      possibly lost: 42,408 bytes in 554 blocks
==13810==    still reachable: 373,069 bytes in 2,737 blocks
==13810==         suppressed: 0 bytes in 0 blocks
==13810== Rerun with --leak-check=full to see details of leaked memory
==13810== 
==13810== For counts of detected and suppressed errors, rerun with: -v
==13810== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Segmentation fault

One issue with your temporary fix on my system could be if the X server does not
actually have a color depth of 24.  But I double-checked that by
running the xwininfo command which gave "Depth: 24" both when
running on a thin client (X-terminal) with the local X server
interacting with desktop software running on a remote fast computer
OR when running the local X server on the same computer where
the desktop software is running.

Note the above segfault result was for the direct use of desktop
software, but I also got a segfault for the remote case as well.

I am perfectly happy to help out as much as possible by running tests
like this for you, but it is an inherently clumsy and slow process
(especially with the time zone difference between us which virtually
guarantees a day's delay between question and answer).  And there are
likely many more Linux tests you will want to run in the immediate
future as you gradually figure out the Linux idle issue(s).  And some
of the Linux issues I report to you may be because of some inadequacy
of my Debian jessie system.

So I suggest you would probably be much better served by taking the
time now to fix both your home Linux networking as well as getting
wxwidgets-3.0 built on the Linux box you have access to at work so
you have two Linux boxes where you can get essentially instant
feedback on your changes.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to