MacBook pro freezes

my computer sometimes freeze for no apparent reason When it freezes: nothing respond, I got a black or grey screen, nothing else. It's not hot either, I've set-up smcFanControl to keep my mac cool.

It was checked in a store where no problem was found; they advise me to check the console after a crash.

UPDATE: I ran the AHT test and it all seems OK.

UPDATE 2: It's a model from early 2011 - Processor 2.2 GHz Intel Core i7. It's running on OS X 10.8.5.

UPDATE 3: just had a new crash with something on the screen for the first time. The whole screen suddenly had an offset: like 1000 pixels on the left. All the apps were stuck (couldn't even do force quit) but I could move the cursor. The keys for the sound had no effect however pressing the caps lock one would change the light on and off.

UPDATE 4: just had a similar crash and my computer wouldn't restart straight away; it shown random shit on the screen when I rebooted the first time and the sound at the start just looped. Then it started fine and I got the error message from Mac OS (first time) Details of the Kernel Panic below...

This is what I got in the console just before the crash - the latest line is my reboot obviously:

4/10/13 10:41:38.000 AM kernel[0]: CODE SIGNING: cs_invalid_page(0x10edc0000): 
p=7059[python] clearing CS_VALID
4/10/13 10:41:48.000 AM kernel[0]: CODE SIGNING: cs_invalid_page(0x10187f000): p=7060[python] clearing CS_VALID
4/10/13 10:41:58.000 AM kernel[0]: CODE SIGNING: cs_invalid_page(0x100081000): p=7061[python] clearing CS_VALID
4/10/13 10:41:59.000 AM kernel[0]: CODE SIGNING: cs_invalid_page(0x10176a000): p=7062[python] clearing CS_VALID
4/10/13 10:42:02.000 AM kernel[0]: CODE SIGNING: cs_invalid_page(0x10310f000): p=7063[python] clearing CS_VALID
4/10/13 10:42:09.171 AM Safari[1004]: CGContextClipToRect: invalid context 0x0
4/10/13 10:42:14.594 AM Safari[1004]: CGContextClipToRect: invalid context 0x0
4/10/13 10:42:14.609 AM WindowServer[86]: CoreAnimation: context hosting changed while locked!
4/10/13 10:42:27.000 AM kernel[0]: MacAuthEvent en1   Auth result for: 00:18:4d:...  MAC AUTH succeeded
4/10/13 10:42:27.000 AM kernel[0]: wlEvent: en1 en1 Link UP virtIf = 0
4/10/13 10:42:27.000 AM kernel[0]: AirPort: RSN handshake complete on en1
4/10/13 10:42:27.000 AM kernel[0]: wl0: Roamed or switched channel, reason #8, bssid 00:18:4d:...
4/10/13 10:42:27.000 AM kernel[0]: en1: BSSID changed to 00:18:4d:...
4/10/13 10:42:27.000 AM kernel[0]: en1::IO80211Interface::postMessage bssid changed
4/10/13 10:42:31.689 AM Safari[1004]: CGContextClipToRect: invalid context 0x0
4/10/13 10:42:43.628 AM Safari[1004]: CGContextClipToRect: invalid context 0x0
4/10/13 10:43:57.800 AM Safari[1004]: CGContextClipToRect: invalid context 0x0
4/10/13 10:44:28.289 AM Safari[1004]: CGContextClipToRect: invalid context 0x0
4/10/13 10:51:53.000 AM kernel[0]: CODE SIGNING: cs_invalid_page(0x1053a6000): p=7072[python] clearing CS_VALID
4/10/13 10:51:55.000 AM kernel[0]: CODE SIGNING: cs_invalid_page(0x10d700000): p=7073[python] clearing CS_VALID
4/10/13 10:51:57.000 AM kernel[0]: CODE SIGNING: cs_invalid_page(0x10f5eb000): p=7074[python] clearing CS_VALID
4/10/13 10:51:59.000 AM kernel[0]: CODE SIGNING: cs_invalid_page(0x108ba4000): p=7075[python] clearing CS_VALID
4/10/13 10:52:11.000 AM kernel[0]: CODE SIGNING: cs_invalid_page(0x10ef6b000): p=7076[python] clearing CS_VALID
4/10/13 10:52:28.000 AM kernel[0]: CODE SIGNING: cs_invalid_page(0x1046a6000): p=7077[python] clearing CS_VALID
4/10/13 10:52:32.000 AM kernel[0]: CODE SIGNING: cs_invalid_page(0x1098f0000): p=7079[python] clearing CS_VALID
4/10/13 10:52:36.000 AM kernel[0]: CODE SIGNING: cs_invalid_page(0x1076b1000): p=7080[python] clearing CS_VALID
4/10/13 10:52:37.000 AM kernel[0]: CODE SIGNING: cs_invalid_page(0x1003dd000): p=7081[python] clearing CS_VALID
4/10/13 10:52:39.000 AM kernel[0]: CODE SIGNING: cs_invalid_page(0x10cd47000): p=7082[python] clearing CS_VALID
4/10/13 11:05:27.000 AM bootlog[0]: BOOT_TIME 1380848727 0

I had a new reboot today (with some red lines):

9/10/13 10:24:04.208 AM SubmitDiagInfo[860]: Launched to submit Diagnostics and Usage
9/10/13 10:24:04.464 AM SubmitDiagInfo[860]: Cleaning up expired diagnostic messages database at path: /var/log/DiagnosticMessages/2013.09.09.asl
9/10/13 10:24:50.837 AM librariand[863]: MMe quota status changed: under quota
9/10/13 10:30:18.000 AM kernel[0]: MacAuthEvent en1   Auth result for: 00:18:4d:...  MAC AUTH succeeded
9/10/13 10:30:18.000 AM kernel[0]: wlEvent: en1 en1 Link UP virtIf = 0
9/10/13 10:30:18.000 AM kernel[0]: AirPort: RSN handshake complete on en1
9/10/13 10:30:18.000 AM kernel[0]: wl0: Roamed or switched channel, reason #8, bssid 00:18:4d:...
9/10/13 10:30:18.000 AM kernel[0]: en1: BSSID changed to 00:18:4d:...
9/10/13 10:30:18.000 AM kernel[0]: en1::IO80211Interface::postMessage bssid changed
9/10/13 10:32:20.000 AM kernel[0]: MacAuthEvent en1   Auth result for: 00:18:4d:...  MAC AUTH succeeded
9/10/13 10:32:20.000 AM kernel[0]: wlEvent: en1 en1 Link UP virtIf = 0
9/10/13 10:32:20.000 AM kernel[0]: AirPort: RSN handshake complete on en1
9/10/13 10:32:20.000 AM kernel[0]: wl0: Roamed or switched channel, reason #8, bssid 00:18:4d:...
9/10/13 10:32:20.000 AM kernel[0]: en1: BSSID changed to 00:18:4d:...
9/10/13 10:32:20.000 AM kernel[0]: en1::IO80211Interface::postMessage bssid changed
9/10/13 10:40:20.000 AM kernel[0]: MacAuthEvent en1   Auth result for: 00:18:4d:...  MAC AUTH succeeded
9/10/13 10:40:20.000 AM kernel[0]: wlEvent: en1 en1 Link UP virtIf = 0
9/10/13 10:40:20.000 AM kernel[0]: wl0: Roamed or switched channel, reason #8, bssid 00:18:4d:...
9/10/13 10:40:20.000 AM kernel[0]: en1: BSSID changed to 00:18:4d:...
9/10/13 10:40:20.000 AM kernel[0]: en1::IO80211Interface::postMessage bssid changed
9/10/13 10:40:20.000 AM kernel[0]: AirPort: RSN handshake complete on en1
9/10/13 10:42:15.000 AM kernel[0]: MacAuthEvent en1   Auth result for: 00:18:4d:...  MAC AUTH succeeded
9/10/13 10:42:15.000 AM kernel[0]: wlEvent: en1 en1 Link UP virtIf = 0
9/10/13 10:42:15.000 AM kernel[0]: wl0: Roamed or switched channel, reason #8, bssid 00:18:4d:...
9/10/13 10:42:15.000 AM kernel[0]: en1: BSSID changed to 00:18:4d:...
9/10/13 10:42:15.000 AM kernel[0]: en1::IO80211Interface::postMessage bssid changed
9/10/13 10:42:15.000 AM kernel[0]: AirPort: RSN handshake complete on en1
9/10/13 10:42:27.677 AM coreaudiod[273]: Disabled automatic stack shots because audio IO is active
9/10/13 10:42:27.875 AM coreaudiod[273]: Enabled automatic stack shots because audio IO is inactive
9/10/13 10:42:47.456 AM _securityagent[928]: audit warning: allsoft
9/10/13 10:42:47.456 AM _securityagent[927]: audit warning: soft /var/audit
9/10/13 10:42:47.456 AM _securityagent[929]: audit warning: closefile /var/audit/20131008230942.20131008234247
9/10/13 10:42:57.764 AM SystemUIServer[271]: It does not make sense to draw an image when [NSGraphicsContext currentContext] is nil.  This is a programming error. Break on void _NSWarnForDrawingImageWithNoCurrentContext() to debug.  This will be logged only once.  This may break in the future.
9/10/13 10:57:14.000 AM bootlog[0]: BOOT_TIME 1381276634 0

Kernel Panic:

Interval Since Last Panic Report:  34493 sec
Panics Since Last Report:          1
Anonymous UUID:                    8847A9F2-B78F-E78C-4347-544909D21087

Wed Oct 16 15:19:05 2013
Panic(CPU 2): Unresponsive processor (this CPU did not acknowledge interrupts) TLB state:0x0
RAX: 0x0000000000000000, RBX: 0x0000000000000000, RCX: 0x1037245403d20010, RDX: 0xffffff8114cfd070
RSP: 0xffffff8150163cc0, RBP: 0xffffff8150163ce0, RSI: 0xffffff8114cfd060, RDI: 0x0000000000000001
R8:  0xffffff8114c7d078, R9:  0x0000000000988dc9, R10: 0xffffff8150163c30, R11: 0x0000000000000246
R12: 0xffffff8114c7d000, R13: 0xffffff803f808af0, R14: 0xffffff803f77c0d0, R15: 0xffffff802c557a40
RFL: 0x0000000000000246, RIP: 0xffffff802c2a7c21, CS:  0x0000000000000008, SS:  0x0000000000000010
Backtrace (CPU 2), Frame : Return Address
0xffffff8114d0bf50 : 0xffffff802c2bea71 
0xffffff8114d0bf80 : 0xffffff802c2b7f70 
0xffffff8114d0bfd0 : 0xffffff802c2cedbb 
0xffffff8150163ce0 : 0xffffff802c22e6d9 
0xffffff8150163d60 : 0xffffff802c22db9c 
0xffffff8150163da0 : 0xffffff802c5572ab 
0xffffff8150163e10 : 0xffffff802c5568db 
0xffffff8150163f20 : 0xffffff802c556494 
0xffffff8150163f50 : 0xffffff802c5e97ba 
0xffffff8150163fb0 : 0xffffff802c2cf453 

BSD process name corresponding to current thread: powerd

Mac OS version:
12F45

Kernel version:
Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64
Kernel UUID: EA38B02E-2B88-309F-BA68-1DE29F605DD8
Kernel slide:     0x000000002c000000
Kernel text base: 0xffffff802c200000
System model name: MacBookPro8,2 (Mac-94245A3940C91C80)

System uptime in nanoseconds: 9634278129
last loaded kext at 6072405517: com.apple.iokit.IOBluetoothSerialManager    4.1.7f2 (addr 0xffffff7facf5e000, size 57344)
loaded kexts:
com.displaylink.driver.DisplayLinkDriver    1.8
com.seagate.driver.PowSecDriverCore 5.2.2
com.apple.iokit.IOBluetoothSerialManager    4.1.7f2
com.apple.filesystems.autofs    3.0
com.apple.driver.AudioAUUC  1.60
com.apple.driver.AppleTyMCEDriver   1.0.2d2
com.apple.driver.AGPM   100.13.12
com.apple.driver.AppleMikeyHIDDriver    124
com.apple.driver.AppleHDAHardwareConfigDriver   2.4.7fc4
com.apple.driver.AppleHDA   2.4.7fc4
com.apple.iokit.IOBluetoothUSBDFU   4.1.7f2
com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport 4.1.7f4
com.apple.driver.AppleMikeyDriver   2.4.7fc4
com.apple.driver.AppleIntelHD3000Graphics   8.1.6
com.apple.driver.AppleSMCLMU    2.0.3d0
com.apple.driver.SMCMotionSensor    3.0.3d1
com.apple.driver.AppleUpstreamUserClient    3.5.12
com.apple.kext.AMDFramebuffer   8.1.6
com.apple.AMDRadeonAccelerator  1.0.8
com.apple.iokit.IOUserEthernet  1.0.0d1
com.apple.Dont_Steal_Mac_OS_X   7.0.0
com.apple.driver.ApplePolicyControl 3.4.5
com.apple.driver.AppleSMBusPCI  1.0.11d1
com.apple.driver.AppleLPC   1.6.3
com.apple.driver.AppleSMCPDRC   1.0.0
com.apple.driver.AppleIntelSNBGraphicsFB    8.1.6
com.apple.driver.AppleMuxControl    3.4.5
com.apple.driver.AppleBacklight 170.3.5
com.apple.driver.AppleMCCSControl   1.1.11
com.apple.driver.ACPI_SMC_PlatformPlugin    1.0.0
com.apple.driver.AppleUSBTCButtons  237.1
com.apple.driver.AppleUSBTCKeyEventDriver   237.1
com.apple.driver.AppleUSBTCKeyboard 237.1
com.apple.driver.AppleIRController  320.15
com.apple.driver.AppleFileSystemDriver  3.0.1
com.apple.AppleFSCompression.AppleFSCompressionTypeDataless 1.0.0d1
com.apple.AppleFSCompression.AppleFSCompressionTypeZlib 1.0.0d1
com.apple.BootCache 34
com.apple.iokit.SCSITaskUserClient  3.5.6
com.apple.driver.XsanFilter 404
com.apple.iokit.IOAHCIBlockStorage  2.3.5
com.apple.driver.AppleUSBHub    635.4.0
com.apple.driver.AppleSDXC  1.4.3
com.apple.iokit.AppleBCM5701Ethernet    3.6.2b4
com.apple.driver.AppleFWOHCI    4.9.9
com.apple.driver.AirPort.Brcm4331   615.20.17
com.apple.driver.AppleAHCIPort  2.6.6
com.apple.driver.AppleUSBUHCI   621.4.0
com.apple.driver.AppleUSBEHCI   621.4.6
com.apple.driver.AppleSmartBatteryManager   161.0.0
com.apple.driver.AppleACPIButtons   1.8
com.apple.driver.AppleRTC   1.5
com.apple.driver.AppleHPET  1.8
com.apple.driver.AppleSMBIOS    1.9
com.apple.driver.AppleACPIEC    1.8
com.apple.driver.AppleAPIC  1.7
com.apple.driver.AppleIntelCPUPowerManagementClient 214.0.0
com.apple.nke.applicationfirewall   4.0.39
com.apple.security.quarantine   2.1
com.apple.driver.AppleIntelCPUPowerManagement   214.0.0
com.apple.iokit.IOSerialFamily  10.0.6
com.apple.kext.triggers 1.0
com.apple.driver.DspFuncLib 2.4.7fc4
com.apple.iokit.IOAudioFamily   1.9.2fc7
com.apple.kext.OSvKernDSPLib    1.12
com.apple.iokit.IOBluetoothHostControllerUSBTransport   4.1.7f2
com.apple.driver.AppleThunderboltEDMSink    1.2.0
com.apple.driver.AppleThunderboltDPOutAdapter   2.5.0
com.apple.driver.AppleHDAController 2.4.7fc4
com.apple.iokit.IOHDAFamily 2.4.7fc4
com.apple.iokit.IOAcceleratorFamily 74.15
com.apple.kext.AMD6000Controller    8.1.6
com.apple.kext.AMDSupport   8.1.6
com.apple.iokit.IOSurface   86.0.4
com.apple.iokit.IOBluetoothFamily   4.1.7f2
com.apple.iokit.IOFireWireIP    2.2.5
com.apple.driver.AppleGraphicsControl   3.4.5
com.apple.driver.AppleBacklightExpert   1.0.4
com.apple.iokit.IONDRVSupport   2.3.7
com.apple.driver.AppleSMBusController   1.0.11d1
com.apple.iokit.IOGraphicsFamily    2.3.7
com.apple.driver.IOPlatformPluginLegacy 1.0.0
com.apple.driver.IOPlatformPluginFamily 5.4.1d13
com.apple.driver.AppleSMC   3.1.5d4
com.apple.driver.AppleThunderboltDPInAdapter    2.5.0
com.apple.driver.AppleThunderboltDPAdapterFamily    2.5.0
com.apple.driver.AppleThunderboltPCIDownAdapter 1.3.2
com.apple.driver.AppleUSBMultitouch 237.3
com.apple.iokit.IOUSBHIDDriver  623.4.0
com.apple.driver.AppleUSBMergeNub   621.4.6
com.apple.driver.AppleUSBComposite  621.4.0
com.apple.iokit.IOSCSIMultimediaCommandsDevice  3.5.6
com.apple.iokit.IOBDStorageFamily   1.7
com.apple.iokit.IODVDStorageFamily  1.7.1
com.apple.iokit.IOCDStorageFamily   1.7.1
com.apple.iokit.IOAHCISerialATAPI   2.5.5
com.apple.iokit.IOFireWireSBP2  4.2.5
com.apple.iokit.IOSCSIBlockCommandsDevice   3.5.6
com.apple.iokit.IOSCSIArchitectureModelFamily   3.5.6
com.apple.driver.AppleThunderboltNHI    1.9.2
com.apple.iokit.IOThunderboltFamily 2.7.7
com.apple.iokit.IOUSBUserClient 630.4.4
com.apple.iokit.IOEthernetAVBController 1.0.2b1
com.apple.iokit.IOFireWireFamily    4.5.5
com.apple.iokit.IO80211Family   530.5
com.apple.iokit.IONetworkingFamily  3.0
com.apple.iokit.IOAHCIFamily    2.5.1
com.apple.iokit.IOUSBFamily 635.4.0
com.apple.driver.AppleEFINVRAM  2.0
com.apple.driver.AppleEFIRuntime    2.0
com.apple.iokit.IOHIDFamily 1.8.1
com.apple.iokit.IOSMBusFamily   1.1
com.apple.security.sandbox  220.3
com.apple.kext.AppleMatch   1.0.0d1
com.apple.security.TMSafetyNet  7
com.apple.driver.DiskImages 345
com.apple.iokit.IOStorageFamily 1.8
com.apple.driver.AppleKeyStore  28.21
com.apple.driver.AppleACPIPlatform  1.8
com.apple.iokit.IOPCIFamily 2.8
com.apple.iokit.IOACPIFamily    1.4
com.apple.kec.corecrypto    1.0
Panic(CPU 4): Unresponsive processor (this CPU did not acknowledge interrupts) TLB state:0x0
RAX: 0x0000000000000000, RBX: 0x0000000000000005, RCX: 0x0000000032031001, RDX: 0x000000000000025a
RSP: 0xffffff8150123de0, RBP: 0xffffff8150123e30, RSI: 0x00000000000002b4, RDI: 0xffffff803f6131c0
R8:  0xffffff8150123c78, R9:  0x0000000000000060, R10: 0x0000000000000059, R11: 0x0000000000000201
R12: 0x00000000003b5c69, R13: 0xffffff803f6a0a00, R14: 0xffffff811d10c000, R15: 0x00000000ffffffff
RFL: 0x0000000000000213, RIP: 0xffffff7fad1cc5a8, CS:  0x0000000000000008, SS:  0x0000000000000010
Backtrace (CPU 4), Frame : Return Address
0xffffff8114d2af50 : 0xffffff802c2bea71 
0xffffff8114d2af80 : 0xffffff802c2b7f70 
0xffffff8114d2afd0 : 0xffffff802c2cedbb 
0xffffff8150123e30 : 0xffffff7fad1cbf7f 
0xffffff8150123ec0 : 0xffffff7fad13bef9 
0xffffff8150123ef0 : 0xffffff802c650e58 
0xffffff8150123f30 : 0xffffff802c64f95a 
0xffffff8150123f80 : 0xffffff802c64fa89 
0xffffff8150123fb0 : 0xffffff802c2b3257 
      Kernel Extensions in backtrace:
         com.apple.driver.AirPort.Brcm4331(615.20.17)[16453F76-86D1-3CA2-9958-82319C77F1D1]@0xffffff7fad12e000->0xffffff7fad326fff
            dependency: com.apple.iokit.IOPCIFamily(2.8)[2FAEA49C-EA4C-39C6-9203-FC022277A43C]@0xffffff7fac779000
            dependency: com.apple.iokit.IO80211Family(530.5)[7C5A7C83-6A21-3363-8F4B-99589F6F124A]@0xffffff7fad0bf000
            dependency: com.apple.iokit.IONetworkingFamily(3.0)[FE3163C6-2874-3843-A96F-5DB796ED27CA]@0xffffff7facadc000
      Kernel Extensions in backtrace:
         com.apple.driver.AirPort.Brcm4331(615.20.17)[16453F76-86D1-3CA2-9958-82319C77F1D1]@0xffffff7fad12e000->0xffffff7fad326fff
            dependency: com.apple.iokit.IOPCIFamily(2.8)[2FAEA49C-EA4C-39C6-9203-FC022277A43C]@0xffffff7fac779000
            dependency: com.apple.iokit.IO80211Family(530.5)[7C5A7C83-6A21-3363-8F4B-99589F6F124A]@0xffffff7fad0bf000
            dependency: com.apple.iokit.IONetworkingFamily(3.0)[FE3163C6-2874-3843-A96F-5DB796ED27CA]@0xffffff7facadc000

BSD process name corresponding to current thread: kernel_task
panic(cpu 0 caller 0xffffff802c29e54b): "TLB invalidation IPI timeout: " "CPU(s) failed to respond to interrupts, unresponsive CPU bitmap: 0x14, NMIPI acks: orig: 0x0, now: 0x2"@/SourceCache/xnu/xnu-2050.48.12/osfmk/x86_64/pmap.c:2343
Backtrace (CPU 0), Frame : Return Address
0xffffff811c543aa0 : 0xffffff802c21d636 
0xffffff811c543b10 : 0xffffff802c29e54b 
0xffffff811c543b90 : 0xffffff802c2a2d60 
0xffffff811c543c50 : 0xffffff802c2a3595 
0xffffff811c543ca0 : 0xffffff802c26722c 
0xffffff811c543d90 : 0xffffff802c26b100 
0xffffff811c543dc0 : 0xffffff802c265bff 
0xffffff811c543df0 : 0xffffff802c60a723 
0xffffff811c543e10 : 0xffffff802c66d52c 
0xffffff811c543e50 : 0xffffff802c2943c3 
0xffffff811c543e80 : 0xffffff802c220b4d 
0xffffff811c543eb0 : 0xffffff802c210448 
0xffffff811c543f00 : 0xffffff802c21961b 
0xffffff811c543f70 : 0xffffff802c2a6546 
0xffffff811c543fb0 : 0xffffff802c2cf473 

BSD process name corresponding to current thread: powerd
Model: MacBookPro8,2, BootROM MBP81.0047.B27, 4 processors, Intel Core i7, 2.2 GHz, 8 GB, SMC 1.69f4
Graphics: Intel HD Graphics 3000, Intel HD Graphics 3000, Built-In, 512 MB
Graphics: AMD Radeon HD 6750M, AMD Radeon HD 6750M, PCIe, 1024 MB
Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1333 MHz, 0x80AD, 0x484D54333531533642465238432D48392020
Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1333 MHz, 0x80AD, 0x484D54333531533642465238432D48392020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0xD6), Broadcom BCM43xx 1.0 (5.106.98.100.17)
Bluetooth: Version 4.1.7f2 12718, 3 service, 13 devices, 3 incoming serial ports
Network Service: Wi-Fi, AirPort, en1
Serial ATA Device: APPLE SSD TS128C, 121.33 GB
Serial ATA Device: OPTIARC DVD RW AD-5970H
USB Device: hub_device, 0x0424  (SMSC), 0x2513, 0xfa100000 / 3
USB Device: BRCM2070 Hub, 0x0a5c  (Broadcom Corp.), 0x4500, 0xfa110000 / 5
USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x821a, 0xfa113000 / 7
USB Device: Apple Internal Keyboard / Trackpad, apple_vendor_id, 0x0245, 0xfa120000 / 4
USB Device: FaceTime HD Camera (Built-in), apple_vendor_id, 0x8509, 0xfa200000 / 2
USB Device: hub_device, 0x0424  (SMSC), 0x2513, 0xfd100000 / 2
USB Device: IR Receiver, apple_vendor_id, 0x8242, 0xfd110000 / 3

