How to diagnose a graphic looking bug?

I got the following strange image on both low corners of 2 application windows:

  • Firefox (22)
  • Preview (MacOS X)

screen capture of lower left corner graphic grey box

This strange image is following the windows corners when I move them. This is occuring on a MacBookPro6,2 (mid 2010), running MacOS X 10.6.8 fully updated. This image can be captured (cmd ⌘+shift ⇧+4).

Context

The mother board and video card were replaced by an Apple Store.

Since I got it back 3 days ago, this MBP has been up and running and heavily tested. It went through many graphical use without a problem during 3 full days.

This event happened a few minutes after an exit from hybernation where the battery was totally exhausted.

Graphic cards:

  • Intel HD Graphics: rev 0x0018
  • NVIDIA GeForce GT 330M: rev 0x00a2

This problem occured arround 08:20. Here the nearby content of /var/log/kernel.log:

Aug  6 22:48:49 my__MBP kernel[0]: AirPort: Link Up on en1
Aug  6 22:49:26 my__MBP kernel[0]: en1: 802.11d country code set to 'FR'.
Aug  6 22:49:26 my__MBP kernel[0]: en1: Supported channels 1 2 3 4 5 6 7 8 9 10 11 12 13 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140
Aug  6 23:03:31 my__MBP kernel[0]: hfs: Initializing the journal (joffset 0x3000 sz 0x80000)...

Aug 7 08:00:13 my__MBP kernel[0]: hibernate image path: /var/vm/sleepimage Aug 7 08:00:13 my__MBP kernel[0]: sizeof(IOHibernateImageHeader) == 512 Aug 7 08:00:13 my__MBP kernel[0]: Opened file /var/vm/sleepimage, size 4294967296, partition base 0xc805000, maxio 400000 ssd 0 Aug 7 08:00:13 my__MBP kernel[0]: hibernate image major 14, minor 2, blocksize 512, pollers 5 Aug 7 08:00:13 my__MBP kernel[0]: hibernate_alloc_pages flags 00000000, gobbling 0 pages Aug 7 08:00:13 my__MBP kernel[0]: hibernate_setup(0) took 0 ms Aug 7 08:00:13 my__MBP kernel[0]: AirPort: Link Down on en1. Reason 8 (Disassociated because station leaving). Aug 7 08:00:13 my__MBP kernel[0]: System SafeSleep Aug 7 08:19:17 my__MBP kernel[0]: hibernate_page_list_setall start 0x450cb000, 0x450ea000 Aug 7 08:19:17 my__MBP kernel[0]: hibernate_page_list_setall time: 397 ms Aug 7 08:19:17 my__MBP kernel[0]: pages 988881, wire 137387, act 328832, inact 12950, spec 0, zf 9189, throt 0, could discard act 130843 inact 255304 purgeable 25377 spec 88999 Aug 7 08:19:17 my__MBP kernel[0]: hibernate_page_list_setall found pageCount 488358 Aug 7 08:19:17 my__MBP kernel[0]: IOHibernatePollerOpen, ml_get_interrupts_enabled 0 Aug 7 08:19:17 my__MBP kernel[0]: IOHibernatePollerOpen(0) Aug 7 08:19:17 my__MBP kernel[0]: writing 486856 pages Aug 7 08:19:17 my__MBP kernel[0]: encryptStart 541a70 Aug 7 08:19:17 my__MBP kernel[0]: encryptEnd 4e56560 Aug 7 08:19:17 my__MBP kernel[0]: hibernate_machine_init: state 2, image pages 137257, sum was 7d2d0110, image1Size 9911400, conflictCount 403, nextFree 996 Aug 7 08:19:17 my__MBP kernel[0]: hibernate_page_list_discard time: 265 ms, discarded act 130843 inact 255304 purgeable 25377 spec 88999 Aug 7 08:19:17 my__MBP kernel[0]: IOHibernatePollerOpen(), ml_get_interrupts_enabled 0 Aug 7 08:19:17 my__MBP kernel[0]: IOHibernatePollerOpen(0) Aug 7 08:19:17 my__MBP kernel[0]: hibernate_machine_init reading Aug 7 08:19:17 my__MBP kernel[0]: PMStats: Hibernate read took 9038 ms Aug 7 08:19:17 my__MBP kernel[0]: hibernate_machine_init pagesDone 488202 sum2 c5a58d42, time: 9038 ms Aug 7 08:19:17 my__MBP kernel[0]: Wake reason = Aug 7 08:19:17 my__MBP kernel[0]: System SafeSleep Wake Aug 7 08:19:17 my__MBP kernel[0]: Previous Sleep Cause: -60 Aug 7 08:19:17 my__MBP kernel[0]: Previous Shutdown Cause: -60 Aug 7 08:19:17 my__MBP kernel[0]: com_apple_driver_AppleUSBCardReaderUMC:: Stop::Controller Reset Aug 7 08:19:17 my__MBP kernel[0]: en1: 802.11d country code set to 'X3'. Aug 7 08:19:17 my__MBP kernel[0]: en1: Supported channels 1 2 3 4 5 6 7 8 9 10 11 12 13 36 40 44 48 52 56 60 64 100 104 108 112 116 132 136 140 Aug 7 08:19:17 my__MBP kernel[0]: USBMSC Identifier (non-unique): 000000009833 0x5ac 0x8403 0x9833

