This is how I debug SystemStackError when there is no stack trace.
My first attempt was:
begin
a_method_that_causes_infinite_recursion_in_a_not_obvious_way
rescue SystemStackError
puts caller
end
This is how I debug SystemStackError when there is no stack trace.
My first attempt was:
begin
a_method_that_causes_infinite_recursion_in_a_not_obvious_way
rescue SystemStackError
puts caller
end
#!/bin/sh | |
echo "What should the Application be called (no spaces allowed e.g. GCal)?" | |
read inputline | |
name=$inputline | |
echo "What is the url (e.g. https://www.google.com/calendar/render)?" | |
read inputline | |
url=$inputline |
Generate the list yourself:
$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.sdk/System/Library/Frameworks/UIKit.framework/Headers
$ grep UI_APPEARANCE_SELECTOR ./* | \
sed 's/NS_AVAILABLE_IOS(.*)//g' | \
sed 's/NS_DEPRECATED_IOS(.*)//g' | \
sed 's/API_AVAILABLE(.*)//g' | \
sed 's/API_UNAVAILABLE(.*)//g' | \
sed 's/UI_APPEARANCE_SELECTOR//g' | \
####Issue Classifications
Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
// Taken from http://PSPDFKit.com. This snippet is under public domain. | |
#define UIKitVersionNumber_iOS_7_0 0xB57 | |
BOOL PSPDFIsUIKitFlatMode(void) { | |
static BOOL isUIKitFlatMode = NO; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
// We get the modern UIKit if system is running >= iOS 7 and we were linked with >= SDK 7. | |
if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_7_0) { | |
isUIKitFlatMode = (NSVersionOfLinkTimeLibrary("UIKit") >> 16) >= UIKitVersionNumber_iOS_7_0; | |
} |
0x00007f944f5f4b30 [ A LU ] h=-&- v=-&& NSView 0x7f944d03da60 f=(0,0,1400,823) b=(-) TIME drawRect: min/mean/max 0.00/0.00/0.00 ms | |
[ A LU ] h=&&& v=-&- DVTTabSwitcher 0x7f944d042280 f=(0,0,1400,821) b=(-) TIME drawRect: min/mean/max 0.00/0.00/0.00 ms | |
[ AF LU ] h=-&- v=-&- NSTabView 0x7f944d0425c0 f=(0,0,1400,821) b=(-) TIME drawRect: min/mean/max 0.00/0.00/0.01 ms | |
[ A LU ] h=-&- v=-&- DVTControllerContentView 0x7f944d97ee50 f=(0,0,1400,821) b=(-) TIME drawRect: min/mean/max 0.00/0.00/0.00 ms | |
[ AF P LU ] h=--- v=--- DVTSplitView 0x7f944d99afc0 f=(0,0,1400,821) b=(-) TIME drawRect: min/mean/max 0.01/0.08/0.80 ms | |
[ H LU ] h=-&- v=-&- DVTReplacementView 0x7f944d9eac40 f=(-260,0,260,821) b=(-) TIME drawRect: min/mean/max 0.00/0.00/0.00 ms | |
[ hA LU ] h=-&- v=-&- DVTControllerContentView 0x7f944d963fa0 f=(0,0,260,821) b=(-) TIME drawRect: min/mean/max 0.00/0.00/0.00 ms | |
[ hA LU ] h=--- v=--- NSView 0x7f944d965280 |
# We have to accept the Xcode license. | |
params = { | |
# Release. | |
'IDELastGMLicenseAgreedTo' => 'EA1057', | |
'IDELastVersionOfXcodeThatRegisteredLaunchServicesItems' => '5.0', | |
'IDEXcodeVersionForAgreedToGMLicense' => '5.0', | |
# Beta. | |
'IDELastBetaLicenseAgreedTo' => 'EA1027', | |
'IDEXcodeVersionForAgreedToBetaLicense' => '5.0', | |
} |