[LH3897] BUG (serious): program crashes when compiling

I have problems when I try to compile my files. The software crashes after indicating the file name. It simply exits to windows, no error, no save. The compiled file isn’t created, but if it was supposed to replace a file, the old file is deleted.

I don’t have this issue with the tutorial, but compile has suddenly stopped working, even for files that worked yesterday, including my fresh test file.

My files are copies from a master, so even if I make a fresh copy I have the issue. Of course the master compiles fine in Mac OS.

I have the issue with both my main current project and the test file I created yesterday to reports other bugs.

It seems to have started after I exported a custom compile format from mac OS and imported it in Windows, but it could be a coincidence.

What I’ve tried:

  • Different formats, including default ones: crash
  • Deleting all custom compile formats: crash
  • Try other compile outputs (word, PDF, etc): crash
  • All sections set to “as is”: crash
  • Standard uninstall / reinstall of beta 20 with all default settings: crash
  • Clean uninstall / reinstall of beta 20 (delete all Scrivener system folders, registry entries etc): crash
  • Tried on a different windows install as I have the beta installed both in bootcamp and in my win10 VM in mac OS (unfortunately, the custom format exported from mac OS had already been imported in both windows installs): crash

I have no idea what is causing this.

I attach the custom compile format that might have caused this, as it’s the only compile-related explanation I can think of. If you can compile the test project I sent to support yesterday after importing it, then I guess my theory that it might cause the issue is not founded.

WARNING to other users: please do NOT download this file and import it, it might hose your scrivener install beyond repair.

STM KDP Print (6 x 9).zip (5.4 KB)

Hi Manni,

I have tried compiling the test project you sent with the custom format you included here and have not replicated the error. This means it is most likely something specific to your setup.

Where are you creating your compiled documents? Does changing the destination folder cause any change?

Are you still able to compile the Tutorial project in both of the installs you mentioned, or do those now crash as well?

Hi Bryan,

Thanks for taking the time to try to reproduce. Good to know that there’s nothing wrong with the custom compile format., though now I have even less of an idea of what’s causing this.

Both installs work fine with the tutorial, I can compile without any problem.

The weird thing is that apart from exporting/importing this custom profile, I haven’t changed anything to either install. No windows update (that I’m aware of), no new software install, no change in Scrivener settings either. Compile was working with both my test project (as you know as I had attached the compiled PDF in the test archive) and on my current manuscript. These files haven’t changed either, because I always make a fresh copy from the Mac OS “master” before playing with the Windows beta. So deleting the current Windows working copy and copy/pasting the current Mac OS “master” always brings me back to a “fresh” stage.

Yes compiling to another location doesn’t make any difference. I tried to compile to the desktop, the tutorial compiles fine there, but not the other two files.

Both files still compile fine with Scrivener Mac, so they are clearly not corrupted.

I could try to compile a file that I haven’t touched in a long while, to see if it’s only these two files or if there are more.

Is there a log generate by the software that could help debug this? Crashing out to Windows is not something I’ve seen Scrivener do, ever.

You can go into Options > General > Warnings and set Show internal error alerts. That should produce a log.

Thanks, In the meantime had found the scrivenerlog.bat file that seems to do mostly the same.

Unfortunately when the software crashes it also closes the DOS log window. As I can’t find a log.txt anywhere, I tried to redirect the batch output to a text file but that didn’t work either.

So I used Camtasia to record the log output to have the time to look at it before Scrivener crashes. It simply loads the first documents to compile, and stops after one of them, but there is no error message in the log itself regarding compile. I only have the Info: lines, from Loading document to Full load time, included for the last loaded file. I can send you the video if you want but I doubt you’ll get much from it. The only warning I could see were before compile started and were about iCCP: known incorrect sRGB profile.

The good news is that I can now compile the test project, at least on one of the installs (I haven’t checked the other).

So maybe there is something in the manuscript that Scrivener Windows can’t process when Scrivener Mac can. Again, what’s very weird is that I haven’t changed that project before it stopped working in Windows, and it used to be able to compile it fine.

EDIT: I tried another project that I definitely didn’t edit recently, and it crashes also when compiling in Windows.

I have tried to compile a backup of the same project from last month (20th of July) and I can compile that older version fine.

So in some ways this project (and others) must have been corrupted, yet as I only use Scrivener Windows to edit the master and only use the Windows beta on temp copies, I don’t know why the master is no longer compilable.

Are any of the projects interacting with a syncing service at all? Like Dropbox?

