Ubuntu 18, SQLITE_CORRUPT

Have been trying to get Joplin running on Ubuntu 18 synced via Dropbox from a Windows PC. The sync kept getting stuck around 1276 items. I removed all the .config settings, and downloaded the appimage again and got the same issue. I left the previous install running for 7 days and it never got past 1276 items.

So, I have enabled debug mode, and have found this in the log:

2018-07-30 13:11:23: "Sync: createLocal: remote exists but local does not: (Remote 74f7d23b80fa48165e56fd6193e83ae3.md)"
2018-07-30 13:11:23: "Reducer action", "SYNC_REPORT_UPDATE"
2018-07-30 13:11:23: "get .resource/74f7d23b80fa48165e56fd6193e83ae3"
2018-07-30 13:15:35: "Running background sync on timer..."
2018-07-30 13:15:35: "Scheduling sync operation..."
2018-07-30 13:15:35: "Preparing scheduled sync"
2018-07-30 13:15:35: "Starting scheduled sync"
2018-07-30 13:15:36: "Error: Error: SQLITE_CORRUPT: database disk image is malformed: 
				SELECT items.`id`,items.`parent_id`,items.`title`,items.`body`,items.`created_time`,items.`updated_time`,items.`is_conflict`,items.`latitude`,items.`longitude`,items.`altitude`,items.`author`,items.`source_url`,items.`is_todo`,items.`todo_due`,items.`todo_completed`,items.`source`,items.`source_application`,items.`application_data`,items.`order`,items.`user_created_time`,items.`user_updated_time`,items.`encryption_cipher_text`,items.`encryption_applied`
				FROM `notes` items
				WHERE id NOT IN (
					SELECT item_id FROM sync_items WHERE sync_target = 7
				)
				AND is_conflict = 0 AND encryption_applied = 0
				LIMIT 100
			: 
Code: SQLITE_CORRUPT
Error: Error: SQLITE_CORRUPT: database disk image is malformed: 
				SELECT items.`id`,items.`parent_id`,items.`title`,items.`body`,items.`created_time`,items.`updated_time`,items.`is_conflict`,items.`latitude`,items.`longitude`,items.`altitude`,items.`author`,items.`source_url`,items.`is_todo`,items.`todo_due`,items.`todo_completed`,items.`source`,items.`source_application`,items.`application_data`,items.`order`,items.`user_created_time`,items.`user_updated_time`,items.`encryption_cipher_text`,items.`encryption_applied`
				FROM `notes` items
				WHERE id NOT IN (
					SELECT item_id FROM sync_items WHERE sync_target = 7
				)
				AND is_conflict = 0 AND encryption_applied = 0
				LIMIT 100
			: 
    at DatabaseDriverNode.sqliteErrorToJsError (/tmp/.mount_JoplinJSV03Q/app/resources/app/lib/database-driver-node.js:22:16)
    at JoplinDatabase.sqliteErrorToJsError (/tmp/.mount_JoplinJSV03Q/app/resources/app/lib/database.js:26:24)
    at JoplinDatabase.tryCall (/tmp/.mount_JoplinJSV03Q/app/resources/app/lib/database.js:89:17)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)"````

I have opened the database in DB Browser and it seems to read all ok. Have also set auto sync to never.