[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Crash on app start due to icon
From: |
Josh Freeman |
Subject: |
Re: Crash on app start due to icon |
Date: |
Tue, 7 Aug 2018 18:34:25 -0400 |
On Aug 5, 2018, at 5:22 AM, Wolfgang Lux wrote:
I finally managed to reproduce the crash, once I've noticed that you
are compiling on a 32-bit OS rather than 64-bits (any reason for not
using 64-bits nowadays?).
Good catch, now I'm seeing the crash as well (Ubuntu 16.04.5, 32-
bit).
Setting a breakpoint on the setApplicationIconImage: and then
stepping through that method I found that the code crashes here:
2385 miniWindowSize = [GSCurrentServer() iconSize];
It seems to be a gcc/gobjc compiler/runtime bug: Sending a nil
message using a method signature that returns a structure (ex. -
[NSView bounds] -> NSRect) results in:
1. Garbage values in the returned structure's members (affects: 32-bit/
64-bit, debug/non-debug)
2. A corrupted stack (affects: 32-bit w/non-debug)
Attached are two files:
- nil_msg_check.m: source for a simple test program, NilMsgCheck,
which sends a nil message that returns an NSSize value
- GNUmakefile: makefile for NilMsgCheck
-----
Output from running NilMsgCheck on gcc/gobjc 32-bit non-debug:
[self nmcZeroSize] returned: {width = 0; height = 0}
[nil nmcZeroSize] returned: {width = -2.90002e-05; height = 0}
*** stack smashing detected ***: ./obj/NilMsgCheck terminated
Aborted (core dumped)
(If the nil-message is commented-out (nil_msg_check.m:22),
NilMsgCheck exits normally without error)
----
Output from running NilMsgCheck on gcc/gobjc 32-bit debug:
[self nmcZeroSize] returned: {width = 0; height = 0}
[nil nmcZeroSize] returned: {width = -2.74035e-05; height =
-2.78249e-05}
(Exits normally)
----
Output from running NilMsgCheck on clang/objc2 32-bit debug:
[self nmcZeroSize] returned: {width = 0; height = 0}
[nil nmcZeroSize] returned: {width = 0; height = 0}
(Exits normally, values are correctly zeroed)
Cheers,
Josh
nil_msg_check.m
Description: Binary data
GNUmakefile
Description: Binary data
- Re: Crash on app start due to icon, (continued)
- Re: Crash on app start due to icon, Riccardo Mottola, 2018/08/04
- Re: Crash on app start due to icon, Wolfgang Lux, 2018/08/05
- Re: Crash on app start due to icon, Gregory Casamento, 2018/08/05
- Re: Crash on app start due to icon, Fred Kiefer, 2018/08/05
- Re: Crash on app start due to icon, Gregory Casamento, 2018/08/05
- Re: Crash on app start due to icon, Riccardo Mottola, 2018/08/06
- Re: Crash on app start due to icon, Wolfgang Lux, 2018/08/06
- Re: Crash on app start due to icon, Riccardo Mottola, 2018/08/07
- Re: Crash on app start due to icon, Wolfgang Lux, 2018/08/08
- Re: Crash on app start due to icon, Riccardo Mottola, 2018/08/09
- Re: Crash on app start due to icon,
Josh Freeman <=
- Re: Crash on app start due to icon, Fred Kiefer, 2018/08/08
- Re: Crash on app start due to icon, Riccardo Mottola, 2018/08/08
- Re: Crash on app start due to icon, Yavor Doganov, 2018/08/10
- Re: Crash on app start due to icon, Fred Kiefer, 2018/08/03
- Re: Crash on app start due to icon, Fred Kiefer, 2018/08/03
- Re: Crash on app start due to icon, Riccardo Mottola, 2018/08/04
- Re: Crash on app start due to icon, Riccardo Mottola, 2018/08/04
- Re: Crash on app start due to icon, Fred Kiefer, 2018/08/04
Re: Crash on app start due to icon, Riccardo Mottola, 2018/08/01