More info

Oct 16 15:19:05 francois-laptoplocal kernel[0] <Debug>: en1: BSSID changed to 00:18:4d:09:a8:b4
Oct 16 15:19:05 francois-laptoplocal kernel[0] <Debug>: en1::IO80211Interface::postMessage bssid changed
Oct 16 15:19:06 francois-laptoplocal kernel[0] <Debug>: AirPort: RSN handshake complete on en1
Oct 16 15:19:08 francois-laptoplocal kernel[0] <Debug>: AppleLMUController found an AG vendor product (0x9cb7), notifying SMC.
Oct 16 15:19:09 francois-laptoplocal kernel[0] <Debug>: virtual bool IOHIDEventSystemUserClient::initWithTask(task_t, void *, UInt32): Client task not privileged to open IOHIDSystem for mapping memory (e00002c1)
Oct 16 15:20:19 francois-laptoplocal kernel[0] <Debug>: CODE SIGNING: cs_invalid_page(0x1000): p=356[GoogleSoftwareUp] clearing CS_VALID
Oct 16 15:20:24 francois-laptoplocal kernel[0] <Debug>: BootCache: too many history clusters (150, limit 151)
Oct 16 15:20:24 francois-laptoplocal kernel[0] <Debug>: fsevents: watcher dbfseventsd (pid: 390) - Using /dev/fsevents directly is unsupported.  Migrate to FSEventsFramework
Oct 16 15:21:17 francois-laptoplocal kernel[0] <Debug>: CODE SIGNING: cs_invalid_page(0x1005df000): p=424[python] clearing CS_VALID
Oct 16 15:21:18 francois-laptoplocal kernel[0] <Debug>: CODE SIGNING: cs_invalid_page(0x108a2b000): p=425[python] clearing CS_VALID

