DbLookup in afterPageLoad causes NSD

The following code:

xp:this.afterPageLoad<![CDATA[#{javascript:

viewScope.org=@DbLookup(@DbName(), “vAllByForm”, “MasterDbInfo”, “mdiOrgAbbrev”);

if(!viewScope.org || viewScope.org==“”) viewScope.org=“DOE”;

}]]></xp:this.afterPageLoad>

causes the server to NSD if the @DbLookup is run, and it works fine (producing “DOE” in viewScope.org) if that line is commented out.

  • Sometimes it actually does work, producing the expected Organization name, but then the next page load causes it to crash and generate an NSD. I have two such, one where it crashed straight away and one where it pulled the org and crashed next page load.

  • When I say it “always” happens, I mean the two times I tried it, it crashed. The numerous times I tried it either without the line, or with the line commented out, it did not crash.

  • I’m going to fiddle with doing this using the global JS objects…

EDIT:

  • The global JS objects work fine.

Subject: Did you see any pattern to this intermittent crash?

Hi David,I’ve tried this myself with a similar sample but I cannot reproduce this crash. However, nothing displays in a computed field that I’ve set to return the results.

Do you have anything more on this? And do call this in to IBM support.

Regards,

Paul.

Subject: Haven’t tried…

  • Xpages has put me so far behind on this project, with things like this, that I don’t feel I can put in PMR for it right now. Yesterday I wasted a full day trying to get a date field to save without a value in it, to no avail. Today I wasted the full day trying to get Java to compile for another application. That is a significantly more serious issue than something I already found a workaround for.

  • It seems like all I do since loading R8.5.1 is waste my days trying to do things that used to be easy. Before R8.5.1 I was productive. Now I’m not. This does not make anyone happy, least of all me. I never thought I’d long for R7…

Subject: Do you have a sample app…

Hi David,Do you have a sample app that might reproduce this even intermittently? This will save you the bother in logging a PMR. Then if I can reproduce it I will log a bug for this and see if this can be addressed in 851 FP1 or a hotfix.

Regards,

Paul.

paul_hannan@ie.ibm.com

Subject: DbLookup in afterPageLoad causes NSD…FATAL THREAD?

Hi,

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)

call IBM support

JYR

Subject: Here you go…

############################################################### FATAL THREAD 17/60 [ nHTTP: 0eb4: 0798]

FP=0x07291800, PC=0x0fea00d2, SP=0x07c87778

stkbase=0802b000, total stksize=5746688, used stksize=3815560

EAX=0x11700e80, EBX=0x11700e30, ECX=0x082e57c0, EDX=0x00000001

ESI=0x1174a090, EDI=0x082e57c0, CS=0x0000001b, SS=0x00000023

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

Exception code: c0000005 (ACCESS_VIOLATION)

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

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

PASS 2 : FATAL THREAD with STACK FRAMES 17/60 [ nHTTP: 0eb4: 0798]

FP=07291800, PC=0fea00d2, SP=07c87778

stkbase=0802b000, total stksize=5746688, used stksize=3815560

Exception code: c0000005 (ACCESS_VIOLATION)

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

Detected truncated call stack (small number of frames)

---------- Dump of stack from SP to stkbase ----------

ERROR (0): canceling thread 1108 after 600 seconds

INFO (0): NSD Timed Out Before Completing Within 600 Seconds.

The other NSD has no text “FATAL”. That can’t be good…