Ticket #49 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

OpenSG2 fails to store/load name data in .osb format

Reported by: allenb Assigned to: unassigned
Priority: blocker Milestone: 2.0 Beta
Component: System Version: 2.0
Keywords: osb Cc:
Completion:

Description

I have run into a strange bug with .osb files on OpenSG2.

If I load an osb file that was created with 1.X and has names for nodes, those names do not get loaded in. Also, if I create a new file in OpenSG2 and save it out, the names set before saving do not load back in.

This seems like it may be a bug in the osb loader…

Attachments

NFIO_Attachment_unfinished.diff (5.6 kB) - added by cneumann on 10/06/06 17:22:10.
Incomplete patch - do NOT commit
NFIO_Attachment_01.diff (12.4 kB) - added by cneumann on 10/07/06 08:17:44.
patch - needs review

Change History

10/05/06 16:49:54 changed by anonymous

There is now a unittest for this at:

Source/System/FileIO/OSB/OSGOSBTest.cpp

10/06/06 17:22:10 changed by cneumann

  • attachment NFIO_Attachment_unfinished.diff added.

Incomplete patch - do NOT commit

10/06/06 17:31:52 changed by cneumann

I added an unfinished patch that adds some infrastructure to write out attachments, but it's not sufficient to make the test work. Also the changes to FieldContainerAttachment should probably be moved to AttachmentMixin. The changes to FieldTraits<void *> need a review, I don't know the right way to write a void* to binary, if this is supported at all. Hopefully more tomorrow.

10/07/06 08:17:44 changed by cneumann

  • attachment NFIO_Attachment_01.diff added.

patch - needs review

10/07/06 08:23:37 changed by cneumann

I added an new patch that makes the test pass for me, but it really needs to be carefully reviewed (probably by Dirk or Gerrit) if this is the correct and/or complete solution. Changes:

  • OSGAttachmentMixin.inl:
    • implemented: getBinSize, copyToBin, copyFromBin
  • OSGAttachmentContainerMixin.inl:
    • implemented: pushToField
    • added: insertIntoMField, insertIntoMField, replaceInMField, removeFromMField, removeFromMField, clearField. These only forward to Inherited and print a warning as a reminder to check their implementation.
  • OSGSimpleAttachment.inl:
    • implemented: getBinSize, copyToBin, copyFromBin
  • OSGSysFieldTraits.h: FieldTraits<void *>
    • implemented getBinSize, copyToBin, copyFromBin to do nothing.

10/08/06 11:25:59 changed by allenb

The most recent patch works for me. I am not sure if it is a complete solution but it is definitely better then what is in there already. :)

I suggest committing the change.

10/09/06 08:50:56 changed by vossg

looks ok, I will commit it tomorrow with a small change regarding the warnings.

10/19/06 10:02:25 changed by allenb

Applied cneumann's patch in r318.

11/29/06 13:28:44 changed by cneumann

  • estimated_completion changed.

I'll close this ticket at the end of the week (2006/12/01) unless somebody objects until then.

12/01/06 07:09:58 changed by cneumann

  • status changed from new to closed.
  • resolution set to fixed.