Operating System - OpenVMS
1756024 Members
3066 Online
108839 Solutions
New Discussion юеВ

DecWidows/Motif 1.5 wxWidgets Motif required

 
Wayne T Wiblin Jr.
New Member

DecWidows/Motif 1.5 wxWidgets Motif required

Hello,



I am working on a project with wxWidgets building it against DecWidows/Motif 1.5 which is required on OpenVMS 8.2. There here appears to be a bug in all of the following versions wxWidgets-2.6.4, 2.7.0 and 2.8.4

Please refer to the call in red : when initialization occurs we get a n access violation . Can you please help?



void wxDoChangeBackgroundColour(WXWidget widget, const wxColour& backgroundColour, bool changeArmColour)

{

wxComputeColours (XtDisplay((Widget) widget), & backgroundColour,

(wxColour*) NULL);



XtVaSetValues ((Widget) widget,

XmNbackground, g_itemColors[wxBACK_INDEX].pixel,

XmNtopShadowColor, g_itemColors[wxTOPS_INDEX].pixel,

XmNbottomShadowColor, g_itemColors[wxBOTS_INDEX].pixel,

XmNforeground, g_itemColors[wxFORE_INDEX].pixel,

NULL);



if (changeArmColour)

XtVaSetValues ((Widget) widget,

XmNarmColor, g_itemColors[wxSELE_INDEX].pixel,

NULL);

}



I checked the decw$xtlibshrr5.exe . It's R6 compliant and I am sure that all the other libraries I am linking against are correct.



Addition infomation:

$ find . -depth -print | xargs grep -i "wxComputeColours"

./motif/checkbox.cpp: wxComputeColours (XtDisplay((Widget) m_mainWidget), & m

_backgroundColour,

./motif/filedlg.cpp: wxComputeColours (dpy, & m_backgroundColour, (wxColour*)

NULL);

./motif/msgdlg.cpp: wxComputeColours (dpy, & m_backgroundColour, (wxColour*)

NULL);

./motif/utils.cpp: // by wxComputeColours?

./motif/utils.cpp: wxComputeColours (XtDisplay((Widget) widget), & background

Colour,

./motif/window.cpp:int wxComputeColours (Display *display, wxColour * back, wxCo

lour * fore)




Thanks,



Wayne

4 REPLIES 4
John Gillings
Honored Contributor

Re: DecWidows/Motif 1.5 wxWidgets Motif required

Wayne,

Please post the exact and complete ACCVIO message and traceback text - there's lots of info in there to help debug the problem. Your colours haven't worked, so I have no idea which one you think is causing trouble.
A crucible of informative mistakes
Wayne T Wiblin Jr.
New Member

Re: DecWidows/Motif 1.5 wxWidgets Motif required

Here is a stack dump from one of the samples with in wxWidget. We get same type of stack dump with our application and it's consistent for all three version of wxWidget using DECWindows/Motif. Also it is consistent with have a problem at runtime with DECW$XTLIBSHRR5 Library. This problem does not happen with GTK or X11 builds wxWidgets however we require the Motif build and in those builds we are not linking against the DECW$XTLIBSHRR5 library.


%SYSTEM-F-ACCVIO, access violation, reason mask=00, virtual address=00000000000 %TRACE-F-TRACEBACK, symbolic stack dump follows
image module routine line rel PC
abs PC
DECW$XTLIBSHRR5 0
00000000000668D4 FFFFFFFF80E928D4
CALENDAR utils wxDoChangeBackgroundColour
69015
0000000000003C54 000000000031B784
CALENDAR menu SetBackgroundColour 67828
0000000000004B98 00000000001B3C28
CALENDAR menu SetBackgroundColour 67920
00000000000051B0 00000000001B4240
CALENDAR menu CreateMenuBar 67613
0000000000004098 00000000001B3128
CALENDAR frame SetMenuBar 77169
0000000000003CBC 00000000001F8D1C
CALENDAR calendar MyFrame 51046
0000000000006E94 00000000001A6E94
CALENDAR calendar OnInit 50951
0000000000006088 00000000001A6088
CALENDAR calendar CallOnInit 39097
0000000000001E5C 00000000001A1E5C
CALENDAR init wxEntry 41942
0000000000001534 00000000003A81F4
CALENDAR calendar main 50937
0000000000005A6C 00000000001A5A6C
CALENDAR calendar __MAIN 0
00000000000000A0 00000000001A00A0
CALENDAR 0
0000000000455778 0000000000455778
PTHREAD$RTL 0
0000000000057188 FFFFFFFF80A51188
PTHREAD$RTL 0
0000000000030444 FFFFFFFF80A2A444
0
FFFFFFFF8033BF94 FFFFFFFF8033BF94

Wayne T Wiblin Jr.
New Member

Re: DecWidows/Motif 1.5 wxWidgets Motif required

Hello

We found a work around!

I have contacted the wxWidgets organization to look there source distributions

Versions 2.6.4, 2.7.0-1 and 2.8.4 of wxWidgets

Thanks you

Wayne T Wiblin Jr.

Information:

In src/motif/menu.cpp you comment out the following two lines from

SetBackgroundColor( ):

if (m_buttonWidget)

wxDoChangeBackgroudColuour(M_buttonWidget, (wxColour&) col, true);

And the following two lines form SetForegroundColour( ):

if (m_buttonWidget)

wxDoChangeBackgroudColuour(M_buttonWidget, (wxColour&) col);

It works! :-)

Wayne T Wiblin Jr.
New Member

Re: DecWidows/Motif 1.5 wxWidgets Motif required

Ok there is more info:

The problem is - calling
XtDisplay() with m_buttonWidget. If you follow the code, in the function wxDoChangeBackgroundColour() there is a call to
XtDisplay((Widget) widget) using the passed m_buttonWidget. Likewise in the function wxDoChangeForegroundColour(). The actual problem may exist well before the lines I commented out - perhaps in the contruction of m_buttonWidget. I guess I am failing to see where you mentioned any of this, or provided a small sample demonstrating the problem.


Thanks

Wayne