Hmm this is an interesting bug. So there seems to be an engine bug where the material graph comment is not initialized correctly. If you look at this comment that is copied from blueprintue:
Begin Object Class=/Script/UnrealEd.MaterialGraphNode_Comment Name="MaterialGraphNode_Comment_3" ExportPath="/Script/UnrealEd.MaterialGraphNode_Comment'/Engine/Transient.M_VDB02:MaterialGraph_0.MaterialGraphNode_Comment_3'"
bCommentBubbleVisible_InDetailsPanel=False
CommentDepth=-2
NodePosX=-1552
NodePosY=-432
NodeWidth=1213
NodeHeight=711
bCommentBubblePinned=False
bCommentBubbleVisible=False
NodeComment="Blackbody from Temperature"
NodeGuid=72D8BBC04CCD07ADA0864CBA120A480C
End Object
and compare it to a normal comment you create on a graph:
Begin Object Class=/Script/UnrealEd.MaterialGraphNode_Comment Name="MaterialGraphNode_Comment_16" ExportPath="/Script/UnrealEd.MaterialGraphNode_Comment'/Engine/Transient.BA_MATERIAL:MaterialGraph_0.MaterialGraphNode_Comment_16'"
Begin Object Class=/Script/Engine.MaterialExpressionComment Name="MaterialExpressionComment_16" ExportPath="/Script/Engine.MaterialExpressionComment'/Engine/Transient.BA_MATERIAL:MaterialGraph_0.MaterialGraphNode_Comment_16.MaterialExpressionComment_16'"
End Object
Begin Object Name="MaterialExpressionComment_16" ExportPath="/Script/Engine.MaterialExpressionComment'/Engine/Transient.BA_MATERIAL:MaterialGraph_0.MaterialGraphNode_Comment_16.MaterialExpressionComment_16'"
SizeX=400
SizeY=100
Text="Comment"
MaterialExpressionEditorX=-1831
MaterialExpressionEditorY=1255
MaterialExpressionGuid=A73E8B8243EE582D38532886B9C7458D
End Object
MaterialExpressionComment="/Script/Engine.MaterialExpressionComment'MaterialExpressionComment_16'"
bCommentBubbleVisible_InDetailsPanel=False
NodePosX=-1831
NodePosY=1255
bCommentBubblePinned=False
bCommentBubbleVisible=False
NodeComment="Comment"
NodeGuid=DE75286A499BC870FB6FE989C3CA7F2F
End Object
You can see that is is malformed and when you copy it into the material graph certain variables are not initialized properly. Without AutoSizeComments installed, if you try to resize this malformed comment it will also crash.
I’m not exactly sure how to generate this malformed comment. Perhaps it might have been an issue from upgrading the material from an old unreal version?
Anyway I believe this issue requires an engine source change. When I have some time, I might try to make a pull request to fix this.