AIX + NSFDbGetModifiedNoteTable = Crash?

Hi there!Just got the problem, neen help ASAP!

Have a code, which is accessing the database through Notes C API and using NSFDbGetModifiedNoteTable.

It successfully works under Win as Linux (RH). When launch the one under AIX, Domino crashes:

Constants

'#######################################################################################

Const TIMEDATE_WILDCARD = 2

Const NOTE_CLASS_DOCUMENT = &H0001 ’ document note

Const RRV_DELETED = &H80000000 ’ document deletion flag

'Notes C API modules

'#######################################################################################

'LINUX

Const LinuxAPIModule = “libnotes.so”

'IBM AIX / UNIX

Const UnixAPIModule = “libnotes_r.a”

'WINDOWS

Const WinAPIModule = “nnotes.dll”

'Types

'#######################################################################################

Type TIMEDATE

Innards(1) As Long

End Type

'Variables

'#######################################################################################

Dim formulaTime As Variant

Dim platform As Variant

'NSFDbOpen

'#######################################################################################

Declare Function WIN_NSFDbOpen Lib WinAPIModule Alias “NSFDbOpen” (Byval dbName As String, hdb As Long ) As Integer

Declare Function UNIX_NSFDbOpen Lib UnixAPIModule Alias “NSFDbOpen” (Byval dbName As String, hdb As Long ) As Integer

Declare Function LINUX_NSFDbOpen Lib LinuxAPIModule Alias “NSFDbOpen” (Byval dbName As String, hdb As Long ) As Integer

'#######################################################################################

'NSFDbClose

'#######################################################################################

Declare Function WIN_NSFDbClose Lib WinAPIModule Alias “NSFDbClose” (Byval hDb As Long) As Integer

Declare Function UNIX_NSFDbClose Lib UnixAPIModule Alias “NSFDbClose” (Byval hDb As Long) As Integer

Declare Function LINUX_NSFDbClose Lib LinuxAPIModule Alias “NSFDbClose” (Byval hDb As Long) As Integer

'#######################################################################################

'NSFDbGetModifiedNoteTable

'#######################################################################################

Declare Function WIN_NSFDbGetModifiedNoteTable Lib WinAPIModule Alias “NSFDbGetModifiedNoteTable” (Byval DbHandle As Long, Byval NoteClassMask As Integer, _

Byval Innards1 As Long, Byval Innards2 As Long, retUntil As TIMEDATE, rethTable As Long) As Integer

Declare Function UNIX_NSFDbGetModifiedNoteTable Lib UnixAPIModule Alias “NSFDbGetModifiedNoteTable” (Byval DbHandle As Long, Byval NoteClassMask As Integer, _

Byval Innards1 As Long, Byval Innards2 As Long, retUntil As TIMEDATE, rethTable As Long) As Integer

Declare Function UNIX2_NSFDbGetModifiedNoteTable Lib UnixAPIModule Alias “NSFDbGetModifiedNoteTable” (Byval DbHandle As Long, Byval NoteClassMask As Integer, _

Since As TIMEDATE, retUntil As TIMEDATE, rethTable As Long) As Integer

Declare Function LINUX_NSFDbGetModifiedNoteTable Lib LinuxAPIModule Alias “NSFDbGetModifiedNoteTable” (Byval hDb As Long, Byval NoteClassMask As Integer, _

Byval Innards1 As Long, Byval Innards2 As Long, retUntil As TIMEDATE, rethTable As Long) As Integer

'######################################################################################

'IDDestroyTable

'#######################################################################################

Declare Function WIN_IDDestroyTable Lib WinAPIModule Alias “IDDestroyTable” (Byval hTable) As Integer

Declare Function UNIX_IDDestroyTable Lib UnixAPIModule Alias “IDDestroyTable” (Byval hTable) As Integer

Declare Function LINUX_IDDestroyTable Lib LinuxAPIModule Alias “IDDestroyTable” (Byval hTable) As Integer

'#######################################################################################

'TimeConstant

'#######################################################################################

Declare Sub WIN_TimeConstant Lib WinAPIModule Alias “TimeConstant” (Byval timeConstantType As Long, retDateTime As TIMEDATE)

Declare Sub UNIX_TimeConstant Lib UnixAPIModule Alias “TimeConstant” (Byval timeConstantType As Long, retDateTime As TIMEDATE)

Declare Sub LINUX_TimeConstant Lib LinuxAPIModule Alias “TimeConstant” (Byval timeConstantType As Long, retDateTime As TIMEDATE)

'#######################################################################################

Sub getDbMods(db as NotesDatabase)

Dim dbPathName As String

Dim result As Integer

Dim hDb As Long

dbPathName = db.Server & “!!” & db.FilePath

Select Case platform

Case "windows":

	result = WIN_NSFDbOpen(dbPathName, hDb)	

Case "unix":

	result = UNIX_NSFDbOpen(dbPathName, hDb)

Case "linux":

	result = LINUX_NSFDbOpen(dbPathName, hDb)

End Select

If result <> 0 Then

Print result

Print "Could not open database."

Exit Sub

Else

Print "Just Opened the database."	

End If

Dim startDateTime As TIMEDATE

Dim endDateTime As TIMEDATE

Select Case platform

Case "windows":

	Call WIN_TimeConstant(TIMEDATE_WILDCARD, startDateTime)			

Case "unix":

	Call UNIX_TimeConstant(TIMEDATE_WILDCARD, startDateTime)

Case "linux":

	Call LINUX_TimeConstant(TIMEDATE_WILDCARD, startDateTime)

End Select

Dim hIDTable As Long

Select Case platform

Case "windows":

	result = WIN_NSFDbGetModifiedNoteTable(hDb, NOTE_CLASS_DOCUMENT, startDateTime.Innards(0), startDateTime.Innards(1), endDateTime, hIDTable)

Case "unix":

	result = UNIX_NSFDbGetModifiedNoteTable(hDb, NOTE_CLASS_DOCUMENT, startDateTime.Innards(0), startDateTime.Innards(1), endDateTime, hIDTable)

’ result = UNIX2_NSFDbGetModifiedNoteTable (hDB, NOTE_CLASS_DOCUMENT, startDateTime, endDateTime, hIDTable)

Case "linux":

	result = LINUX_NSFDbGetModifiedNoteTable(hDb, NOTE_CLASS_DOCUMENT, startDateTime.Innards(0), startDateTime.Innards(1), endDateTime, hIDTable)

End Select

…

End Sub

Domino crashes any time, the “NSFDbGetModifiedNoteTable” for UNIX case is executing… Both UNIX_NSFDbGetModifiedNoteTable and UNIX2_NSFDbGetModifiedNoteTable work the same way - chrash the server…

Getting the following in server console:

Stack base = 0x30c406a0, Stack size = 11320 bytes

Fatal Error signal = 0x0000000b PID/TID/K-TID = 14262/8225/72085

Sun Jun 12 13:27:52 Running cleanup script

NSD is in progress …

Please attach the following files to your bug report along with the server log:

Log file : ./nsd_all_AIX_srv20_06_12@13_27.log

Domino Halted. Type ‘quit’ to Terminate/Cleanup Sun Jun 12 13:28:32 Termination is in progress

Sun Jun 12 13:28:32 Terminating tasks

Sun Jun 12 13:28:42 Freeing resources

Sun Jun 12 13:28:43 Termination completed

Please advice!!!

Many thanks!!!

Subject: AIX + NSFDbGetModifiedNoteTable = Crash???

Just manage the problem… !!!here is the solution!!!

The point is hDb and hIDTable handlers MUST BE an INTEGER type!!! Long type makes Domino crash!