Architect freezes after opening a project

Architect freezes after trying to open a project. This happens with version 2024.2.1.3292.

Does not happen when running the Architect from Visual Studio.

Workaround:
open the file OrigamArchitect.exe.config in a text editor and change the root appender in the logging section to a file appender.
Here is the relevant section of the file:

<log4net>
		<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
			<layout type="log4net.Layout.PatternLayout">
				<conversionPattern value="%date [%thread] %level %logger - %message%newline"/>
			</layout>
		</appender>
		<appender name="WorkflowConsoleAppender" type="log4net.Appender.ConsoleAppender">
			<layout type="log4net.Layout.PatternLayout">
				<conversionPattern value="%message%newline"/>
			</layout>
		</appender>
		<appender name="RuleConsoleAppender" type="log4net.Appender.ConsoleAppender">
			<layout type="log4net.Layout.PatternLayout">
				<conversionPattern value="Rule: %message%newline"/>
			</layout>
		</appender>
		<appender name="FileAppender" type="log4net.Appender.FileAppender">
			<file value="C:/Architect.log"/>
			<appendToFile value="false"/>
			<layout type="log4net.Layout.PatternLayout">
				<conversionPattern value="%date [%thread] %level %logger - %message%newline"/>
			</layout>
		</appender>
		<root>
			<level value="INFO"/>
			 <appender-ref ref="FileAppender" />
		</root>
		<logger name="Origam.Workbench.Services" additivity="false">
			<level value="DEBUG"/>
			<appender-ref ref="WorkflowConsoleAppender"/>
		</logger>
		<logger name="Origam.Workflow" additivity="false">
			<level value="DEBUG"/>
			<appender-ref ref="WorkflowConsoleAppender"/>
		</logger>
		<logger name="Origam.Rule" additivity="false">
			<level value="DEBUG"/>
			<appender-ref ref="RuleConsoleAppender"/>
		</logger>
		<logger name="Origam.Gui.Designer" additivity="false">
			<level value="DEBUG"/>
			<appender-ref ref="ConsoleAppender"/>
		</logger>
	</log4net>

Downside of this approach is that some messages will not appear in the log pad. They will be redirected in to the log file you specify in the config.

The problem could not be reproduced in Visual studio because there is AutoUpdate method which only runs if the program version is not 0.0.0.0. The program version is assigned during build on the build server and that is why this method only runs in production builds, not in VS.

A few observations were made when trying to debug the problem. The problem goes away when the log4net root appender is swithced from ConsoleAppedner to FileAppender. Another important point is that the problem happens when the LogPad is open. So the Architect freezes either on startup if the LogPad was open in previos session or when the LogPad is not open and the user opens it by clicking on the corresponding menu item.

The AutoUpdate method runs on a BackgroundWorker. And a call to log.Warn was recently added to it. This combination seems to cause the problem (The problem goes away if the AutoUpdate method is called from the constructor).

To sumarize, if one of the log4net logging methods is called in a BackgroundWorker event handler, and then the LogPad is open the program goes into a state which looks like a deadlock. This is probably caused by a bug in log4net, WeifFenLuo docking library of WinForms.

The solution here is to remove the auto update functionality because it is actually not used any more and sould have been removed a long time ago.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.