Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004905opensim[REGION] OpenSim Corepublic2010-08-01 16:392014-07-29 13:43
Reportermanni99 
Assigned Tojustincc 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Versionmaster (dev code) 
Target VersionFixed in Version 
Summary0004905: Attachments lose their attach point/position after being rezzed in-world and then taken back
DescriptionAfter an attachment is rezzed in-world from inventory, it loses track of its previous attachment point and position. Sometimes I find it's easier to make changes to an object while it is not attached, which I often do in Second Life. Also, the lack of this feature makes it difficult to have HUDs that can be used in-world as well, since they must be re-attached to the correct HUD point and repositioned every time after having been rezzed.

To reproduce:
a) rez a prim, then take it into inventory
b) attach prim to the skull, move it up a few meters
c) detach and wear to confirm that it has saved the attach point and position (will be above head)
d) rez the object again, then take it back into inventory
e) wear the prim. This time it will attach to the left hand.
TagsNo tags attached.
Git Revision or version number5e759338cab4
Run Mode Grid (Multiple Regions per Sim)
Physics EngineODE
Script Engine
Environment.NET / Windows32
Mono VersionNone
Viewer
Attached Filespatch file icon 0001-saveattach.patch [^] (27,351 bytes) 2012-11-25 07:29 [Show Content]

- Relationships
related to 0006622resolvedtampa Attachment point gets lost after rezzing on the ground 

-  Notes
(0020477)
justincc (administrator)
2011-12-09 16:31

Is this still an issue on current OpenSim dev code?
(0021834)
justincc (administrator)
2012-07-19 16:08

I believe this is resolved in current opensim dev code.
(0023179)
manni99 (reporter)
2012-11-25 07:28

No, this has never worked in native Opensim, and is still an issue. The problem is that when an attachment gets rezzed in world, attachment point and position aren't preserved. When it is then taken back into inventory, all attachment info is lost. This can easily be reproduced by rezzing any attachment in world, taking it back into inventory, and then trying to wear the attachment. It will attach to the left hand at <0,0,0>.

The included patch adds fields to the database to preserve attachment info for in-world prims, and code changes to maintain the information. I have tested this on my own grid and it works. I hope that this patch or a modified version of it can be applied soon to fix this longstanding issue.

Note that although the patch file includes changes for MSSQL and SQLite, I've only tested this with MySQL.
(0023206)
justincc (administrator)
2012-12-07 13:41

Thanks manni99. I looked over this patch and though I haven't run it, in terms of fulfilling the functionality it looks fine (with one question below).

However, one reason that I personally haven't implemented this myself is because it requires an extension of the insanity of storing properties which only apply to a whole scene object group (in this case attach position and attach point) in every single prim yet only using the value in the root prim.

Unsusprisingly, this has proven a recipe for bugs, unnecessarily complicated code, cpu busy work and unnecessary memory use.

Rather, I would really want to look at the approach of creating a separate objects database table and serializing only one instance of the attach pos/last point values.

I appreciate this is a lot more (and more complex work) so I will try to do this myself soon, though if you want to take a shot that would also be cool. The database side is probably relatively easy - far harder is the serialization because of the way it has been coded. It's also a major enough change that I think it requires mailing list notice/discussion beforehand.

The one question about the patch itself that I had is why you're setting group.HasChanged() if you're using LastAttachPoint. Updating if necessary should already be taken care of in AttachToAgent().
(0023209)
melanie (administrator)
2012-12-07 17:37

The patch is overcomplex, touches too many files and also touches the database where that is not needed.
Avination has already fixed this without resorting to such extra fields and i would hope that we can extract our fix - it's really not so much code - soon for core.
So, -1 on this.
(0023210)
justincc (administrator)
2012-12-07 17:39

How are you avoiding touching the database if attachment positions and points need to be preserved on rezzed region objects?
(0023211)
justincc (administrator)
2012-12-07 17:56

Okay, talking further with Melanie it sounds like Avination's solution is purely in-memory and so wouldn't persist over server restarts. This has met all the use-cases they have come across.

manni99, are you meeting a particular use case for which attachment position persistence is essential? If so, could you describe it, please?
(0023220)
Toy_Wylie (reporter)
2012-12-11 02:36

Actually, an attachment must save its position when taken into inventory but not being worn, given to someone else, rezzed, left lying on the floor for weeks and then reattached. It's frustrating to pick up something and have it attach at the wrong spot when you spent hours to align it to your avatar *just right*. So the attachment point, position and rotation must be a persistent field rather than in-memory, being lost with a restart.

