Skip to main content
Inspiring
September 17, 2018
Answered

InDesign Server crashes during simple data merge

  • September 17, 2018
  • 3 replies
  • 2499 views

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?

This topic has been closed for replies.
Correct answer SanyamTalwar

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

3 replies

SanyamTalwar
SanyamTalwarCorrect answer
Participating Frequently
January 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

Community Expert
January 30, 2019

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

-Manan
toddm72Author
Inspiring
September 21, 2018

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.

Community Expert
September 23, 2018

Hi,

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

How is the encoding of your csv ?

Regards,
Uwe

toddm72Author
Inspiring
September 23, 2018

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

toddm72Author
Inspiring
September 18, 2018

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

Peru Bob
Community Expert
Community Expert
September 18, 2018

It looks like a moderator already fixed it.