[swift-users] Swift and Xcode along with Playgrounds is full of bugs

Jens Alfke jens at mooseyard.com
Wed Sep 14 11:46:56 CDT 2016


> On Sep 14, 2016, at 7:50 AM, Patrice Kouame via swift-users <swift-users at swift.org> wrote:
> 
> 1. File those bugs and issues in radar, but lower your expectations a bit.  That’s how I usually vent my frustrations.  Just imagine the thousands they have to sift through...
> 2. Be constructive: if possible provide some workarounds, even sloppy ones - don’t be shy and engage discussion
> 3. Have a thick skin: welcome some constructive criticism

I can also add: challenge yourself to diagnose the problem. Even if you don’t know the innards of the compiler or runtime. I’m a technology owner and help support developers using it, and I find that many times people report bugs or ask for help without having done all they could to analyze the problem. Sometimes this is a dead end, but often you can uncover more information that can greatly help the engineers fix the bug, and sometimes you can find workarounds that get you unblocked.

Some advice based on stuff I see in my project’s forums:

— Read error messages carefully. Sometimes people report that “it won’t compile” or “it crashed” and append a dump of the log, without noticing that the log includes a message that pretty clearly identifies what they did wrong.
— Look for clues in crash logs / backtraces. Even if you don’t know how the software is implemented or have the source code, just looking at the function names in a backtrace or crash can give you clues about what it’s doing, which might help you find workarounds.
— Try to boil a problem down to a simpler case. Ideally something you can do in a playground.
— Learn common crash/error patterns. I can’t think of any Swift-specific ones at the moment, but a super common Objective-C one is the crash in `objc_msgsend`, which an experienced developer knows the program must have messaged either a deallocated object, or a bogus object reference.
— Treat debugging as a science. Act like a scientist. Examine the evidence, form hypotheses, invent experiments to test the hypotheses. “If this variable is being clobbered, maybe it’s because this method is called re-entrantly? I can add a flag to it to test for a re-entrant call…”

—Jens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160914/5a6a5537/attachment.html>


More information about the swift-users mailing list