Cannot compile linux project on mac

ji
jimmy tidey
Posts: 1
Joined: Tue Sep 13, 2016 6:53 am
Platform: Mac + Linux

Tue Sep 13, 2016 7:14 am Post

I'm trying to compile a project, but it hangs before it completes. Sometimes it says 'converting file format' next to the progress bar, sometimes not, but in either case it never finishes.

There are two weird things about the file, one is that I'm using .git for version control. It tracked some lock files and checksums that were obviously causing a problem, so I untracked them and used the .gitignore as described here: http://kpower.me/2013/08/26/scrivener-with-git.html

The second is that I created it on Linux, but I'm trying to compile it on mac.

Finally, when I open the file for the first time on the mac, it gets stuck creating a search index. If I kill scrivener and open again it all seems fine, perhaps a clue as to what is happening.

I have reinstalled scrivener on the mac, and I can compile other projects.

Any clues? Obviously rather frustrating if I can't compile my work!

User avatar
AmberV
Posts: 20584
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Santiago de Compostela, Galiza
Contact:

Thu Sep 15, 2016 6:38 am Post

That sounds to me like some kind of problematic resource in the project. It’s hard to say, but both Compile and rebuilding the search index would require opening many files from the disk, ones you likely don’t come across yourself in regular usage. In other words a file with a bad image or some weird formatting in it might lay around for years, only to be opened when you compile. It might be something that works fine on Linux, but trips up on the Mac—the code is completely different as are the frameworks, so that wouldn’t be a surprising outcome.

I’d try scaling back complexity with a short series of test compiles:

  • Plain-text. This will naturally strip out all formatting, including images. If the fault is in either of those, this will work.
  • RTF. Scrivener’s native format, everything else is a conversion of some sort, and involving different chunks of code as a result, either from Apple or via a built-in third-party conversion engine. If RTF works, but ODT consistently crashes, then the fault is in the converter somewhere.
You can start looking along the lines of content being the trigger, if RTF crashes but TXT does not. The most efficient way to do that will be to compile the project in halves, focussing on the half that crashes until you get it down to a few candidate files. If it’s a very large project, I’d also check for quantity. Maybe in halves it always compiles but as a whole it doesn’t—in that case you may be running out of memory. The crash log would almost certainly indicate that.

One thing I would do before any of the above is save my current compile settings to a preset (optional if you’d miss any work put into it) via the “Format As” menu in Compile, then close the project and navigate to it in Finder. Right-click on the project, select “Show Package Contents”, then drill down into Settings and remove the “compile.plist” file (the .ini file if there is one you can leave alone, only the Win/Linux version uses that). Reload the project and compile again using default settings. If it still crashes, feel free to load the preset back in. Keeping your settings simple during testing will be beneficial however.

By the way, the Mac version is triggering a search index rebuild on account of the mismatching checksum, if I understand your setup correctly. It’s no big deal, it’s just s safeguard against data drifting from the index. Of course that presumes it doesn’t crash when doing so. :)
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles