Converting Presentation file with broken summary links leads to GroupDocsConversionException

We are running into an issue with GroupDocs.Conversion v26.1.0 when trying to convert a presentation document that contains broken summary links.

We get the following exception:

GroupDocs.Conversion.Exceptions.GroupDocsConversionException: Value cannot be null. (Parameter 'key')\r\n ---> System.ArgumentNullException: Value cannot be null. (Parameter 'key')\r\n   at e.(Exception , ConverterSettings \b, \b )\r\n   at e.\b(CancellationToken )\r\n   at e.\b.()\r\n   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)\r\n--- End of stack trace from previous location ---\r\n   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)\r\n   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)\r\n   --- End of inner exception stack trace ---\r\n   at e..(Exception )\r\n   at System.AggregateException.Handle(Func`2 predicate)\r\n   at e.(CancellationToken )\r\n   at GroupDocs.Conversion.Converter.(CancellationToken )\r\n   at GroupDocs.Conversion.Converter.Convert(ConvertOptions convertOptions, Action`1 documentCompleted, CancellationToken cancellationToken)\r\n

We used the following code and file to reproduce this issue:

Pictures and SmartArt - Summary Section is broken - small.zip (44.8 KB)

[Test]
public async Task Converting_PresentationWithBrokenSummaryLinks_ThrowsException()
{
	// Arrange
	var filename = "Pictures and SmartArt - Summary Section is broken - small.pptx";
	var path = Path.Combine(TestContext.CurrentContext.TestDirectory, "TestData", "Presentation", filename);
	await using var originalDocument = File.Open(path, FileMode.Open);

	// Act
	using var converter = new Converter(
		() => originalDocument,
		context =>
		{
			var loadOptions = new PresentationLoadOptions
			{
				ShowHiddenSlides = true,
				SkipExternalResources = true,
				ClearBuiltInDocumentProperties = true,
				ClearCustomDocumentProperties = true,
				NotesPosition = PresentationNotesPosition.BottomFull,
			};

			return loadOptions;
		});

	using var outputStream = new MemoryStream();
	var options = new PdfConvertOptions
	{
		PdfOptions = new PdfOptions
		{
			Linearize = true,
		},
	};

	var action = () => converter.Convert(
		options,
		(ConvertedContext convertedContext) =>
		{
			convertedContext.ConvertedStream.Position = 0;
			convertedContext.ConvertedStream.CopyTo(outputStream);
		});

	var exception = action.Should().Throw<GroupDocsConversionException>().Which;
}

Is there a way we can convert this file without this throwing an exception? Ideally in a similar manner to what happens when one saves the presentation as a PDF.

@tonyMilyli

Thank you for the report, and for including a runnable test case. That made it easy to reproduce on our side. We’ve logged the issue as CONVERSIONNET-8399.

The trigger is NotesPosition. Slide 3 has a Summary Zoom that still references four sections deleted from the file. Harmless on its own, but setting NotesPosition to anything other than None makes the conversion run an extra internal save first, and that step fails on the dangling references. CommentsPosition does the same. Linearize isn’t involved.

For this file you can simply drop NotesPosition. None of its slides carry notes, so BottomFull isn’t changing the output anyway, and the conversion completes without it.

We’ll update the thread once our development team has looked at it.