[wx-dev] SetShape from trunk crashes under Leopard,
was Re: [wx-dev] wxMac: URefCon not defined
Steven Van Ingelgem
steven at vaningelgem.be
Tue Feb 12 02:43:49 PST 2008
Maybe it's just an idea, but maybe you should call the SetShape like
in GTK (from CreateWindow event)?
On 12/02/2008, Stefan Csomor <csomor at advancedconcepts.ch> wrote:
> Hi Steven
>
> with you patch I crash as well, so everything is fine, reproducible, I'm out
> hunting ...
>
> Best,
>
> stefan
>
>
> On 2/12/08 10:47 AM, "Steven Van Ingelgem" <steven at vaningelgem.be> wrote:
>
> > I installed the newest update (10.5.2) from the Software Update menu,
> > but that didn't seem to help (at least not for my program). The shaped
> > sample compiles & runs fine now (I can start it and it doesn't crash,
> > but I'm working via SSH, so I can't see if it runs ok of course :) -
> > I'll see tonight when I get home).
> >
> > $ xcodeindex -version
> > Component versions: DevToolsCore-921.0; DevToolsSupport-893.0
> >
> > $ xcode-select -version
> > xcode-select version 895.
> >
> > $ xcodebuild -version
> > Component versions: DevToolsCore-921.0; DevToolsSupport-893.0
> >
> >
> >
> > As for the crash: please check the backtrace. There you see it still
> > crashes in the SetShape() call.
> >
> >
> > Index: shaped.cpp
> > ===================================================================
> > --- shaped.cpp (revision 51732)
> > +++ shaped.cpp (working copy)
> > @@ -256,6 +256,8 @@
> > SetMenuBar(mbar);
> >
> > Show();
> > + ShapedFrame *shapedFrame = new ShapedFrame(this);
> > + shapedFrame->Show(true);
> > }
> >
> > void MainFrame::OnShowShaped(wxCommandEvent& WXUNUSED(event))
> >
> >
> > This should immediately show the shaped window, but it also crashes:
> >
> > (gdb) bt
> > #0 0x93f5d9d3 in OffsetRgn ()
> > #1 0x0007fa7b in wxShapedMacWindowStructureRegion (window=0x84a370,
> > rgn=0x758490) at
> > /Users/steven/wxWidgets/src/mac/carbon/toplevel.cpp:1872
> > #2 0x0007fadb in wxShapedMacWindowGetRegion (window=0x84a370,
> > param=-1073746262) at
> > /Users/steven/wxWidgets/src/mac/carbon/toplevel.cpp:1887
> > #3 0x0007fbf0 in wxShapedMacWindowDef (window=0x84a370, message=8,
> > param=-1073746262) at
> > /Users/steven/wxWidgets/src/mac/carbon/toplevel.cpp:1936
> > #4 0x91faee10 in DispatchToWDEF ()
> > #5 0x91faecbb in ClassicWDEFAdapter::EventHandler ()
> > #6 0x91e2bfc3 in DispatchEventToHandlers ()
> > #7 0x91e2b3fd in SendEventToEventTargetInternal ()
> > #8 0x91e2b262 in SendEventToEventTargetWithOptions ()
> > #9 0x91e4336b in CopyWindowDefinitionShapeMutable ()
> > #10 0x91e43058 in FetchRegions ()
> > #11 0x91e428cd in CalculateWindowRegions ()
> > #12 0x920f26c7 in WindowData::ReshapeAndPaint ()
> > #13 0x91fb49b4 in ReshapeCustomWindow ()
> > #14 0x0007f8ee in wxTopLevelWindowMac::SetShape (this=0x1038e00,
> > region=@0xbffff5a0) at
> > /Users/steven/wxWidgets/src/mac/carbon/toplevel.cpp:1803
> > #15 0x000828b0 in wxTopLevelWindowMac::DoMacCreateRealWindow
> > (this=0x1038e00, parent=0x101ee00, title=@0xbffff730, pos=@0x440688,
> > size=@0xbffff728, style=33587218, name=@0xbffff718) at
> > /Users/steven/wxWidgets/src/mac/carbon/toplevel.cpp:1260
> > #16 0x00082a4d in wxTopLevelWindowMac::Create (this=0x1038e00,
> > parent=0x101ee00, id=-1, title=@0xbffff730, pos=@0x440688,
> > size=@0xbffff728, style=33587218, name=@0xbffff718) at
> > /Users/steven/wxWidgets/src/mac/carbon/toplevel.cpp:889
> > #17 0x0003b309 in wxFrame::Create (this=0x1038e00, parent=0x101ee00,
> > id=-1, title=@0xbffff730, pos=@0x440688, size=@0xbffff728,
> > style=33587218, name=@0xbffff718) at
> > /Users/steven/wxWidgets/src/mac/carbon/frame.cpp:61
> > #18 0x00005fb2 in wxFrame::wxFrame (this=0x1038e00, parent=0x101ee00,
> > id=-1, title=@0xbffff730, pos=@0x440688, size=@0xbffff728,
> > style=33587218, name=@0xbffff718) at frame.h:41
> > #19 0x00003975 in ShapedFrame::ShapedFrame (this=0x1038e00,
> > parent=0x101ee00) at
> > /Users/steven/wxWidgets/samples/shaped/shaped.cpp:315
> > #20 0x00003b8a in ShapedFrame::ShapedFrame (this=0x1038e00,
> > parent=0x101ee00) at
> > /Users/steven/wxWidgets/samples/shaped/shaped.cpp:329
> > #21 0x000043fa in MainFrame::MainFrame (this=0x101ee00) at
> > /Users/steven/wxWidgets/samples/shaped/shaped.cpp:260
> > #22 0x0000448b in MainFrame::MainFrame (this=0x101ee00) at
> > /Users/steven/wxWidgets/samples/shaped/shaped.cpp:263
> > #23 0x000044cf in MyApp::OnInit (this=0x816e20) at
> > /Users/steven/wxWidgets/samples/shaped/shaped.cpp:221
> > #24 0x000051de in wxAppConsoleBase::CallOnInit (this=0x816e20) at app.h:77
> > #25 0x001c27e2 in wxEntry (argc=@0x44b638, argv=0x816d80) at
> > /Users/steven/wxWidgets/src/common/init.cpp:444
> > #26 0x001c2ab8 in wxEntry (argc=@0xbffffa10, argv=0xbffffa6c) at
> > /Users/steven/wxWidgets/src/common/init.cpp:472
> > #27 0x0000326c in main (argc=1, argv=0xbffffa6c) at
> > /Users/steven/wxWidgets/samples/shaped/shaped.cpp:211
> >
> >
> >
> >
> >
> > On 12/02/2008, Stefan Csomor <csomor at advancedconcepts.ch> wrote:
> >> Hi Steven
> >>
> >> because 2.8 still has a lot of old quickdraw code that is used, at many
> >> places, even if you set the core_graphics to 1. And in trunk I've almost
> >> completely removed all that code, tried to bring as much of the code as
> >> possible to the latest APIs.
> >>
> >> btw the shape in my builds does show an draw-offset problem, but it doesn't
> >> crash.
> >>
> >> There were also other redraw artifacts in drag&drop where the 'window
> >> highlight frame' was drawn at completely wrong places on the desktop. And I
> >> couldn't reproduce these anymore on 10.5.2.
> >>
> >> Thanks,
> >>
> >> Stefan
> >>
> >>
> >> On 2/12/08 7:51 AM, "Steven Van Ingelgem" <steven at vaningelgem.be> wrote:
> >>
> >>> Sure, but I was wondering why WX_2_8_BRANCH works fine, and trunk
> >>> crashes (with the same Xcode version)?
> >>>
> >>> On 12/02/2008, Stefan Csomor <csomor at advancedconcepts.ch> wrote:
> >>>> Hi Steven
> >>>>
> >>>> C31 has become the official release for 10.5.2
> >>>>
> >>>> could you please retest after upgrading
> >>>>
> >>>> Thanks,
> >>>>
> >>>> Stefan
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: wx-dev-unsubscribe at lists.wxwidgets.org
> >>> For additional commands, e-mail: wx-dev-help at lists.wxwidgets.org
> >>>
> >>
> >> --
> >>
> >> Advanced Concepts AG
> >> Software-Engineering
> >> Heldweg 10
> >> CH-8475 Ossingen
> >> Switzerland
> >>
> >> phone:+41 52 245 0 245
> >> fax:+41 52 245 0 246
> >> http://www.advanced.ch
> >> mailto:csomor at advanced.ch
> >>
> >>
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: wx-dev-unsubscribe at lists.wxwidgets.org
> >> For additional commands, e-mail: wx-dev-help at lists.wxwidgets.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: wx-dev-unsubscribe at lists.wxwidgets.org
> > For additional commands, e-mail: wx-dev-help at lists.wxwidgets.org
> >
>
> --
>
> Advanced Concepts AG
> Software-Engineering
> Heldweg 10
> CH-8475 Ossingen
> Switzerland
>
> phone:+41 52 245 0 245
> fax:+41 52 245 0 246
> http://www.advanced.ch
> mailto:csomor at advanced.ch
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-dev-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wx-dev-help at lists.wxwidgets.org
>
>
More information about the wx-dev
mailing list