Bus Error or Segmentation Fault when opening read-only mwk files in Python

Symptom: Python Module mworks.data (_data.so to be precise) expects writable mwk files. If the mwk files are read-only, it gives Bus Error or Segmentation Fault when open() is called (as of 7/21/2010 Nightly Build).

Workaround: Apparently, make the read-only mwk files writable. If you’re not the owner of the files, copy them into your directory, and try again.

Reason: In stream_file.c of Project mw_scarab, there is a function called filestr_connect(). This is the actual function that opens mwk files. The default opening mode is “r+” (line 74 as of 7/21/2010), which requires writable permission. If the mwk file is not writable, fopen() gives NULL pointer, and this eventually causes the problem.

Hi Ha,

Thanks for the bug report. I pushed a fix for this to GitHub. It will be in the nightly build starting tonight.

Chris