Solution 1:

You told this happened after you restored your running system from hibernation that was caused by a depleted battery. I suspect this to be the problem.

The battery charging status is indirectly measured by the voltage. When nearly drained, Lithium batteries cannot provide the needed current to power all the computers components. This may crash your system as some components fail but it is also possible that it causes memory corruption. This is called a brownout. Additionally this might be caused by Power Management errors. If this continues happening, reset you SMC.

Around the time this happened the computer began to save the contents of the RAM (and also the VRAM? Please correct me!) to disk and power down the system. In case the memory was already damaged, the hibernation image also contains some garbage. Restoring might cause such symptoms.

Solution 2:

Looks like an issue with GPU drivers. I have such issues on other machines with other versions of OSX time to time. Most of them are likely addressed in next versions of OSX.

I would start with checking Console.app. Various subsystem might log some useful information.

Solution 3:

Best way to test if it is hardware or software is to use a fresh install. If you have your original CDs that came with the MacBook Pro, or the Snow Leopard upgrade cd, you can install Snow Leopard to an external hard drive and try to reproduce the issue in that second copy of Mac OS X.

If it is reproducible, it's hardware, if it won't re-occur, it's software.

If it is software, you can do an archive and install of Mac OS X and see if that resolves it. If not, then you may need to reinstall the Operating System completely and copy all your files back on manually.

If you want a step by step guide for running an Archive and Install, let me know and I'll write one up for you!

Honestly though, since this is right after a repair from an Apple Store, if you rule it down to software, go in and ask them to Archive and Install it if you have the time. That way they'll document it, and if it comes back or anything down the track, you can point them at their repair history and get them to cover it since it was documented while in Warranty and immediately after a repair!

After all, checking in a second install only really works if the issue is reliably reproducible.

Let me know if I can elaborate on anything!

Solution 4:

Shutdown Cause: -60

This shutdown code is usually related to bad master directory block (badMDBErr).

So you can try to:

  • Run First Aid from the Disk Utility to check your HD (or fsck from Safe mode).
  • Reset the System Management Controller (SMC).

If above won't help, you are advised to back up your data, erase the disk and reinstall OS X.

Otherwise, you should take your MBP to repair again, as normally they give you ~21 days if there're some issues with your replaced hardware.

See: Are OS X shutdown cause and sleep cause numbers listed/explained anywhere?

See also: What is shutdown cause -60?