'Crash' on MMD --> latex compile

I’ve recently upgraded to MMD 4.0b. Using Scrivener 2.4.1.

Today I went to compile a document using the MMD --> Latex setting. I set the export file name and hitting Export.

The compile progress bar fills blue, then striped. The compile window closes and there’s a ‘Scrivener quit unexpectedly’ message (even though it’s very much still open).

Looking in Finder, the .tex folder has been created, and the linked images are all there, along with a .tex file. However, the tex file is empty.

If I try a straightforward compile to MMD it all works fine. So I’m presuming something is going wrong with the link to the MMD processor. And presumably broken by the upgrade to MMD 4.0b.


The crash log follows:

Process: Scrivener [51447]
Path: /Applications/Scrivener.app/Contents/MacOS/Scrivener
Identifier: Scrivener
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: Scrivener [39578]

Date/Time: 2013-05-13 21:22:57.015 +0100
OS Version: Mac OS X 10.7.5 (11G63)
Report Version: 9

Interval Since Last Report: 13406552 sec
Crashes Since Last Report: 10689
Per-App Crashes Since Last Report: 5
Anonymous UUID: CB916EAB-4F28-4DDC-8B5C-D54BE0891EDE

Crashed Thread: Unknown

Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000

Backtrace not available

Unknown thread crashed with X86 Thread State (64-bit):
rax: 0x000000140003000e rbx: 0x0000000000000000 rcx: 0x0000000000000000 rdx: 0x0000000000000000
rdi: 0x0000000000000000 rsi: 0x0000000000000000 rbp: 0x5fc0102800000000 rsp: 0x0000000000000000
r8: 0x0000000000000000 r9: 0x0000005500000000 r10: 0x0000000000000000 r11: 0x0000000000000000
r12: 0x0000000000000000 r13: 0x0000000000000000 r14: 0x0000000e00000000 r15: 0x0000000000000000
rip: 0x00007fff5fc01028 rfl: 0x0000000000010202 cr2: 0x0000000000000000
Logical CPU: 0

Binary images description not available

External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 66892
thread_create: 1
thread_set_state: 0

Model: MacBookPro8,1, BootROM MBP81.0047.B27, 2 processors, Intel Core i7, 2.7 GHz, 4 GB, SMC 1.68f99
Graphics: Intel HD Graphics 3000, Intel HD Graphics 3000, Built-In, 384 MB
Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1333 MHz, 0x80CE, 0x4D34373142353737334448302D4348392020
Memory Module: BANK 1/DIMM0, 2 GB, DDR3, 1333 MHz, 0x80CE, 0x4D34373142353737334448302D4348392020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0xD6), Broadcom BCM43xx 1.0 (
Bluetooth: Version 4.0.8f17, 2 service, 11 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en1
Serial ATA Device: ST9500325ASG, 500.11 GB
USB Device: hub_device, 0x0424 (SMSC), 0x2513, 0xfd100000 / 2
USB Device: USB2.0 Hub, 0x05e3 (Genesys Logic, Inc.), 0x0608, 0xfd120000 / 4
USB Device: composite_device, 0x1241, 0x1166, 0xfd123000 / 7
USB Device: Hub in Apple Extended USB Keyboard, apple_vendor_id, 0x1003, 0xfd122000 / 6
USB Device: Apple Extended USB Keyboard, apple_vendor_id, 0x020c, 0xfd122300 / 9
USB Device: USB2.0 Hub, 0x05e3 (Genesys Logic, Inc.), 0x0608, 0xfd121000 / 5
USB Device: d2 quadra (button), 0x059f (LaCie), 0x1014, 0xfd121300 / 8
USB Device: IR Receiver, apple_vendor_id, 0x8242, 0xfd110000 / 3
USB Device: hub_device, 0x0424 (SMSC), 0x2513, 0xfa100000 / 3
USB Device: BRCM2070 Hub, 0x0a5c (Broadcom Corp.), 0x4500, 0xfa110000 / 5
USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x821a, 0xfa113000 / 7
USB Device: Apple Internal Keyboard / Trackpad, apple_vendor_id, 0x0253, 0xfa120000 / 4
USB Device: FaceTime HD Camera (Built-in), apple_vendor_id, 0x8509, 0xfa200000 / 2


Thanks. Scrivener hasn’t been tested against MMD 4.0 just yet and probably won’t be for a few weeks or so yet, but I’ll get Ioa (our resident MMD expert) to look at this and try to track down the issues involved.



One thing Ioa noticed in your crash report was this line:

That’s strange - it’s not reporting the version number. When you go to Scrivener > About Scrivener, what version number do you see? Likewise, when you ctrl-click on Scrivener in the Finder and select “Get Info”, what version number do you see there?

Thanks and all the best,

Given that and the type of crash involved, it might be a good idea to reinstall the software anyway, just to make sure there isn’t a UI glitch. The software files aren’t always terribly reliable on a Mac for some reason. Reinstalling can clean up weird issues. It probably also wouldn’t hurt to reboot if that hasn’t been done in a while. The crash log is pretty low level, that’s why I wonder if maybe there is just a bad RAM block or something that will go away after a reboot.

There is another process you can test that uses a similar approach (of calling UNIX utilities) and that is KindleGen output for Mobi files. If you have that installed and operational, can you test and see if that crashes the software too?

Right, a bit more investigation.

  1. Scrivener version 2.4.1 (22817).

  2. Restarted, deleted Scrivener and reinstalled from fresh download. Still seeing the same problem with MMD --> Latex compile.

  3. Kindlegen works fine, producing a mobi file which is full of content.

  4. Checking the other MMD compile routes:

  • Plain MMD: looks OK.
  • MMD --> rtf: doesn’t crash, but the rtf file is empty.
  • MMD --> html: crashes, producing an empty (0 Kb) HTML document.
  • MMD --> fodt: crashes, producing an empty fodt document.

For each of the html, fodt, and latex compiles the enclosing folder is created and all the linked images are exported into that folder.

Okay try this:

  1. Compile to plain MMD to Desktop with the name “test.md”
  2. Open Terminal and copy and paste the following (note this command assumes you have a compile folder being created when compiling):
cat ~/Desktop/test.md/test.md | multimarkdown -t latex > ~/Desktop/test.md/test.tex

Okay that roughly mimics the process Scrivener uses, with the advantage of seeing any command-line errors that might be produced. Then see if the test.tex file in the compile folder has the correct content.


That does two things:

  1. Creates a test.tex file of 0 bytes - empty

  2. In the Console returns

Illegal instruction: 4

However, if I open test.md in MultiMarkdown Composer and Export to Tex then I get test.tex with all the correct content in.

MMD Composer, like Scrivener, has its own built-in copy of MMD. What I don’t know is whether it switches to an external installation if one exists. Scrivener will do so, so that you can keep MMD up to date between Scriv releases. So it could be your installed MMD is damaged, and if MMD Composer doesn’t use it, it’ll continue working. I would try re-installing first. The error symptom is very strange, but it doesn’t seem to indicate that anything is wrong with the .md file itself.

Just installed MMD 4.1, and that appears to have solved the problem with compiling MMD --> Latex.

Much relieved. Thanks for your time on this mysterious one.

I suppose I need to start familiarising myself with this new beast.