Showing posts with label Apple. Show all posts
Showing posts with label Apple. Show all posts

Tuesday, 28 August 2012

What if Finder froze and crash in your Mac?



Today after I search on google for Finder crashing in my Mac, I found this brilliant solution.

From: http://www.statusq.org/archives/2011/08/16/3495/

Geeky post to help those who might be Googling for this stuff. To anyone who saw the title and came here hoping to read about an accident-prone safari guide, my apologies.I know people have mixed experiences with Mac OS X Lion, but for me it’s been almost all good, and I’m very happy with the upgrade.
I did, however, run into a curious problem today on one of my machines, which took a while to sort out. The Finder was crashing and rebooting repeatedly, each time asking me if I wanted to restore the windows it had been displaying before.
I tried all sorts of things: moving stuff off the desktop, deleting the Finder’s preferences file, unmounting drives, booting in safe mode… but in the end it proved to be the Trash that was causing the problem.
I started Terminal (which is always in my Dock, but you can start from Spotlight if you don’t have a Finder running) and did: 
sudo rm -rf ~/.Trash
…after which my world came back to normality again. (You’ll need to type your admin password).
Hope that’s useful for someone out there!

Monday, 21 May 2012

Compile ardrone SDK on ubuntu 12.04 -- error on video_codec/video_stage_ffmpeg_recorder



Recently I installed Ubuntu 12.04(precision pangolin) on my Mac OS X lion. As I would like to play with Parrot AR. Drone quadcopter platform, I have to install AR. Drone SDK firstly. Due to my colleague has made this SDK compile straight away on Ubuntu 11.10, I thought the same story happen on Ubuntu 12.04. Unfortunately, I encounter some video codec and recorder issue from ffmpeg and some library missing issue(e.g., libcwiid1.dev) .
Here I listed several issues I encounter when I compile this SDK on Ubuntu 12.04 as following:

In file included from ../../VLIB/../VLIB/video_controller.h:5:0,
from ../../VLIB/../VLIB/video_codec.h:4,
from ../../VLIB/video_codec.c:1:
../VP_Api/vp_api_picture.h:16:30: fatal error: libavutil/avutil.h: No such file or directory
compilation terminated.
make[4]: *** [../../Soft/Build/targets_versions/ffmpeg_Intel_PROD_MODE_Linux_3.2.0-24-generic-pae_GNU_Linux_gcc_4.6.3/video_codec.o] Error 1
make[3]: *** [all] Error 2
make[2]: *** [build_vlib] Error 2
make[1]: *** [all] Error 2
make: *** [build_libs] Error 2

Then I followed this link (https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide) to install ffmepg, and then compile SDK again. It seems like the above error is gone. However, I got the following error.

In file included from ../..//Soft/Lib/ardrone_tool/Video/video_stage_ffmpeg_recorder.c:43:0:
/usr/local/include/libavfilter/avfilter.h:992:19: fatal error: audio.h: No such file or directory
compilation terminated.
make
4: *** [../../Soft/Build/targets_versions/ardrone_lib_PROD_MODE_ffmpeg_Intel_Linux_3.2.0-24-generic_GNU_Linux_gcc_4.6.3/ardrone_tool/Video/video_stage_ffmpeg_recorder.o] Error 1
make
3: *** [all] Error 2
make
2: *** [build_lib] Error 2
make
1: *** [all] Error 2
make: *** [build_libs] Error 2

When I double check the ffmpeg library in my system, I found there are two identical header files about ffmepg in my system. One is under /usr/include/libavformat, the other is /usr/local/include/libavformat. By carefully comparing, they have different size even though their names are exactly the same. The one under /usr/include should be the latest one which are created when you follow the above ffmpeg link, while the other under /usr/local/include should be come with system. I just overwrite the system one by the latest one.

sudo cp -rf /usr/include/libavformat /usr/local/include

And then compile the SDK again, it passed the compilation. Hopefully it would help you as well.

By the way, if it keeps prompt you to install libcwiid1.dev when you are compilling, you can go to open ardrone_SDK/ARDroneLib/Soft/Build/check_dependencies.sh and then subtitute the libcwiid1.dev to libcwiid.dev, which works for me.