In PyCharm, the file I was working one was replaced by:

<?xml version="1.0" encoding="UTF-8"?>
<application>
  <component name="NotificationConfiguration">
    <notification groupId="FindInPath" displayType="TOOL_WINDOW" shouldLog="false" />
    <notification groupId="External Executable Critical Failures" displayType="TOOL_WINDOW" />
    <notification groupId="Git Minor Notifications" />
    <notification groupId="Git Important Messages" displayType="STICKY_BALLOON" />
    <notification groupId="Git Messages" displayType="TOOL_WINDOW" />
    <notification groupId="IDE Usage Statistics" displayType="STICKY_BALLOON" shouldLog="false" />
    <notification groupId="update.available.group" displayType="STICKY_BALLOON" />
    <notification groupId="Database" displayType="TOOL_WINDOW" />
    <notification groupId="Django Data Sources Detector" />
    <notification groupId="Database log" displayType="NONE" />
    <notification groupId="Packaging" />
    <notification groupId="IDE Fatal Errors" displayType="NONE" />
    <notification groupId="JavaScript Library Management" displayType="STICKY_BALLOON" />
    <notification groupId="Project Loading Error" />
    <notification groupId="Mercurial Messages" displayType="TOOL_WINDOW" />
    <notification groupId="Mercurial Important Messages" displayType="STICKY_BALLOON" />
    <notification groupId="Browser Connection" displayType="STICKY_BALLOON" />
    <notification groupId="JavaScript debugger" displayType="TOOL_WINDOW" shouldLog="false" />
    <notification groupId="Execution" displayType="NONE" />
    <notification groupId="Skeletons" />
    <notification groupId="Debugger messages" displayType="TOOL_WINDOW" shouldLog="false" />
    <notification groupId="Test Runner" displayType="NONE" />
    <toolWindow group="Git Messages" />
    <toolWindow group="External Executable Critical Failures" />
    <toolWindow group="FindInPath" />
    <toolWindow group="Debugger messages" />
    <toolWindow group="JavaScript debugger" />
    <toolWindow group="Mercurial Messages" />
    <toolWindow group="Database" />
  </component>
