I want to get the dimensions of the main screen, so I use this snippet:
NSLog(@"mainScreen frame = %@", [[NSScreen mainScreen] visibleFrame]);
It's printing
mainScreen frame = (null)
Earlier it was printing the expected dimensions of my main monitor.
What are some possible causes of this?