Apache OpenOffice (AOO) Bugzilla – Full Text Bug Listing
|Summary:||OOo 2.0.1 crashes when deleting the 2 of 2 records in a form|
|Status:||CLOSED FIXED||QA Contact:||issues <issues.openoffice.org>|
|Target Milestone:||OOo 2.0.2|
|Issue Type:||DEFECT||Latest Confirmation on:||---|
Description jshanks 2005-10-10 16:20:05 UTC
I have just installed 2.0rc2 and went back to testing the database functionality. I had to stop with rc1 because of crashes. With 2.0rc2 I am seeing the following problems all related to database navigation from within a form created with OOo base. If you would like me to file separate issues on each of the following problems, let me know. However, from what I can tell, these appear to be related. 1. Moving from record to record, I have seen two crashes that prompted for automatic document recovery. I will attach the error report. This happens when adding and deleting records and does cause the data loss of the displayed record. 2. Data that is displayed in the form is not the same data as in the raw table. This is especially true with autonumber fields. For instance, I created a two record database, with a Primary ID autonumber field and a text field. I created a form with the form wizard. Five records were added and then the last three were deleted. Three more were added, but the autonumber field in the form always displayed "1" within the form. I closed the form and checked the table. In the table the autonumber field showed the actual data as 1,2,6,7,8 which is what I would expect. I reopened the form and again the autonumber field always showed "1". 3. Deleting the last record in the table is causing problems. In the same test as above, I moved to the last of the five records and pressed the "X" delete button. After responding yes to the question, the record was deleted. I expected to be positioned on record 4, but I was actually positioned to record 3. When I got down to two records and deleted the last record, the form locked. I closed the form and reopened it, and the last record was indeed deleted. 4. Deleting a record in a one record database caused an error to appear. I continued the above test and deleted the only record in the database. An error window popped up that said: Error inserting new record. Function sequence error. Pressing "OK" closed the error and properly displays a blank record. All of these errors occurred using both a MySQL database and an OOo flat database file. Let me know if you need any further information as this is a showstopper for our organization.
Comment 2 jshanks 2005-10-10 16:26:43 UTC
Whoops, In step "2", I created a two "field" database not a two "record" database. Hope this will make the test procedure clearer.
Comment 3 Frank Schönheit 2005-10-11 07:27:39 UTC
If your form contains controls bound to some auto-increment fields, this is most probably a duplicate of issue 54874. For the other problems, *please* submit separate issues. See http://qa.openoffice.org/issue_handling/basic_rules.html#one_per_issue for a reasoning. Thanks.
Comment 4 atdsm 2005-12-02 16:09:55 UTC
Two things. First, yes, please file seperate issues. It is much easier to deal with one problem at a time, even if two problems are related. If you believe all issues are related, post comments cross-referencing the other issues. Second, could you post step-by-step instructions detailing how you caused the crash to occur? Also, please attach the document that is causing the crash. Thanks, Steve
Comment 5 jshanks 2005-12-02 20:13:12 UTC
I believe that with the release version 2.0 we're down to one problem. Here are the steps to create the problem. Create a two field table in a new database. Field 1 = ID = an autonumber integer to be the primary key. Field 2 = Text = a 50 character text field. Use the form wizard to create a form for the database. Select both fields for use on the form. Using the form, add three records to the database. I used Test1, Test2, and Test3 for data in the records. The autonumber added 0, 1, and 2 to the ID field. Using the form, navigate to the last record in the database and delete the record. You will notice that you are now (incorrectly) on the first record. Now move to the last record (second record) of the database and delete it. After deleting the second record is still displayed and the form is locked (no navigation possible). Then close the form and check the referenced table. You will find that the record is deleted. Reopen the form and delete the last record. OpenOffice crashes and the data recovery is started. I believe that these errors and crashes are all related to the fact that deleting a record causes the record pointer to be incorrectly positioned. IMHO, if the ending record of a table is deleted, the "new" ending record should be displayed in the form and not the record 1 prior the new ending record. Also, if a record is deleted from a 1 record table, a blank record should be displayed, just as if the table was opened the first time. It seems to be just a simple logic error in the record pointer.
Comment 6 marc.neumann 2005-12-05 13:52:00 UTC
Hi, I can reproduce this, reassign it to the right developer and set target. Bye Marc
Comment 7 Frank Schönheit 2005-12-08 11:54:47 UTC
fs->oj: the problem here is that the RowSet's position is somehow inconsisten after a record has been deleted. The form controller calles deleteRow, and subsequently a relative( -1 ). This is expected to position the row set immediately before the record which has just been deleted. Instead, it's positioned two records before it. For example. if you delete record 3 (of a 3-record form), then afterwards, the row set / form is at position 1, while it should be at 2. This is because the m_nPosition of the RowSetCache is wrong after deleting a row - it already is "2", so that the subsequent relative(-1) moves to "1". Note that the m_nPosition of the RowSet is still correct: it's "3", so a "getRow" delivers the correct position "3", and "rowDeleted" returns "true", which is all correct. It's just the cache which got slightly confused by the deletion.
Comment 8 ocke.janssen 2005-12-12 06:31:56 UTC
*** Issue 55237 has been marked as a duplicate of this issue. ***
Comment 9 ocke.janssen 2005-12-12 07:59:32 UTC
Fixed in cws dba202b
Comment 10 ocke.janssen 2006-01-09 07:18:09 UTC
Please verify. Thanks. re-open issue and reassign to email@example.com
Comment 12 ocke.janssen 2006-01-09 07:18:17 UTC
reset resolution to FIXED
Comment 13 marc.neumann 2006-01-11 11:40:09 UTC
reopen because it's not fixed. Now it crash when delete the first record, and also wehen deleting the last record no 'insert row' is available
Comment 14 marc.neumann 2006-01-11 11:41:24 UTC
reassign to oj for fixing again. Please test your bugfix before sending back. Thanks Marc
Comment 15 ocke.janssen 2006-01-16 08:30:41 UTC
Thanks, for take care of this one.
Comment 16 Frank Schönheit 2006-01-19 09:08:30 UTC
fixed in CWS rowsetdel
Comment 17 Frank Schönheit 2006-01-20 13:26:51 UTC
fs-> msc: please verify in CWS rowsetdel re-open issue and reassign to msc
Comment 18 Frank Schönheit 2006-01-20 13:28:31 UTC
reassign to msc
Comment 19 Frank Schönheit 2006-01-20 13:28:51 UTC
reset resolution to FIXED
Comment 20 marc.neumann 2006-01-25 12:42:57 UTC
verified in cws rowsetdel