Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 186611 Details for
Bug 277381
SEGV error moving mouse over window related to XmToolTipGetLabel
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Explanation of process to duplicate as well as possible fix code.
OpenMotif 2.3 tooltip Error.txt (text/plain), 3.92 KB, created by
Steve Hild
on 2007-09-04 20:53:33 UTC
(
hide
)
Description:
Explanation of process to duplicate as well as possible fix code.
Filename:
MIME Type:
Creator:
Steve Hild
Created:
2007-09-04 20:53:33 UTC
Size:
3.92 KB
patch
obsolete
>Our application has a menu that has a selection which creates a new window with a close decoration. >User can move mouse over window. >User closes window using close button. > > >Basic steps on how our application Creates window: >--------------------------------------------------------------------------------------------------- >1. mytop = XtAppCreateShell NULL, Name, topLevelShellWidgetClass, DISPLAY, args, n); > where args set that the shells args are > XmNmwmInputMode = MWM_INPUT_MODELESS > XmNmwmFunctions = MWM_FUNC_MOVE, MWM_FUNC_RESIZE | MWM_FUNC_MAXIMIZE, MWM_FUNC_CLOSE > XmNmwmDecorations = MWM_DECOR_BORDER, MWM_DECOR_TITLE, MWM_DECOR_MENU, > (This calls InitializePrehook which checks to see if the XmQTtoolTipConfig trait is available for the widget and if not it is allocated and set into the TraitSet. Label is NULL.) > >2. xw = XmCreateMainWindow(mytop, title, args, n); >3. client = XmCreateDrawingArea(xw, "client", args, n); >4. gadget = XmCreateLabelGadget(client, "", args, n); >5. XtManageChild(gadget); >6. XtManageChild(client); >7. XtManageChild(xw); >8. XtRealizeWidget(mytop); > >Move mouse over window. >-------------------------------------------------------------------------- >ToolTipGetData is called which finds the top parent which happens to be mytop. >It then gets the XmQTtoolTipConfig trait for mytop, since mytops ToolTipConfig trait doesnt have a label yet it creates a Shell widget associated to mytop and then a label associated to the shell and the label pointer is saved in the trait. > >Destroying window: >---------------------------------------------------------------------------------- >1. XtUnmapWidget(mytop); >2. XtDestroyWidget(mytop); >Everything gets freed and destroyed associated to mytop, including the tooltip label and its shell that was saved in the tooltip trait. The label attribute of the ToolTipConfig trait is not NULLed or removed. > >Open a subsequent window that causes SEGV >------------------------------------------------------------------------------- >The new top Widget handle from the XtAppCreateShell call happens to be the same as mytop from above. >Move cursor over window. >ToolTipGetData gets called. > First it looks for tooltip Trait for the top widget. Finds one and then pass trait back to calling routine which attempts to access the label value which isnt valid and causes a SEGV error. > > >Updated lib/Xm/Primitive.c >------------------------------------------------------------------------ > >Added the following includes to get ToolTip info. >------------------------------------------------------------------------ >#include <Xm/ToolTipCT.h> > >#include "ToolTipI.h" >#include "TraitI.h" > > >This is updated Destroy function >----------------------------------------------------------------------- >/************************************************************************ > * > * Destroy > * Clean up allocated resources when the widget is destroyed. > * > ************************************************************************/ >static void >Destroy( > Widget w ) >{ > XmPrimitiveWidget pw = (XmPrimitiveWidget) w ; > Widget tiplabel; > > _XmNavigDestroy(w); > > _XmToolTipLeave(w, NULL, NULL, NULL); > > /* Get the tool tip label associated to this widget. */ > tiplabel = XmToolTipGetLabel(w); > > /* If this is the tool tip label then we need to clean up the > ** label setting for the XmToolTipConfig Trait associated to this widget. */ > if (tiplabel == w) > { > Widget top = w; > XmToolTipConfigTrait ttp; > > while (XtParent (top)) > { > top = XtParent (top); > } > > ttp = (XmToolTipConfigTrait) XmeTraitGet (top, XmQTtoolTipConfig); > > if (ttp->label != NULL) > ttp->label = NULL; > > } > XtReleaseGC( w, pw->primitive.top_shadow_GC); > XtReleaseGC( w, pw->primitive.bottom_shadow_GC); > XtReleaseGC( w, pw->primitive.highlight_GC); > >} > > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 277381
: 186611 |
284181