I am not set up right now to test this in B4A, but I think the problem might be that the Position parameter of the Read and Write methods is in bytes, not records.
So if your object ended up being saved as eg 120 bytes, then:
raf.WriteB4XObject(rafRow, 1) 'writes 120 bytes to file bytes 1..120
raf.WriteB4XObject(rafRow, 2) 'writes 120 bytes to file bytes 2..121, ie overwriting bytes 2..120 of the previous object
and then:
rafRow = raf.ReadB4XObject(1) 'reads bytes 1 (first byte of first object) and 2 (first byte of second object) and probably then careers off into the weeds
Imagine that the first four bytes are the length of the data to follow (or perhaps an object type identifier). After writing the first object, bytes 1..4 of the file would be 0116. After writing the second object, bytes 1..4 would be 0011 (the first 0 being the start of first object, and the 011 being the start of the second object). ReadB4XObject would likely (and reasonably) fail on reading from file position 1, since the data is incorrect. It should still read ok from file position 2.
The solution is to write the objects sequentially to the file, and likewise when reading them back. For each read/write operation, use:
for the Position parameter, eg:
raf.WriteB4XObject(rafRow, 0) 'writes first object to start of file (ie offset 0 bytes from beginning), at file bytes eg 0..119
...
raf.WriteB4XObject(rafRow, raf.CurrentPosition) 'writes second object to file, at file bytes eg 120..239
...
raf.WriteB4XObject(rafRow, raf.CurrentPosition) 'writes third object object to file, at file bytes eg 240..359
and then likewise for reading them back.
If you want to read them back in some arbitrary order (ie, random / direct access) then you will need to keep track of the CurrentPosition start address of each object. These would usually be kept in an array (properly, of Longs, but Ints will do the job for files < 2 GB, ie most everything except video and large databases). Next time you need this index array, you can either reconstruct it (by sequentially reading the file and noting CurrentPosition prior to each read) or you could save it to the end of the file followed by a WriteLong (or WriteInt?) of the CurrentPosition of that array.