Scenario: I am building an avatar from prims, fine-tuning the positions and rotations to look right. Then I drop the attachments to take copies of them, work on the textures etc. Then the server crashes. Next time I come back, all my work will be lost (unless I am using extra positioning/rotation scripts, which I do currently).
(0023835)
melanie (administrator)
2013-05-07 11:37

This patch is less complete than Avination's solution. However, it has support for more databases.

We (Avination) would be happy to port our solution to core but it would be nice if you could then complete it by adding the needed database support for non-MySQL.
(0023836)
Isis Ophelia (reporter)
2013-05-08 00:55

Sounds great Melanie. Can your patch already be downloaded for those using MySQL?
(0023920)
orenh (administrator)
2013-05-22 07:48

I'm also interested in getting this into OpenSim.

Melanie, could you add your solution to core? It sounds like that would be the best implementation.

If that isn't possible then let's use this code. Or if you prefer, Justin, I could try to make it work with the dynamic attributes instead. In that case the data would only be stored in the root prim, at the cost of having these particular properties stored differently from other prim properties.
(0024215)
aleric (reporter)
2013-07-26 19:05
edited on: 2013-08-04 10:23

I updated Gregs patch to work with the current repository (see commit comment):
https://github.com/AlericInglewood/opensimulator/commit/4ff9fbca441110cc2b93edc7286e0e9339e61cbe [^]

(0024356)
orenh (administrator)
2013-09-18 06:20

I applied the patch and can confirm that it works great. Thanks mani99!

Please add this patch to OpenSim: it's a good fix and covers all the use-cases, including persistence in the database and OAR files. Several users on my grid have told me that this bug is a huge problem when creating attachments, so applying this fix will help a small but important constituency.
(0024381)
hack13 (reporter)
2013-09-21 12:33

I completely agree that this patch should be implemented into the core opensim branch, would defiantly resolve many issues with consistency between grids.
(0024384)
Teravus (administrator)
2013-09-22 20:09

(just a note, this was pulled from Aleric's Repo today, it contains a few things that may cause controversy though, so, be aware that some of it may be refactored or changed before this dev cycle is over)

- Issue History
Date Modified Username Field Change
2010-08-01 16:39 manni99 New Issue
2010-08-01 16:39 manni99 Git Revision => 5e759338cab4
2010-08-01 16:39 manni99 Run Mode => Grid (Multiple Regions per Sim)
2010-08-01 16:39 manni99 Physics Engine => ODE
2010-08-01 16:39 manni99 Environment => .NET / Windows32
2010-08-01 16:39 manni99 Mono Version => None
2011-12-09 16:31 justincc Note Added: 0020477
2012-07-19 16:08 justincc Note Added: 0021834
2012-07-19 16:08 justincc Status new => resolved
2012-07-19 16:08 justincc Resolution open => fixed
2012-07-19 16:08 justincc Assigned To => justincc
2012-11-25 07:28 manni99 Note Added: 0023179
2012-11-25 07:28 manni99 Status resolved => patch included
2012-11-25 07:29 manni99 File Added: 0001-saveattach.patch
2012-12-07 13:41 justincc Note Added: 0023206
2012-12-07 13:41 justincc Status patch included => patch feedback
2012-12-07 17:37 melanie Note Added: 0023209
2012-12-07 17:39 justincc Note Added: 0023210
2012-12-07 17:56 justincc Note Added: 0023211
2012-12-11 02:36 Toy_Wylie Note Added: 0023220
2013-05-07 11:34 dz Relationship added related to 0006622
2013-05-07 11:37 melanie Note Added: 0023835
2013-05-08 00:55 Isis Ophelia Note Added: 0023836
2013-05-22 07:48 orenh Note Added: 0023920
2013-07-26 19:05 aleric Note Added: 0024215
2013-08-04 10:23 aleric Note Edited: 0024215 View Revisions
2013-09-18 06:20 orenh Note Added: 0024356
2013-09-21 12:33 hack13 Note Added: 0024381
2013-09-22 20:09 Teravus Note Added: 0024384
2013-09-22 20:09 Teravus Status patch feedback => resolved
2013-09-22 20:09 Teravus Resolution fixed => suspended
2013-10-15 10:51 Teravus Resolution suspended => fixed
2014-07-29 13:43 chi11ken Status resolved => closed


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker