Answering my own question: I talked to MATLAB support about this, and I thought I'd post here in case other people had the same issue.
At first they thought that one possible cause might be insufficient stack size on the model thread. They suggested running the following command in MATLAB before compiling the model and then running it:
>>set_param(gcs, ‘TLCOptions’, ‘-axPCModelStackSizeKB=512’)
This command allocates 512 KB stack size for the model thread.
After I did this, I got a different error:
RTTarget-32 CPU Exception: 0010 0.000000
Apparently this was due to a bug in MATLAB 2013b, so they sent me a patch fix the issue. If you're seeing the same thing, you should probably file a support ticket because you might be running into the same thing.