Yes, they are in Dropbox but the PC version can’t mix up with the Mac version as they are distinct projects. The mac OS software is the only one to access the “master” project, so there can’t be any sync issue on the Mac side. If there was any sync issue with the copy of the project used by the PC version, deleting it and making another copy from the master (once the deleted files are all synced) “resets” any possible sync errors. I never opened the Mac “master” file with the windows beta. Only a working copy. This is why I don’t see how the “master” could have got corrupted.

Also, it doesn’t explain why the “master” still compiles fine with the Mac OS software. That same project that the mac OS software compiles fine, once copied, can’t be compiled with the PC version, This doesn’t make sense.

This isn’t fixed in beta 21 / RC1.

In case it matters, although the projects that cause Scrivener 3.0 PC to crash compile fine in Mac OS, I noticed that they take a long time (around 30 seconds) between the end of the first progress bar and the beginning of the generation process (where you can see the increasing page count).

Maybe I should post this as a bug in the Mac OS version? If the long delay is fixed in Mac OS, maybe that would fix the issue in the PC version as well?

Of course it’s not acceptable that the program crashes, so it would have to be fixed here anyway.

Please advise on the way forward. If this compile bug can’t be fixed, I won’t spend more time debugging the betas/RC here as the PC version will be useless to me, especially as none of the other compiling issues I experience (when the software doesn’t crash) have been fixed either.

Please, send a project with only few files if possible(or the full project) to tiho at literatureandlatte.com to investigate this further. This will be the best way to reproduce and fix the crash.

Hi Tito,

Thank you for your reply.

Unfortunately I can’t send the full project due to confidentiality reasons. The smaller project I have made specifically to report all the other uncorrected bugs does compile fine, but my two main projects (one published book, another unpublished yet) do not. I guess it might have something to do with the size of the project, or the fact that it’s originally a mac project.

For a brief time the smaller test project had the same issue, but then it started compiling fine.

I understand it’s not easy for you to fix if you can’t replicate.

I forgot to say in my previous post that I have installed beta 21 on a clean install of Windows 10 Pro x64, with all default settings, and the issue was there right away. This rules out any problems due to previous betas or corrupt windows installs.

If you have a large project that you can share and that compiles fine your end, I can try to compile it here to see if it’s specific to my install or not, though I don’t see how this could be possible as it .

The other thing that we could do is try a previous beta, but as they are time limited this isn’t possible with the existing installation files. As both my projects used to compile fine with previous betas (pre-20), it would help us to see if it’s something you changed in beta 20 or if it’s the files that are different for some reason (which could be due to Scrivener Mac, as the master files are on Mac OS, I only ever work on copies with the PC betas).


I’ve got a huge project. 11.2 GB. Compiling takes forever. May even be hanging Scrivener; I don’t know. An hour’s wait (I went shopping), and it was still compiling, and nothing was written to disk yet. I stopped the compile and tried something else.

However, after I limited compile to 2 chapters and contents, my 245k words with multiple graphic images interspersed compiled just fine using your compiler settings file (I checked it first. It’s got some oddities that I didn’t expect in an XML doc, but it worked fine). The resulting PDF is 1511 pages, 10 MB, and Windows Explorer chokes on it (Adobe Reader reads it just fine; Explorer essentially crashes, and reboot is required).

I suspect there may be issues with the file-writing code. Explorer shouldn’t choke on a 10 Meg PDF.

Windows 10.
Scrivener Beta 21.

This is a different issue, so I suggest you open a different thread if you want it logged. My manuscripts are much smaller (less than 500 pages, a 2MB PDF) and I can reproduce this issue even with the manuscript reduced to a small size, as explained below.

Thanks for posting though because I did more tests trying to compile a selection only and was able to identify the issue at the very beginning of the book, in the introduction section.

If I try to compile any section before it as a selection, compile works fine. As soon as Introduction is selected, compile crashes.

I’ve made a small copy of the manuscript with only the beginning for Tiho and I’m going to email it to him.

Thanks again for posting :slight_smile:

Thanks to Manni, we found a problem which caused a crash during compile in rare cases. Thank You, Manni! This has been fixed and will be available in the next update.
In the current version this can be avoided sometimes, if you change the compile format or the compile file type, close the Compile dialog and open it again.

You’re welcome, glad I could help.

Waiting to hear about the other outstanding issues reported over the last few betas that are still not fixed in RC1.

I’m happy to confirm that this crash during compile issue is fixed in beta 22 / RC2. Thanks!

However all the other outstanding issues are still present, so I’ll update each thread.

Tiho, I’ll email you a compiled PDF of the project I sent you last week to illustrate all the outstanding issues, as they can all be reproduced with that project as well as the test project I emailed earlier previously to Bryan.

I also have some new issues that I didn’t have in previous betas, so I’ll document that in new threads.