• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

InDesign 2024 crash while opening a document which uses a custom C++ plugin

Contributor ,
Jul 11, 2024 Jul 11, 2024

Copy link to clipboard

Copied

Hi,

 

We have a document that causes InDesign to crash while opening. This document uses our custom C++ plugin.

 

With the debug version of InDesign following prompts are shown before InDesign crashes

 

img1.pngimg2.pngimg3.png

 
The only way to resolve the issue is to remove the PrePress plugins from InDesign
 
asaxena_5-1720696299343.png

 

With this, after a lot of prompts, the document ultimately opens without crashing InDesign.
 
I do not understand the issue here and how to go about troubleshooting it.
 
Please advice.
 
Thanks

 

 

TOPICS
How to , SDK

Views

151

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
Guide ,
Jul 16, 2024 Jul 16, 2024

Copy link to clipboard

Copied

Sounds like that UID is supposed to refer to a preflight profile, Could be the active prefilght profile that is exercised on load unless you disable preflight that hard way removing its plugin?

 

Not being able to get the class ID means there is no such object, it was deleted,

Votes

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
Guide ,
Jul 16, 2024 Jul 16, 2024

Copy link to clipboard

Copied

What happens if you open the doc without UI – so the preflighting task does not kick in – (by script) and create+assign a different preflight profile?

Votes

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
Contributor ,
Jul 19, 2024 Jul 19, 2024

Copy link to clipboard

Copied

Please suggest how to open the doc without UI (by script)

In the meanwhile, I opened a new document and set the preflight to off. Then I opened the original document and InDesign crashed again.

 

 

Votes

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
Guide ,
Jul 19, 2024 Jul 19, 2024

Copy link to clipboard

Copied

the second argument to app.open is a bool "showingWindow".

DirkBecker_0-1721389027074.png

https://developer.adobe.com/indesign/dom/api/a/Application/

 

The hard part will be to find out yourself how to disable preflight by script, or create another profile and assign that as active. Sorry, can't help with that.

Then close (again by script) and hope that regular open now works.

Votes

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
Community Expert ,
Jul 19, 2024 Jul 19, 2024

Copy link to clipboard

Copied

LATEST

Hi @asaxena ,

if you are able to open the document without a layout window, you could export to IDML, open the IDML file and save it to a new named document.

 

ExtendScript code below, read also into my comments in the code:

// To avoid messages set the user interaction level to "Never interact":
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT ;

var getINDDFile = File.openDialog
(
	"Open InDesign File" ,
	"*.indd",
	false
);

if( getINDDFile == null )
{
	alert( "NO INDD FILE SELECTED." );
	// Reset script preferences:
	app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL ;
	exit();
};

// Open INDD file WITHOUT a layout window:
app.open( getINDDFile , false );

var doc = app.documents[0];
var docFilePath = doc.filePath;

var idmlFileName = doc.name.replace(/\.indd$/ , "-IDML.idml" );
var idmlFile = File( docFilePath +"/"+ idmlFileName );

// Export doc without layout window to IDML:
app.documents[0].exportFile( ExportFormat.INDESIGN_MARKUP , idmlFile );

// Close original document without saving:
app.documents[0].close( SaveOptions.NO );

// Open exported IDML file without a layout window:
app.open( idmlFile , false );

var newDocName = idmlFileName.replace( /\.idml$/ , ".indd" );
var newDocFile = File( docFilePath +"/"+ newDocName );

app.documents[0].save( newDocFile );
app.documents[0].close( SaveOptions.NO );

// Resetting the script preferences:
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL ;

alert( "Done" );

Code tested with InDesign 2024 version 19.5.0.84 on macOS.

No idea, if that will help in your case.

 

Regards,
Uwe Laubender
( Adobe Community Expert )

 

Votes

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