Keep a social journal of your work progress as you make and learn things.



Here is my plan:

  • Create a new file called SegFaultDebugger.swift in the project
  • In this new class, define an extension to the class that’s giving problems
  • Move a group of methods from the main file to SegFaultDebugger.swift
  • Compile

At this point, 1 of 4 things happens:

  • Nothing. Too bad. Wait for it to happen again
  • Segfault in the original file: Move the methods from SegFaultDebugger.swift back to the original file and move a different set of methods into SegFaultDebugger.swift. Repeat
  • Segfault in SegFaultDebugger.swift: Great! Now use binary search to pin the segfault down to a specific method until I can figure out what construct is causing it
  • Meaningful compiler errors: Great! Fix the errors. Once everything compiles, move the methods back into the original file