Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


InDesign Server crashes during simple data merge

Explorer ,
Sep 17, 2018 Sep 17, 2018

Copy link to clipboard

Copied

Hey all, wasn't sure if this belonged in InDesign Server Developers forum, or here. Sorry if in wrong place.

I have a simple data merge script which works perfectly fine in InDesign CC Desktop:

var source = File("/Users/toddshark/Desktop/InDesign Server/example/example.indd")

var destination = File("/Users/toddshark/Desktop/InDesign Server/example/example.pdf")

var sourceData = File("/Users/toddshark/Desktop/InDesign Server/example/example.csv")

var doc = app.open(source);

doc.dataMergeProperties.selectDataSource(sourceData);

doc.dataMergeProperties.dataMergePreferences.recordNumber = 1;

doc.dataMergeProperties.mergeRecords();

var myPDFExportPreset = app.pdfExportPresets.item(0);

app.documents.item(0).exportFile(ExportFormat.pdfType, destination, false, myPDFExportPreset);

app.documents.item(0).close(SaveOptions.no);

doc.close(SaveOptions.no);

I pass this same script to InDesign server, and it crashes on the .mergeRecords();.

The server gives back (after ~3 seconds):

./InDesignServer: line 13: 72872 Segmentation fault: 11  "$installed_name" "$@"

Then crashes.

Anyone know what could be causing this?

TOPICS
Server developers

Views

1.5K

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Jan 29, 2019 Jan 29, 2019
We have released an update for InDesign Server CC2019 (v 14.0) which contains some stability fixes. If you are not already on 14.0 (build 130), then we recommend you to update to latest version.Also, please send the following information to santalwa@adobe.com :• Error snapshot or video recording of the issue.Adobe InDesignServer team

Likes

Translate

Translate
Explorer ,
Sep 18, 2018 Sep 18, 2018

Copy link to clipboard

Copied

By the way, I accidentally clicked the 'Assumed Answered' button, and it's not obvious to me how to undo that.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Sep 18, 2018 Sep 18, 2018

Copy link to clipboard

Copied

It looks like a moderator already fixed it.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 21, 2018 Sep 21, 2018

Copy link to clipboard

Copied

Following up on this, it really has me baffled.

I've modified my code to check that the file paths are valid and point to actual files.

var source = File("/Users/toddshark/Desktop/example/example.indd");

var destination = File("/Users/toddshark/Desktop/example/example.pdf");

var sourceData = File("/Users/toddshark/Desktop/example/example.csv");

var doc = app.open(source);

doc.dataMergeProperties.selectDataSource(sourceData);

if (source.exists && destination.exists && sourceData.exists) {

    try {

        app.consoleout("Performing merge...");

        doc.dataMergeProperties.mergeRecords();

    } catch (err) {

        app.consoleout(err);

    }

} else {

    app.consoleout("Something doesn't exist...");

}

I get:

Fri Sep 21 11:46:46 2018 INFO   [script] Performing merge...

./InDesignServer: line 13: 63113 Segmentation fault: 11  "$installed_name" "$@"

It crashes. It doesn't log any errors beyond that Segmentation fault.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Sep 23, 2018 Sep 23, 2018

Copy link to clipboard

Copied

Hi,

did you try the same with a tab delimited text file?

How is the encoding of your csv ?

Regards,
Uwe

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 23, 2018 Sep 23, 2018

Copy link to clipboard

Copied

Yes I've tried both .csv and .txt. I've tried encoding the CSV with the default 'CSV UTF-8 (Comma Delimited)' from Excel. As well as 'MS-DOS Comma Separated' and 'Macintosh Comma Separated' which tend to work better.

 

Still no idea what is causing .mergeRecords() to crash. I've tried this method on 3 different computers, and it fails on all of them (works on InDesign Desktop on all of them). Furthermore, this is the only method I've found that crashes the server - I can do pretty much everything else (make frames, place images, export PDFs, find / replace, etc...) without crash.

 

I've found a work around which actually suits my needs so I'm going to abandon trying to get .mergeRecords() to work for now:

Props to Colecandoo for the nudge: How to automate InDesign data merge with C#

var source = File("/Users/toddmorris/Desktop/example/example.indd");

var destination = File("/Users/toddmorris/Desktop/example/example.pdf");

var sourceData = File("Macintosh HD:Users:toddmorris:Desktop:example:example.csv");

 

 

var doc = app.open(source);

var myExport = File(doc.filePath + "/" + doc.name.split(".indd")[0] + ".pdf"); 

doc.dataMergeProperties.dataMergePreferences.recordNumber = 3;

with (doc.dataMergeProperties.dataMergePreferences) {

recordSelection = RecordSelection.ONE_RECORD;   

}

app.dataMergeOptions.removeBlankLines = true; 

doc.dataMergeProperties.exportFile(myExport, "[High Quality Print]", );

 

 

 

I'm tempted to report the mergeRecords() crash as a bug - just on the grounds the script works fine in Desktop, but breaks Server.

 

I'll also note, the response from Server to the terminal window that called sampleclient:

Error -1 fault: SOAP-ENV:Client [no subcode]

"End of file or no input: Operation interrupted or timed out"

Detail: [no detail]

 

I've also got a SO post on the problem, has more info, but same conclusion (as of this writing):

extendscript - InDesign Server Crashing on Data Merge - Stack Overflow

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 29, 2019 Jan 29, 2019

Copy link to clipboard

Copied

We have released an update for InDesign Server CC2019 (v 14.0) which contains some stability fixes. If you are not already on 14.0 (build 130), then we recommend you to update to latest version.

Also, please send the following information to santalwa@adobe.com :

• Error snapshot or video recording of the issue.

Adobe InDesignServer team

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jan 30, 2019 Jan 30, 2019

Copy link to clipboard

Copied

This seems specific to Indesign server so moving it to the forum for InDesign Server, more people could benefit from the information looking for this specific issue.

-Manan

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 30, 2019 Jan 30, 2019

Copy link to clipboard

Copied

LATEST

I just downloaded the 2019 Server, set up a quick test document and gave it a shot. It appears to be fixed! Same script file, similar sample document. It was indeed a bug, and it appears fixed in the latest 2019 Server release.

Thanks for all of the help!

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines