Question: I am using coordinatorlayout in my android application and is defined as following 

```
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
                                             xmlns:tools="http://schemas.android.com/tools"
                                             android:layout_width="match_parent"
                                             android:layout_height="match_parent"
                                             android:theme="@style/Theme.AppCompat.Light.DarkActionBar"
                                             tools:context=".MainActivity">

<android.support.design.widget.AppBarLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar_activity_main"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="?attr/colorPrimary"
        android:elevation="4dp"
        android:theme="@style/ThemeOverlay.AppCompat.ActionBar">

    </android.support.v7.widget.Toolbar>
</android.support.design.widget.AppBarLayout>

<include
    layout="@layout/content_main"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:id="@+id/test"/>

```

The test layout is `LinearLayout` which has a further Views

The problem is that the actionbar is overlapping the content of the Test Layout

Could this because of the themes ? (which i personally dont feel ) but then not sure

Answer: 
1. Regarding `Segmentation fault`: As the error message *autorelease called without pool* reveals you have to wrap the code in an autorelease pool

```
@autoreleasepool {

    [[NSFileManager defaultManager] createFileAtPath:@"knownTimeZoneNames.txt" contents:nil attributes:nil];

    for (NSString *name in [NSTimeZone knownTimeZoneNames]) {
        [name writeToFile:@"knownTimeZoneNames.txt" atomically:YES encoding:NSUTF8StringEncoding error:nil];
        //NSLog(@"The time zone is %@", name);
    }
    return 0;
}

```
2. I don't know where you want to write the file but a path must start with a slash and in iOS you have to get programmatically one of the directories you have permission to write into.
3. And even if the other issues are resolved your resulting text file will contain just **one** line (the name of the last iteration). To get all names – one per line – use this instead of the repeat loop

```
NSArray *nameArray = [NSTimeZone knownTimeZoneNames];
NSString *names = [nameArray componentsJoinedByString:@"\n"];

```
Please, try this

```
for (NSString *name in [NSTimeZone knownTimeZoneNames]) {
     // You was trying to pass chars, but you have to pass string.   
    [name writeToFile:@"knownTimeZoneNames.txt" atomically:YES encoding:NSUTF8StringEncoding error:nil];
    //      NSLog(@"The time zone is %@", name);
}

```