[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Thematic crash with horizontal menu
From: |
Riccardo Mottola |
Subject: |
Re: Thematic crash with horizontal menu |
Date: |
Sun, 29 Nov 2020 01:46:14 +0100 |
User-agent: |
GNUMail (Version 1.3.0) |
Hi,
On 2020-11-29 00:34:05 +0100 Riccardo Mottola
<riccardo.mottola@libero.it> wrote:
==1475==
==1475== Conditional jump or move depends on uninitialised value(s)
==1475== at 0x52670E6: NSEqualPoints (NSGeometry.m:499)
==1475== by 0x4BA4C0E: _i_NSMenuView__mouseDown_
(NSMenuView.m:2012)
==1475== by 0x4C9FFF8: _i_NSWindow__sendEvent_ (NSWindow.m:4154)
==1475== by 0x4AA041F: _i_NSApplication__sendEvent_
(NSApplication.m:2148)
==1475== by 0x4A9EB9E: _i_NSApplication__run (NSApplication.m:1585)
==1475== by 0x4A7B58D: NSApplicationMain (Functions.m:123)
==1475== by 0x584EDFC: (below main) (in /lib64/libc-2.32.so)
I put a debug here and found some interesting stuff:
Breakpoint 1, -[NSMenuView mouseDown:] (self=0x555555b34180,
_cmd=<optimized out>, theEvent=0x555555998a90)
at NSMenuView.m:2012
2012 if (NSEqualPoints(currentTopLeft, originalTopLeft) == NO)
(gdb) p currentTopLeft
$1 = {x = 6.9533491012535418e-310, y = 1.3906697525130732e-309}
(gdb) p originalTopLeft
$2 = {x = 0, y = 768}
(gdb) p _window
No symbol "_window" in current context.
(gdb) p currentFrame
$3 = {origin = {x = 6.9533491012535418e-310, y =
6.9533484238771897e-310}, size = {width = <optimized out>,
height = <optimized out>}}
these ridiculously small values mean "garbage" to me.
However if you look at the code, it is interesting.
- originalFrame is gotten from _window
- events are tracked
- currentFrame is gotten again from _window
how is in the meanwhile the windows's frame corrupted so much?
I initialized also currentTopLeft to NSZeroValue and added some checks
to retrieve frame only if _window != nil, yet I still get back those
stupid values: I think thus that they get corrupted.
Fred, I think this is your realm.
Riccardo