I'm attempting to implement a backup/restore functionality for my android application using Realm. After I restore the data from the backup, if I try to access any information (that would request data from realm), the app crashes `A/libc: Fatal signal 7 (SIGBUS), code 2, fault addr 0x9694d000 in tid 5047 (...), pid 5047 (...)`

Keep in mind that the after reopening the app, data is restored (so backup/restore works as expected apart from the crash)

This is my `RealmBackup` class

```
public class RealmBackup {

    private final static String TAG = RealmBackup.class.getName();

    private Context context;
    private Realm realm;

    public RealmBackup(Context context) {
        this.realm = Realm.getInstance(Realm.getDefaultConfiguration());
        this.context = context;
    }

    public void backup() {

        File exportRealmFile = null;

        File exportRealmPATH = context.getExternalFilesDir(null);
        String exportRealmFileName = "default.realm";

        // create a backup file
        exportRealmFile = new File(exportRealmPATH, exportRealmFileName);

        // if backup file already exists, delete it
        exportRealmFile.delete();

        // copy current realm to backup file
        realm.writeCopyTo(exportRealmFile);

        String msg = "File exported to Path: " + context.getExternalFilesDir(null);

        realm.close();

    }

    public void restore() {

        //Restore
        File exportRealmPATH = context.getExternalFilesDir(null);
        String FileName = "default.realm";

        String restoreFilePath = context.getExternalFilesDir(null) + "/" + FileName;

        copyBundledRealmFile(restoreFilePath, FileName);

    }

    private void copyBundledRealmFile(String oldFilePath, String outFileName) {
        try {
            File file = new File(context.getFilesDir(), outFileName);

            FileOutputStream outputStream = new FileOutputStream(file);

            FileInputStream inputStream = new FileInputStream(new File(oldFilePath));

            byte[] buf = new byte[1024];
            int bytesRead;
            while ((bytesRead = inputStream.read(buf)) > 0) {
                outputStream.write(buf, 0, bytesRead);
            }
            outputStream.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    private String dbPath() {

        return realm.getPath();
    }
}

```

And whenever I'm trying to backup/restore the data I'm simply calling `realmBackup.backup()` or `restore`. The problem, I believe is that the realm must be reopened after the restore occured with the new data, however, I'm unsure how to do that, I've tried using whether 

```
    Realm.init(this);
    RealmConfiguration config = new RealmConfiguration
            .Builder()
            .deleteRealmIfMigrationNeeded()
            .build();
    Realm.setDefaultConfiguration(config);

```

or simply `realm = Realm.getDefaultInstance();` but that didn't quite work.