Skip to content

Instantly share code, notes, and snippets.

View jurriaan's full-sized avatar
:octocat:
What's happening?

Jurriaan Pruis jurriaan

:octocat:
What's happening?
View GitHub Profile
@jurriaan
jurriaan / gist:787857
Created January 20, 2011 13:20
Scope problems
test = {
'a': ->
console.log 1
'b': ->
console.log 2
}
test2 = {}
for title, func of test
console.log title
test2[title] = =>
class Test
constructor: ->
class Test2
constructor: ->
@test = new Test()
new Test2()
@jurriaan
jurriaan / gist:763642
Created January 3, 2011 16:30
Random kod crash 2
2011-01-03 17:27:38.907 Kod[40716:a0f] T [src/KDocument.mm:381] -[KDocument setIconBasedOnContents]
2011-01-03 17:27:40.970 Kod[40716:a0f] D [src/CTBrowser.mm:405] [ChromiumTabs] TODO createHistoricalTab <KDocument@0x100debed0 'randomfilethatdoesntexists'>
closeDocument: 14597840 file://localhost/Users/jurriaanpruis/src/kod/randomfilethatdoesntexists
Program received signal: “EXC_BAD_ACCESS”.
sharedlibrary apply-load-rules all
(gdb) bt
#0 0x00007fff8838e120 in objc_msgSend ()
#1 0x00007fff855731e6 in _CFAutoreleasePoolPop ()
#2 0x00007fff85eb5100 in -[NSAutoreleasePool drain] ()
#3 0x00007fff8058f51f in -[NSApplication run] ()
@jurriaan
jurriaan / gist:763637
Created January 3, 2011 16:28
Random kod crash
(gdb) bt
#0 0x00007fff8838f15c in objc_msgSend_vtable2 ()
#1 0x00007fff855eb6ec in +[NSObject(NSObject) isAncestorOfObject:] ()
#2 0x00007fff85efb11c in -[NSConcretePortCoder encodeObject:isBycopy:isByref:] ()
#3 0x00007fff85f189fe in -[NSDictionary(NSDictionary) encodeWithCoder:] ()
#4 0x00007fff85efb3fe in -[NSConcretePortCoder encodeObject:isBycopy:isByref:] ()
#5 0x00007fff85efaacc in _NSWalkData2 ()
#6 0x00007fff85efbe42 in -[NSConcretePortCoder encodeInvocation:] ()
#7 0x00007fff85efb3fe in -[NSConcretePortCoder encodeObject:isBycopy:isByref:] ()
#8 0x00007fff85efaacc in _NSWalkData2 ()
#0 0x0000000100fc3b48 in ?? ()
#1 0x00007fff85555a9e in CFBasicHashFindBucket ()
#2 0x00007fff8555596b in CFDictionaryGetValue ()
#3 0x00007fff856343e2 in CFStringGetNameOfEncoding ()
#4 0x00007fff85fea858 in +[NSString(NSStringOtherEncodings) localizedNameOfStringEncoding:] ()
#5 0x000000010000ab81 in -[KDocument readFromData:ofType:error:callback:] (self=0x139e8b330, _cmd=0x100405aef, data=0x100dd1020, typeName=0x0, outError=0x7fff5fbfdc98, callback=0x7fff5fbfdc70) at KDocument.mm:1811
#6 0x000000010000b2cb in -[KDocument urlHandler:finishedReadingURL:data:ofType:error:callback:] (self=0x139e8b330, _cmd=0x100415b12, urlHandler=0x10212a570, url=0x13a1ca9a0, data=0x100dd1020, typeName=0x0, error=0x0, callback=0x7fff5fbfdd50) at KDocument.mm:1736
#7 0x000000010007e179 in __-[KHTTPURLHandler readURL:ofType:inTab:]_block_invoke_4 (.block_descriptor=0x13a1c7e50, err=0x0, data=0x100dd1020) at KHTTPURLHandler.mm:99
#8 0x000000010007fc35 in -[_HURLConnectionDelegate _onComplete:error:cancel:] (self=0x13a19e