[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: EXC_BAD_ACCESS [was: persistent listeners]
From: |
Ben Abbott |
Subject: |
Re: EXC_BAD_ACCESS [was: persistent listeners] |
Date: |
Sun, 13 Mar 2011 18:35:14 -0400 |
On Mar 13, 2011, at 1:38 PM, logari81 wrote:
> On Sun, 2011-03-13 at 11:52 -0400, Ben Abbott wrote:
>> On Mar 13, 2011, at 11:31 AM, logari81 wrote:
>>
>>> On Sun, 2011-03-13 at 11:20 -0400, Ben Abbott wrote:
>>>> On Mar 12, 2011, at 5:06 PM, logari81 wrote:
>>>>
>>>>> Yes your last change would cancel my intention in my previous change.
>>>>> The idea is that the lines:
>>>>>
>>>>> || if (uimenu->items_to_show ())
>>>>> || show_menubar ();
>>>>> || else
>>>>> || hide_menubar ();
>>>>>
>>>>> should be before the first allocation of the canvas:
>>>>>
>>>>> || // This allows us to have a valid OpenGL context right away.
>>>>> || canvas->mode (FL_DEPTH | FL_DOUBLE );
>>>>> || if (fp.is_visible ())
>>>>> || {
>>>>> || show ();
>>>>> || if (fp.get_currentaxes ().ok())
>>>>> || show_canvas ();
>>>>> || else
>>>>> || hide_canvas ();
>>>>> || }
>>>>>
>>>>> otherwise, at least with my fltk version, the first time anything is
>>>>> plotted is vertically shifted by the menu bar height which was very
>>>>> annoying.
>>>>>
>>>>> So we have to find some other solution. Maybe Shai could give us a hint.
>>>>>
>>>>> Kostas
>>>>
>>>> I'm not certain, but it sounds like a problem I have seen on MacOS.
>>>>
>>>> In my case, I was unable to see the menu bar and the status bar at the
>>>> same time. In each of these cases, the plot was shifted vertically.
>>>>
>>>> I was able to fix this by uninstalling fltk-aqua-1.1.10. The package for
>>>> fltk-aqua-shlibs-1.1.10 remains installed.
>>>>
>>>> Ben
>>>
>>> hmm, should I revert the first half of my problematic changeset in hg
>>> until we find a better solution?
>>>
>>> Unfortunately I do not have a deep understanding of how fltk+OpenGL
>>> works so that I can propose a reliable way for fixing these canvas
>>> initialization issues.
>>>
>>> Kostas
>>
>> I checked on Ubuntu, the problematic changset produces a core-dump for ...
>>
>> graphics_toolkit fltk
>> figure (1, "visible", "off")
>>
>> ... as Soren had expected.
>>
>> I think it best to revert 12483.
>>
>> I'm still curious about the vertical shift. I used the simple script below
>> to verify that I no longer have a vertical shift.
>>
>> x = repmat (0:0.1:1, 11, 1);
>> figure (1)
>> plot ([x, x'], [x', x])
>> axis off
>> set (gca, "position", [0 0 1 1])
>>
>> With 12483 reverted I don't see a shift. I've attached a pdf that looks the
>> same as what is displayed.
>>
>> Ben
>
> Now that I have reverted the first half of 12484(9c831d357e6f) your
> crashes should disappear but I get the vertical shift again that you can
> see in the attached pictures. Just after plotting the axes are lower
> than they should (before-drawnow.png). Calling drawnow will bring axes
> to their correct position (after-drawnow.png)
>
> Kostas
> <before-drawnow.png><after-drawnow.png>
My initial plot looks correct for both MacOS and Ubuntu (I've attached the
MacOS version). What you're seeing looks similar to what I had experienced when
I had both the fltk-aqua-1.1.10 and fltk-aqua-1.1.10 packages installed. When
fltk-aqua was installed fltk-configure did not provide the same ldflag info.
In the event, you may find it useful, on MacOS the correct result is ...
$ fltk-config --ldflags
-L/sw/lib -framework OpenGL -dylib_file
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
-L/sw/lib/fontconfig2/lib -L/sw/lib/xft2/lib -L/usr/X11R6/lib -lfltk -lXft
-lpthread -lXext -lX11
For Ubuntu I see ...
$ fltk-config --ldflags
-Wl,-Bsymbolic-functions -lfltk
Ben
- Re: EXC_BAD_ACCESS [was: persistent listeners], (continued)
- Re: EXC_BAD_ACCESS [was: persistent listeners], logari81, 2011/03/12
- Re: EXC_BAD_ACCESS [was: persistent listeners], Michael D Godfrey, 2011/03/12
- Re: EXC_BAD_ACCESS [was: persistent listeners], Ben Abbott, 2011/03/12
- Re: EXC_BAD_ACCESS [was: persistent listeners], logari81, 2011/03/12
- Re: EXC_BAD_ACCESS [was: persistent listeners], Søren Hauberg, 2011/03/13
- Re: EXC_BAD_ACCESS [was: persistent listeners], Ben Abbott, 2011/03/13
- Re: EXC_BAD_ACCESS [was: persistent listeners], Ben Abbott, 2011/03/13
- Re: EXC_BAD_ACCESS [was: persistent listeners], logari81, 2011/03/13
- Re: EXC_BAD_ACCESS [was: persistent listeners], Ben Abbott, 2011/03/13
- Re: EXC_BAD_ACCESS [was: persistent listeners], logari81, 2011/03/13
- Re: EXC_BAD_ACCESS [was: persistent listeners],
Ben Abbott <=