The program hits both applicationDidFinishLaunching & initWithWidth. Actually when the program stopped at breakpoints then I continued, it worked!!! But it didn't work when run directly from the beginning without breakpoints.
I know it sounds really strange -- my guess was that it's not a compilation issue logically explainable, but potentially library or driver issues. (By using breakpoints, I could avoid some timer-out since the program stops in the middle of program more than a few tens seconds)
So, I uninstalled xcode & some experimental programs I recently installed, and reinstall xcode only.
Now everything works fine. 🙂
I learned that library issues (outside of xcode) may cause hard-found problems.
Thanks anyway for the tips.