Friday, 18 May 2012

Mac Mail shows unread messages which I can not find

It really funny. I set up several mailboxes in mail on my Mac, one is google which works fine, another two are from my university which use Microsoft exchange server. At the beginning, everything works perfect. However, recently one mailbox using Microsoft exchange shows there are 1 unread message, and so does the inbox of my mail. But I cannot find any unread message in that mailbox, even on the server where I searched really carefully.

I searched on google, but I still have not solved this issue. There is a way to "solve" this issue to some extend.  At least, the mail on the dock shows the right number of the unread messages.

Mail -> Mailbox -> New Smart Mailbox, when you create a new smart mailbox, you are prompt to input the name of smart mailbox. I name it as "Unread messages"(Of course you can name whatever you want). And then choose the rule condition as "Message is unread". Now on the left panel of your mail there is a SMART MAILBOXES menu.

Then, Mail -> Preferences -> General -> Dock unread count, choose the smart mailbox you just created. Now the number of unread message on the dock is correct.

I am still keep my eyes on this issue, hopefully I could find a way to solve this issue soon.


Thursday, 17 May 2012

Triple OS on MacBook Pro8 2 -- missing operating system

Today I am trying to install Windows 7 64bit OS and Ubuntu 12.04 LTS 64bit OS on my Macbook pro (later 2011), I followed this link (http://lifehacker.com/5531037/how-to-triple+boot-your-mac-with-windows-and-linux-no-boot-camp-required) to install these extra two OS.

Everything goes well until I restart the computer to launch Ubuntu through rEFIt. When I restarted my Mac after installing windows and ubuntu, I can see three OS icon and I shift to ubuntu. After a screen flash, it pop up a black screen with one sentence on the top, say, missing operating system.

Initial guess is that Linux GRUB boot loader does not install properly, it might be corrupted by Windows MBR boot loader. Therefore a new boot loader should be created to make all OS can be detectable.

After several searching on google, I found this link (http://ubuntuforums.org/showthread.php?t=1908210) which solved my problem.  As this link addressed the whole installation procedure, given that we have already installed three operating systems, we only need to regenerate a boot loader if something is wrong when we start up computer.  I summarise them as following:

1) Download gdisk from here(http://sourceforge.net/projects/gptfdisk/)
2) Log in Mac OS
3) Open the "Terminal" in Mac OS (lauchpad->utility->terminal, or search from spotlight)
4) Run "sudo gdisk /dev/disk0"
5) Type 'r' and then 'p' to print out the partitions
6) Then type 'h' to create hmbr
7) Type in the partition number corresponding to different OS, for example, #2 for mac, #5 for windows and # 7 for ubuntu, you should type 2 5 7
8) Next select 'y' to place EFI partition first
9) Type in MBR hex code for each partition, usually 'AF' for lion, '07' for Windows and '83' for linux. You might notice that in your machine, the hex code for windows and linux are the same '07', it cause one system is missing which cannot be detected by current boot loader. Note that do not set any of the bootable flag.
10) Finally type 'w' and 'y' to update the MBR

Now when you restart your system, each OS should be working.

Good luck.

Wednesday, 24 August 2011

Can the legend of apple still go?

Today the biggest bomb news in technical area is no more than the god of apple, Steve Jobs, has stepped down from the CEO position. This guy, to be honest,  changed a lot of things in peoples' daily life. I can recall almost everyone just gets used to hold a iphone or ipad for information in the bus, in the public place, everywhere, everyday. Amazing ...

I just forwarded his resignation letter here.


To the Apple Board of Directors and the Apple Community: I have always said if there ever came a day when I could no longer meet my duties and expectations as Apple's CEO, I would be the first to let you know. Unfortunately, that day has come.
I hereby resign as CEO of Apple. I would like to serve, if the Board sees fit, as Chairman of the Board, director and Apple employee.
As far as my successor goes, I strongly recommend that we execute our succession plan and name Tim Cook as CEO of Apple.
I believe Apple's brightest and most innovative days are ahead of it. And I look forward to watching and contributing to its success in a new role.
I have made some of the best friends of my life at Apple, and I thank you all for the many years of being able to work alongside you.
Steve