Object.remove crashes server

I am getting a server crash during “call obj.remove” operation in an agent. It happens always on the same attachment. Attachment does get detached, so it’s not a null object. Attachment name is short and does not have any strange letters.

Server is Domino 7.0.3 and I could not reproduce the problem on other servers. Removing the file makes the agent to show “document is corrupt” message. Removing the document makes the agent continue, only to crash later on another attachment (this time web-attached).

Can this happen because the document is somehow corrupt? Any ways to find the document corruption before server crashes? Regular error handling will not work as there is no error to handle.

Forall i In doc.Items

Set item=i

If item.Type=RICHTEXT Then

Set rtitem=item

If Isempty( rtitem.EmbeddedObjects)=False Then

Forall o In rtitem.EmbeddedObjects

If ( o.Type = EMBED_ATTACHMENT ) Then

Set obj = doc.GetAttachment(o.Source )

Call obj.ExtractFile( "c:\temp"+obj.Source) 'works ok

Call obj.Remove 'server crashes here

End If

End Forall

End If

End If

End Forall

Subject: object.remove crashes server

Hi

We need more infos.

Can you post the FATAL THREAD section of the NSD files with the few lines under it

For example:

############################################################

FATAL THREAD 1/2 [ domdsm:107a8:67076]

FP=0x0012a34c, PC=0x60069a86, SP=0x0012a2f0, stksize=92

EAX=0x01a3088c, EBX=0x01a48650, ECX=0x0000bffe, EDX=0x01a325e6

ESI=0x00004000, EDI=0x0032ff78, CS=0x0000001b, SS=0x00000023

DS=0x00000023, ES=0x00000023, FS=0x0000003b, GS=0x00000000 Flags=0x00010206

Exception code: c0000005 (ACCESS_VIOLATION)

############################################################

@[ 1] 0x60069a86 nnotes._fdDelete@4+118 (4000,12a368,608770ef,4000)

@[ 2] 0x60069a0c nnotes._OSFileClose@4+12 (4000,12adc0,12a380,60872ea7)

@[ 3] 0x608770ef nnotes._sqloclose+15 (4000,12b59c,5010,0)

@[ 4] 0x60872ea7 nnotes._sqlpgclf+71 (12adc0,1aaa2cb,70,1aaa2f3)

@[ 5] 0x60885458 nnotes._sqlpgfdl+616 (12b9a4,1aaa2cb,41,12be44)

@[ 6] 0x60876a6f nnotes._sqlpgcdl+927 (12bf44,12b9a4,0,12be44).

Date

Topic

Frequently asked question - How to analyze Notes/Domino NSDs? (Jean-Yves Riverin)

or call IBM support.

JYR

Subject: object.remove crashes server

I sort of solved the problem by getting attachment through document object instead of richtext.

Set obj = doc.GetAttachment( “jim.sam” )

Call obj.ExtractFile( "c:\temp"+obj.Source)

Call obj.Remove