This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Bash seg faulting?

Here is a strange one.   I have two scripts, and conv.bat that do the same thing: scan the current directory for
.doc files and convert them to .docx files.  Here are the two scripts.

$ cat

OFFICE_BIN="C:\Program Files (x86)\Microsoft Office\root\Office16"

for doc in *.doc; do
        echo "converting: $doc"
        "$OFFICE_BIN"/Wordconv.exe -oice -nme "$doc" "${doc}x"

$cat conv.bat
@echo off
set OFFICE_BIN=C:\Program Files (x86)\Microsoft Office\root\Office16

for %%a in ("*.doc") do (
        rem This is necessary because *.doc can match *.docx! Need to check the actual extension.
        if "%%~xa" == ".doc" (
                echo "converting: %%a"
                "%OFFICE_BIN%\Wordconv.exe" -oice -nme "%%a" "%%ax"a

When is run on a directory containing three .doc files, the conversions work but I get three seg faults at three
different locations.  E.g.

converting: Post-Install.doc
./ line 5:  6060 Segmentation fault      "$OFFICE_BIN"/Wordconv.exe -oice -nme "$doc" "${doc}x"
converting: Post-InstallB.doc
./ line 5: 13264 Segmentation fault      "$OFFICE_BIN"/Wordconv.exe -oice -nme "$doc" "${doc}x"
converting: Post-InstallTest.doc
./ line 5: 13260 Segmentation fault      "$OFFICE_BIN"/Wordconv.exe -oice -nme "$doc" "${doc}x"

When conv.bat is run in the same directory, the conversions work and I don't get any seg faults (or they are not being
reported!)  E.g. 
$ conv.bat
"converting: Post-Install.doc"
"converting: Post-InstallB.doc"
"converting: Post-InstallTest.doc"

Now Wordconf.exe is a 32-bit executable running on a Windows 10 Pro 64-bit installation.

My cygcheck.out is attached.  I guess I can get an strace if need.


Attachment: cygcheck.out
Description: Binary data

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]