</application>

The log files that you've posted aren't providing much good information regarding the crashes. The best clue from the logs may be this line (which could be indicative of OpenGL graphics context problems):

9/10/13 10:42:57.764 AM SystemUIServer[271]: It does not make sense to draw an image when [NSGraphicsContext currentContext] is nil.  This is a programming error. Break on void _NSWarnForDrawingImageWithNoCurrentContext() to debug.  This will be logged only once.  This may break in the future.

However, your description of the problem symptoms (the screen going black/grey; a red line appearing during boot) may point directly at graphics (video card) issues. Although it may be possible for you to perform some tests to pinpoint the problems, it may be worth having the machine examined by a qualified technician.

Using the Apple Hardware Test may help you to diagnose why the crashes are occuring. Alternately, there are some good freeware diagnostics available for OS X (Rember will test the RAM in your Mac).

If the problems are graphics/video related, you may be able to reproduce the issues by pushing the machine's graphics processor to perform. This can be accomplished by using some sort of high-end graphics application (one that heavily utilizes OpenGL). A potentially helpful option may be Cinebench

It's also possible that you're having problems related to graphics context switching. I might recommend trying to disable that option in the Energy Saver System Preference to see if the symptoms subside. More info on How to set graphics performance.


If you're getting kernel panics (which is what it sounds like to me), I'd try testing the RAM first. What I normally do is switch in some known good ram and see what happens, if you don't have access to different ram you can try memtest86, though I've seen it throw false fails when used on Macs.

I'd also use disk utility to check your hard drive - outside of bad ram and/or logic board, a failing hard drive can cause kernel panics. Even if disk utility says your drive is fine you can use a program like Data Rescue to analyze the hard drive and run some long read tests as I've seen failing drives pass as good in disk utility.

If the RAM is good and the hard drive is good, I'd recommend either a) backing up and doing a fresh OS install or b) if you have an external hard drive do a fresh install to that and boot from it. If the issue persists with a fresh install then you're guaranteed to have a hardware problem.

If your RAM is good and your hard drive is fine, then your last steps are to isolate the machine - disconnect optical drive, see if that makes a difference. Isolate bluetooth/wifi, see if that makes a difference. Disconnect display and connect to external monitor, see if that makes a difference. At this point you're already long-shotting though honestly, most of the time if your hard drive is fine and RAM is fine you're looking at a problem with the logic board. Good luck!