Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007157opensim[REGION] Script Functionspublic2014-05-08 09:132016-06-27 02:29
Reporterdjphil 
Assigned ToDiva 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformPCOSWindowsOS VersionSeven
Product Version 
Target VersionFixed in Version 
Summary0007157: llGetAgentLanguage(llDetectedKey(0)) return always en-us
DescriptionllGetAgentLanguage(llDetectedKey(0)) return always en-us with singularity (and with Firestorm too)
TagsNo tags attached.
Git Revision or version numberOsGrid 0.8.0
Run Mode Grid (Multiple Regions per Sim)
Physics EngineBulletSim
Environment.NET / Windows32
Mono VersionNone
ViewerSingularity, FireStorm
Attached Filesdiff file icon AgentPrefs.diff [^] (20,731 bytes) 2015-06-05 07:57 [Show Content]
diff file icon AgentPrefs2.diff [^] (14,218 bytes) 2015-06-05 17:14 [Show Content]
diff file icon AgentPrefs3.diff [^] (67,252 bytes) 2015-06-12 17:49 [Show Content]
diff file icon agentprefs4.diff [^] (2,611 bytes) 2015-06-13 11:38 [Show Content]
patch file icon 0001-AgentPreferences-SQLLite-Migration-update-Mantis-715.patch [^] (1,216 bytes) 2015-06-13 17:40 [Show Content]
txt file icon OpenSim-r26072-Windows-8.1-Compile-Log.txt [^] (319,940 bytes) 2015-06-14 03:04
diff file icon AgentPrefsWarns.diff [^] (4,030 bytes) 2015-06-14 07:46 [Show Content]
diff file icon AgentPrefsLSL.diff [^] (1,555 bytes) 2015-06-21 07:10 [Show Content]
diff file icon RobustTypoFix.diff [^] (1,228 bytes) 2015-06-21 07:20 [Show Content]
jpg file icon 2015-06-21-OpenSim-26087-Default-Permissions-Save-Error.jpg [^] (34,289 bytes) 2015-06-22 05:07

- Relationships
related to 0007610resolvedkcozens PGSQL Commit 6f71d5, c1ddb7, 0fa94f for Agenpreferences lacks support for Postgres 

-  Notes
(0025985)
TBG Renfold (reporter)
2014-05-08 09:46

This is a copy of the function within Opensim:

        public LSL_String llGetAgentLanguage(string id)
        {
            // This should only return a value if the avatar is in the same region
            //ckrinke 1-30-09 : This needs to parse the XMLRPC language field supplied
            //by the client at login. Currently returning only en-us until our I18N
            //effort gains momentum
            m_host.AddScriptLPS(1);
            return "en-us";
        }

Unfortunately, at this time, the function is fixed at "en-us".
(0025991)
djphil (reporter)
2014-05-08 10:59
edited on: 2014-05-08 11:04

Ok then i propose my first C# contribution to OpenSimulator

public LSL_String llGetAgentLanguage(string id)
{
    if (!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID))
        return "";
    IAgentConnector AgentFrontend = Framework.Utilities.DataManager.RequestPlugin<IAgentConnector>();
    if (AgentFrontend == null)
        return "en-us";
    IAgentInfo Agent = AgentFrontend.GetAgent(new UUID(id));
    if (Agent == null)
        return "en-us";
    if (Agent.LanguageIsPublic)
    {
        return Agent.Language;
    }
    return "en-us";
}

(0025992)
nebadon (administrator)
2014-05-08 11:15

please create a proper patch and attach it to this mantis as outlined here > http://opensimulator.org/wiki/Git#Creating_a_Patch [^] this way you get credit for the work on when it is commited, thank you.
(0025993)
djphil (reporter)
2014-05-08 11:19

Ouch, hard for me ...
Justin has pointed out to me that there was no "IAgentConnector" in OpenSim.
This piece of code is not enough.
Okay, at least I have tried ^^
(0026603)
djphil (reporter)
2014-07-26 04:44

Currently in Version v0.8.1 OSG I found that the problem persists. Have you tried to fix this bug? I do not see any information about it. Thank you in advance.
(0028388)
djphil (reporter)
2015-05-17 08:38

Currently in Version v0.8.2.0 Dev adf0f49 (2015-05-09 (Win/Net) i found that the problem persists.

Have you tried to fix this bug ?

I do not see any information about it.

Thank you in advance.
(0028403)
nebadon (administrator)
2015-05-20 12:02

please create a proper patch > http://opensimulator.org/wiki/Git#Creating_a_Patch [^]
(0028404)
djphil (reporter)
2015-05-20 13:19

I do not know C#
(0028602)
cinderblocks (reporter)
2015-06-05 07:56

Uploaded a patch that adds support for this, to do this it also adds a new table and support for the capability the viewer needs to update the language, as well as adding support for two other linden caps and relevant fields in the table. Future things can be hooked up to this like AvatarHover properties, etc.

This only has janky MySQL support. I don't have time to add SQLite or PGSQL right now, but if anyone wants to help out with that, be my guest. It should be pretty straightforward to add. It's not doing anything fancy db-wise, just read-write.
(0028614)
Diva (administrator)
2015-06-05 16:56

Thanks, Cinder. Do you mind changing the copyright line in your new files so that they are consistent with OpenSim?

/*
 * Copyright (c) Contributors, http://opensimulator.org/ [^]
 * See CONTRIBUTORS.TXT for a full list of copyright holders.
...
(0028615)
cinderblocks (reporter)
2015-06-05 17:08

Oops, I forgot to do that when I copied those files out. I'll do that, yes. :)
(0028616)
Diva (administrator)
2015-06-05 17:19

This is a good start, but we need to change the way this module interacts with the data layer. The architecture in OpenSim is that everything in the data layer is accessed via a service, which can either be locally instantiated (for standalones) or remote (robust). In a grid, the user preferences should be stored centrally. In order for this to work fully, there's a lot more that needs to be coded -- the service and the network connectors.

If you want to do it yourself, so you get acquainted with those parts of OpenSim, I can walk you through it. Otherwise, I can do it sometime TBD.
(0028617)
cinderblocks (reporter)
2015-06-05 17:31

Ok, that makes sense. I'm somewhat familiar with writing a robust service, not so much with how the network connectors from the simulators work, so any help with figuring that out would be appreciated.
(0028618)
Diva (administrator)
2015-06-05 17:54
edited on: 2015-06-05 21:53

Great! There's a fair amount of components that you need to add, but they all follow the same patterns as the existing ones, you can do a lot by copy-paste...

Here's the things you need to add:

* in OpenSim.Services.Interfaces:
  Add a IUserPreferencesService interface. See others like IAvatarService

* in OpenSim.Services.UserAccountService:
add new classes UserPreferencesService, the service, and UserPreferencesServiceBase. It should implement the interface above, and it's the only one that interacts with the data layer. It's ok to add this service to this dll, as this dll is all about user account services. There's 2 already, this will be number 3. Check the others.

---- Now for the network connectors

* in OpenSim.Server.Handlers:
make a new folder there for the UserPreferences handler. You may want to code it very similarly to, for example, the Avatar or the GridUser ones. They're all very similar. We use a light-weight RPC over POST.
This is the part that plugs in a Robust server.

* in OpenSim.Services.Connectors:
make a new folder there for the UserPreferences sim-side network connector. Again, look at Avatar or GridUser.
This is the part that runs in a grided-sim.

* in OpenSim.Region.CoreModules, under ServiceConnectorsOut:
make a new folder there for the UserPreferences modules. There should be 1 Local (for standalones) and 1 Remote (for grided sims). Again, look at Avatar or GridUser.

* One last thing, you may want to add a property in Scene.cs that always holds the right reference to the UserPreferencesService, so that all region modules (like this new one with new caps) can just grab it. See declaration of, for example, AvatarService in Scene.cs, line 711. (I'm just noticing the awful identation of these properties, I suspect it was the MOSES patch that did it)

* Finally, you need to add the additional configurations in Grid.ini and GridHypergrid.ini (both will use the Remote module of the point above), and Standalone.ini and StandaloneHypergrid.ini (both will use the Local module above).

(0028636)
djphil (reporter)
2015-06-07 02:01

I am very pleased that you care of this and thank you :)
(0028659)
cinderblocks (reporter)
2015-06-12 17:50

Well, that took some time, but here's the third patch with the required changes (and a few other things I spotted.)
(0028666)
Diva (administrator)
2015-06-13 08:42

Thanks, Cinder! Very nice!
This was almost correct, I just had to fix a couple of bugs -- see the commit I made after yours.

I tested it for standalone, but haven't tested it for grid yet. I hope it works.

[08:36] <cia-opensim> opensim: cinder * r6f71d5c2c658 OpenSim (6 files in 6 dirs):
[08:36] <cia-opensim> Support for Linden AgentPreferences capability and friends (UpdateAgentLanguage and UpdateAgentInformation) and Mantis 0007157
[08:36] <cia-opensim>
[08:36] <cia-opensim> Signed-off-by: Diva Canto <diva@metaverseink.com>
[08:36] <cia-opensim> http://opensimulator.org/viewgit/?a=commit&p=opensim&h=6f71d5c2c65802bd6b0196e825cabbfe8d34fe9e [^]
[08:36] <cia-opensim> opensim: cinder * rc1ddb7f05e33 OpenSim (4 files in 4 dirs):
[08:36] <cia-opensim> Relicense AgentPreferences files to BSD and OpenSimulator
[08:36] <cia-opensim>
[08:36] <cia-opensim> Signed-off-by: Diva Canto <diva@metaverseink.com>
[08:36] <cia-opensim> http://opensimulator.org/viewgit/?a=commit&p=opensim&h=c1ddb7f05e337a65c9505ea714879038b9a215d4 [^]
[08:37] <cia-opensim> opensim: cinder * r0fa94f222df8 / (21 files in 13 dirs):
[08:37] <cia-opensim> Refactor AgentPreferences so that database operations happen centrally. the opensim way.
[08:37] <cia-opensim>
[08:37] <cia-opensim> Signed-off-by: Diva Canto <diva@metaverseink.com>
[08:36] <cia-opensim> opensim: diva * rbcb8a7d7f935 / (5 files in 4 dirs):
[08:36] <cia-opensim> A few bug fixes for Agent Preferences to actually work. Also added missing config for standalone.
[08:36] <cia-opensim> http://opensimulator.org/viewgit/?a=commit&p=opensim&h=bcb8a7d7f935c37d6d83aac6a9ba4988e59814c7 [^]
(0028667)
aiaustin (developer)
2015-06-13 09:28
edited on: 2015-06-13 09:33

I updated the Openvue grid to r/26067 with the AgentPreferences changes... taking care, I think, to update the required Robust.HG.ini and config-include/GridCommon.ini files... but on login I get this error with no action to set or change anything at all... along with a popup in the viewer...

    There was a problem saving the default permissions due to the
    following reason: STATUS_ERROR. Please try setting the default
    permissions later.

17:26:02 - [AgentPrefs]: UpdateAgentPreferences for e24a9015-f5ca-452b-8c95-d32e34cb9d64
17:26:02 - [BASE HTTP SERVER]: HandleRequest() threw exception System.NullReferenceException: Object reference not set to an instance of an object.
   at OpenSim.Region.ClientStack.LindenCaps.AgentPreferencesModule.UpdateAgentPreferences(String request, String path, String param, UUID agent) in d:\Temp\opensim-bcb8a7d\OpenSim\Region\ClientStack\Linden\Caps\AgentPreferencesModule.cs:line 123
   at OpenSim.Region.ClientStack.LindenCaps.AgentPreferencesModule.<>c__DisplayClass6.<RegisterCaps>b__3(String request, String path, String param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) in d:\Temp\opensim-bcb8a7d\OpenSim\Region\ClientStack\Linden\Caps\AgentPreferencesModule.cs:line 101
   at OpenSim.Framework.Servers.HttpServer.RestStreamHandler.ProcessRequest(String path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) in d:\Temp\opensimbcb8a7d\OpenSim\Framework\Servers\HttpServer\RestStreamHandler.cs:line 60
   at OpenSim.Framework.Servers.HttpServer.BaseStreamHandler.Handle(String path,
 Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) in d:\Temp\opensim-bcb8a7d\OpenSim\Framework\Servers\HttpServer\BaseStreamHandler.cs: line 72
   at OpenSim.Framework.Servers.HttpServer.BaseHttpServer.HandleReques(OSHttpRequest request, OSHttpResponse response) in d:\Temp\opensim-bcb8a7d\OpenSim\Framework\Servers\HttpServer\BaseHttpServer.cs:line 560

I also note one new warning on compiling under Windows 8.1.

(0028668)
cinderblocks (reporter)
2015-06-13 09:33
edited on: 2015-06-13 09:35

Hmm, looks like it's missing AgentPreferencesService on the sim-side. What is the line you added to GridHypergrid.ini?

It should read:
    AgentPreferencesServices= "RemoteAgentPreferencesServicesConnector"
for grid mode.

(0028669)
aiaustin (developer)
2015-06-13 09:37
edited on: 2015-06-22 05:02

Subsequent logins give the error twice in the OpenSim.exe console, but do not show the popup STATUS_ERROR message in the viewer itself.


17:37:05 - [AgentPrefs]: UpdateAgentPreferences for e24a9015-f5ca-452b-8c95-d32e
34cb9d64
17:37:05 - [BASE HTTP SERVER]: HandleRequest() threw exception System.NullRefere
nceException: Object reference not set to an instance of an object.
   at OpenSim.Region.ClientStack.LindenCaps.AgentPreferencesModule.UpdateAgentPr
eferences(String request, String path, String param, UUID agent) in d:\Temp\open
sim-bcb8a7d\OpenSim\Region\ClientStack\Linden\Caps\AgentPreferencesModule.cs:lin
e 123
   at OpenSim.Region.ClientStack.LindenCaps.AgentPreferencesModule.<>c__DisplayC
lass6.<RegisterCaps>b__3(String request, String path, String param, IOSHttpReque
st httpRequest, IOSHttpResponse httpResponse) in d:\Temp\opensim-bcb8a7d\OpenSim
\Region\ClientStack\Linden\Caps\AgentPreferencesModule.cs:line 101
   at OpenSim.Framework.Servers.HttpServer.RestStreamHandler.ProcessRequest(Stri
ng path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpRespons
e) in d:\Temp\opensim-bcb8a7d\OpenSim\Framework\Servers\HttpServer\RestStreamHan
dler.cs:line 60
   at OpenSim.Framework.Servers.HttpServer.BaseStreamHandler.Handle(String path,
 Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) in d:
\Temp\opensim-bcb8a7d\OpenSim\Framework\Servers\HttpServer\BaseStreamHandler.cs:
line 72
   at OpenSim.Framework.Servers.HttpServer.BaseHttpServer.HandleRequest(OSHttpRe
quest request, OSHttpResponse response) in d:\Temp\opensim-bcb8a7d\OpenSim\Frame
work\Servers\HttpServer\BaseHttpServer.cs:line 560

17:37:05 - [ENTITY TRANSFER MODULE]: Informing Ai Austin e24a9015-f5ca-452b-8c95
-d32e34cb9d64 about neighbour Edinburgh North 129.215.219.144:9009 at (9048,9049
)
17:37:05 - [REMOTE SIMULATION CONNECTOR]: Creating agent at http://virtual3.aiai [^]
.ed.ac.uk:9000/
17:37:05 - [ENTITY TRANSFER MODULE]: Openvue is sending Ai Austin EnableSimulato
r for neighbour region Edinburgh North(loc=<2316288,2316544>,siz=<256,256>) and
EstablishAgentCommunication with seed cap http://virtual3.aiai.ed.ac.uk:9000/CAP [^]
S/e77018b2-068d-49e5-8fc1-0e2a6a554b240000/
17:37:05 - [ENTITY TRANSFER MODULE]: Completed inform Ai Austin e24a9015-f5ca-45
2b-8c95-d32e34cb9d64 about neighbour 129.215.219.144:9009
17:37:06 - [ENTITY TRANSFER MODULE]: Informing Ai Austin e24a9015-f5ca-452b-8c95
-d32e34cb9d64 about neighbour Edinburgh Uplands 129.215.219.144:9002 at (9049,90
49)
17:37:06 - [REMOTE SIMULATION CONNECTOR]: Creating agent at http://virtual3.aiai [^]
.ed.ac.uk:9000/
17:37:06 - [ENTITY TRANSFER MODULE]: Openvue is sending Ai Austin EnableSimulato
r for neighbour region Edinburgh Uplands(loc=<2316544,2316544>,siz=<256,256>) an
d EstablishAgentCommunication with seed cap http://virtual3.aiai.ed.ac.uk:9000/C [^]
APS/4956c4f8-72d5-46b4-8c75-b71a8af554f70000/
17:37:06 - [ENTITY TRANSFER MODULE]: Completed inform Ai Austin e24a9015-f5ca-45
2b-8c95-d32e34cb9d64 about neighbour 129.215.219.144:9002
17:37:06 - [ENTITY TRANSFER MODULE]: Informing Ai Austin e24a9015-f5ca-452b-8c95
-d32e34cb9d64 about neighbour Edinburgh East 129.215.219.144:9003 at (9049,9048)

17:37:06 - [REMOTE SIMULATION CONNECTOR]: Creating agent at http://virtual3.aiai [^]
.ed.ac.uk:9000/
17:37:07 - [ENTITY TRANSFER MODULE]: Openvue is sending Ai Austin EnableSimulato
r for neighbour region Edinburgh East(loc=<2316544,2316288>,siz=<256,256>) and E
stablishAgentCommunication with seed cap http://virtual3.aiai.ed.ac.uk:9000/CAPS [^]
/980d6cbd-f03f-492b-9acb-6a07a1922fd10000/
17:37:07 - [ENTITY TRANSFER MODULE]: Completed inform Ai Austin e24a9015-f5ca-45
2b-8c95-d32e34cb9d64 about neighbour 129.215.219.144:9003
17:37:09 - [XBakes]: read 5 textures for user e24a9015-f5ca-452b-8c95-d32e34cb9d
64
17:37:09 - [AVFACTORY]: Received texture update for Ai Austin e24a9015-f5ca-452b
-8c95-d32e34cb9d64
17:37:09 - [XBakes]: stored 5 textures for user e24a9015-f5ca-452b-8c95-d32e34cb
9d64
17:37:09 - [XBakes]: read 5 textures for user e24a9015-f5ca-452b-8c95-d32e34cb9d
64
17:37:11 - [PROFILES]: PicksRequest Openvue
17:37:11 - [AgentPrefs]: UpdateAgentPreferences for e24a9015-f5ca-452b-8c95-d32e
34cb9d64
17:37:11 - [BASE HTTP SERVER]: HandleRequest() threw exception System.NullRefere
nceException: Object reference not set to an instance of an object.
   at OpenSim.Region.ClientStack.LindenCaps.AgentPreferencesModule.UpdateAgentPr
eferences(String request, String path, String param, UUID agent) in d:\Temp\open
sim-bcb8a7d\OpenSim\Region\ClientStack\Linden\Caps\AgentPreferencesModule.cs:lin
e 123
   at OpenSim.Region.ClientStack.LindenCaps.AgentPreferencesModule.<>c__DisplayC
lass6.<RegisterCaps>b__3(String request, String path, String param, IOSHttpReque
st httpRequest, IOSHttpResponse httpResponse) in d:\Temp\opensim-bcb8a7d\OpenSim
\Region\ClientStack\Linden\Caps\AgentPreferencesModule.cs:line 101
   at OpenSim.Framework.Servers.HttpServer.RestStreamHandler.ProcessRequest(Stri
ng path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpRespons
e) in d:\Temp\opensim-bcb8a7d\OpenSim\Framework\Servers\HttpServer\RestStreamHan
dler.cs:line 60
   at OpenSim.Framework.Servers.HttpServer.BaseStreamHandler.Handle(String path,
 Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) in d:
\Temp\opensim-bcb8a7d\OpenSim\Framework\Servers\HttpServer\BaseStreamHandler.cs:
line 72
   at OpenSim.Framework.Servers.HttpServer.BaseHttpServer.HandleRequest(OSHttpRe
quest request, OSHttpResponse response) in d:\Temp\opensim-bcb8a7d\OpenSim\Frame
work\Servers\HttpServer\BaseHttpServer.cs:line 560

(0028670)
aiaustin (developer)
2015-06-13 09:40

GridHypergrid.ini is not a file the grid configurer is meant to change Cinder... so its the release version in r/26067 I am using... and I just checked and it does indeed contain

    AgentPreferencesServices= "RemoteAgentPreferencesServicesConnector"
(0028671)
cinderblocks (reporter)
2015-06-13 09:45
edited on: 2015-06-13 09:46

From the sim console, if you type 'show modules' do you see RemoteAgentPreferencesServicesConnector in the list of modules?

and is

[AGENT PREFERENCES CONNECTOR]: Remote agent preferences enabled

in the log when the sim starts up?

(0028672)
aiaustin (developer)
2015-06-13 09:49

Yes I do... luckily in the visible part in the console scroll back. even with the max console history there were so many modules it filled the history window and its not echoed to openSim.log!

New Region Module (Shared): RemoteAgentPreferencesServicesConnector
(0028673)
aiaustin (developer)
2015-06-13 10:04
edited on: 2015-06-13 10:10

Yes, I do have the Remote agent preferences enabled message in OpenSim.log

2015-06-13 17:57:12,499 INFO - OpenSim.Region.CoreModules.ServiceConnectorsOut.AgentPreferences.RemoteAgentPreferencesServicesConnector [AGENT PREFERENCES CONNECTOR]: Remote agent preferences enabled

hang on... hmmm. on that restart the agent preferences now seem to be being stored...

18:00:11 - [AgentPrefs]: UpdateAgentPreferences for e24a9015-f5ca-452b-8c95-d32e34cb9d64

I think I need to check if child regions are an issue. Could it be that adjacent/child regions are an issue? Or is it only the single region that the avatar is on uses the agent preferences check and update?

I will update all separate addon region servers to be sure.

(0028674)
Diva (administrator)
2015-06-13 10:18

FYI, this works for me on a grided sim [without neighbors]. I'll add a guard to the code to make sure those exceptions don't happen in neighboring regions that aren't updated.

(A deeper related problem is to avoid sending those capabilities in neighboring sims altogether, because the viewer seems a bit dumb about who to contact for many of these features -- it contacts everyone it knows about)
(0028676)
cinderblocks (reporter)
2015-06-13 11:39

Added null guard patch that returns a null llsd block which should work well enough and give viewer developers some indication of what's going on if this happens.

Also fixed a copy and paste error.
(0028683)
Diva (administrator)
2015-06-13 13:38

[13:37] <cia-opensim> opensim: cinder * r044654b5a9db OpenSim/Region (2 files in 2 dirs):
[13:37] <cia-opensim> Guard against scenes without an agent prefs service and a copy and paste fix
[13:37] <cia-opensim>
[13:37] <cia-opensim> Signed-off-by: Diva Canto <diva@metaverseink.com>
[
(0028689)
zadark (reporter)
2015-06-13 17:41

[PATCH] Correct minor syntax errors preventing SQL Lite migration
File: 0001-AgentPreferences-SQLLite-Migration-update-Mantis-715.patch
(0028690)
Diva (administrator)
2015-06-13 22:13

Thanks Zadark!

[22:11] <cia-opensim> opensim: zadarkportal * r54c1659934db OpenSim/Data/SQLite/Resources (AgentPrefs.migrations):
[22:11] <cia-opensim> AgentPreferences SQLLite Migration update Mantis 0007157
[22:11] <cia-opensim>
[22:11] <cia-opensim> Signed-off-by: Diva Canto <diva@metaverseink.com>
(0028694)
aiaustin (developer)
2015-06-14 03:04

The commits have added three new compiler warnings on Windows 8.1.. while we can identify the specific area these were in can these be tidied up? I THINK its just one issue but repeated in the MySQL, PGSQL and SQLite code.

MySQLAgentPreferencesData.cs(55,21): warning CS0114: 'OpenSim.Data.MySQL.MySQLAgentPreferencesData.Store(OpenSim.Data.AgentPreferencesData)' hides inherited member 'OpenSim.Data.MySQL.MySQLGenericTableHandler<OpenSim.Data.AgentPreferencesData>.Store(OpenSim.Data.AgentPreferencesData)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword. [D:\Temp\opensim-54c1659\OpenSim\Data\MySQL\OpenSim.Data.MySQL.csproj]

PGSQLAgentPreferencesData.cs(55,21): warning CS0114: 'OpenSim.Data.PGSQL.PGSQLAgentPreferencesData.Store(OpenSim.Data.AgentPreferencesData)' hides inherited member 'OpenSim.Data.PGSQL.PGSQLGenericTableHandler<OpenSim.Data.AgentPreferencesData>.Store(OpenSim.Data.AgentPreferencesData)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword. [D:\Temp\opensim-54c1659\OpenSim\Data\PGSQL\OpenSim.Data.PGSQL.csproj]

SQLiteAgentPreferencesData.cs(59,21): warning CS0114: 'OpenSim.Data.SQLite.SQLiteAgentPreferencesData.Store(OpenSim.Data.AgentPreferencesData)' hides inherited member 'OpenSim.Data.SQLite.SQLiteGenericTableHandler<OpenSim.Data.AgentPreferencesData>.Store(OpenSim.Data.AgentPreferencesData)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword. [D:\Temp\opensim-54c1659\OpenSim\Data\SQLite\OpenSim.Data.SQLite.csproj]

I add a log of a compile trace on my Windows 8.1 setup showing 24 warnings.. it was 21 before the changes for this issue. File "OpenSim-r26072-Windows-8.1-Compile-Log.txt"
(0028695)
aiaustin (developer)
2015-06-14 07:19
edited on: 2015-06-14 07:22

Even on a grid using the latest patches/commits to r/26072 and with all region servers updated, and without any obvious errors on the OpenSim.exe region consoles for the main login region or all nearby child regions, I still am seeing the viewer give a popup

    There was a problem saving the default permissions due to the
    following reason: STATUS_ERROR. Please try setting the default
    permissions later.

I am only logging in, not trying to set anything or open any tool.

I see on the OpernSim.exe console about 6 or more[AgentPrefs]: UpdateAgentPreferences for the logging in avatar...


15:08:28 - [AgentPrefs]: UpdateAgentPreferences for ff0a6e25-15cf-4294-9374-4ce8cdec65eb
15:08:28 - [AgentPrefs]: UpdateAgentPreferences for ff0a6e25-15cf-4294-9374-4ce8cdec65eb
15:08:28 - [AgentPrefs]: UpdateAgentPreferences for ff0a6e25-15cf-4294-9374-4ce8cdec65eb
15:08:28 - [AgentPrefs]: UpdateAgentPreferences for ff0a6e25-15cf-4294-9374-4ce8cdec65eb
15:08:28 - [AgentPrefs]: UpdateAgentPreferences for ff0a6e25-15cf-4294-9374-4ce8cdec65eb

15:08:30 - [XBakes]: read 5 textures for user ff0a6e25-15cf-4294-9374-4ce8cdec65eb
15:08:30 - [AVFACTORY]: Received texture update for Ai Austin ff0a6e25-15cf-4294-9374-4ce8cdec65eb
15:08:30 - [XBakes]: stored 5 textures for user ff0a6e25-15cf-4294-9374-4ce8cdec65eb
15:08:30 - [XBakes]: read 5 textures for user ff0a6e25-15cf-4294-9374-4ce8cdec65eb
15:08:30 - [PROFILES]: PicksRequest Welcome

15:08:31 - [AgentPrefs]: UpdateAgentPreferences for ff0a6e25-15cf-4294-9374-4ce8cdec65eb

(0028697)
cinderblocks (reporter)
2015-06-14 07:48
edited on: 2015-06-14 07:53

Attached a patch to quell the build warnings and hopefully appease Firestorm parsing that return block. I just realized that my whitespace is different so that patch may not apply cleanly, I can modify it if need be, but I'll cross my fingers for now.

Are you running multiple regions per sim, Ai?

(0028698)
cinderblocks (reporter)
2015-06-14 07:50
edited on: 2015-06-14 07:50

AgentPreferences capability is being relied on more and more by sl viewers, that's why I thought it was important to contribute this upstream. I'm used to seeing two or three on login, I'm not surprised to see 5 or 6 now.

(0028701)
Diva (administrator)
2015-06-14 07:58

Ai, how many regions do you run per simulator? 1 region per sim? Multiple regions per sim?
(0028707)
aiaustin (developer)
2015-06-14 09:52
edited on: 2015-06-14 10:17

I always run multiple regions on each instance of OpenSim.exe but only ONE instance of OpenSim.exe on each server. We have 7 region servers for our two grids... Openvue and AiLand... and our addon OSGrid region servers. The regions are located close together even though they are across different servers, so will often be children of an arrival region. To fix a problem with terrain loading I now use a server side draw distance of 511.0m on our grids, so child regions will be up to 2 regions away. All our regions ar normal 256m X 256m Nd we have never enabled megaregions or varregions. We run between 3 regions (on core and arrival regions) and 8 regions (on occasional use demonstration regions) on each instance. Servers vary between 4Gb and 32 GB of physical memory.

(0028708)
Diva (administrator)
2015-06-14 09:56

ok, that explains the multiple messages on the console. There should be one per region. Nothing we can do about that for now -- the viewer insists on contacting all regions it knows about for agent preferences.
(0028710)
aiaustin (developer)
2015-06-14 10:16

Warnings.. well quelled Cinder and Diva :-)
(0028711)
cinderblocks (reporter)
2015-06-14 10:17

Once we're sure everything is running smoothly, that debug line can probably be dropped to quiet down the console spam.
(0028712)
aiaustin (developer)
2015-06-14 10:24

I have updated AiLand and Openvue grids to r/16081 with these fixes.

I suggest we leave this Mantis open until the OSGrid addon region distribution is released and tested by a few folks, as that will show an interesting mix of server setups.
(0028761)
djphil (reporter)
2015-06-21 05:19

Hello, i put my simulator up to date today

OSgrid 0.8.2.0 (Dev) 7edaf1d: 2015-06-19
git hash : 7edaf1d851c5d2350deb93641d775e336d175a32

and i get a error when i try to use llGetAgentLanguage

default
{
    touch_start(integer number)
    {
        llSay(PUBLIC_CHANNEL, "Language = " + llGetAgentLanguage(llDetectedKey(0)));
    }
}

Error is :

System.Reflection.TargetInvocationException: Une exception a été levée par la cible d'un appel. ---> System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.

   à OpenSim.Region.ScriptEngine.Shared.Api.LSL_Api.llGetAgentLanguage(String id) dans k:\OSGRID\opensim-7edaf1d\OpenSim\Region\ScriptEngine\Shared\Api\Implementation\LSL_Api.cs:ligne 6155

   à OpenSim.Region.ScriptEngine.Shared.ScriptBase.ScriptBaseClass.llGetAgentLanguage(String id) dans k:\OSGRID\opensim-7edaf1d\OpenSim\Region\ScriptEngine\Shared\Api\Runtime\LSL_Stub.cs:ligne 389

   à SecondLife.XEngineScript.default_event_touch_start(LSLInteger number) dans c:\Users\djphil\AppData\Local\Temp\ntbekech.0.cs:ligne 13

   --- Fin de la trace de la pile d'exception interne ---

   à System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

   à System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Obj
(0028762)
aiaustin (developer)
2015-06-21 06:56
edited on: 2015-06-21 06:59

Should OpenSim.exe report a (red) error if it does not find a valid

[AgentPreferencesService]
   AgentPreferencesServerURI =

in OpenSim.ini (usually via config-include/GridCommon.ini) ?

Since the server side of some grids may not support this or not have been updated... e.g. as on the latest r/26085 based OSGrid add on region download. Perhaps this OpenSim.exe startup message should be a yellow WARNING at most? Or better, just a white INFO level message rather than a red ERROR.

(0028763)
cinderblocks (reporter)
2015-06-21 07:01

I would think it should be an error; it's a misconfiguration. Why is the region module enabled at all if there's no robust service to back it?
(0028764)
cinderblocks (reporter)
2015-06-21 07:12

Attached a patch to null check for AgentPrefs service in llGetAgentLanguage() should squash the exception djphil posted. (AgentPrefsLSL.diff)
(0028765)
nebadon (administrator)
2015-06-21 07:12
edited on: 2015-06-21 07:13

We tried last night to get this going on the OSgrid Robust, but we had no luck it produces the following error on Robust console:

19:24:26 - [SERVER UTILS]: Error loading plugin from Opensim.Services.UserAccountService.dll
System.IO.FileNotFoundException: Could not load file or assembly 'Opensim.Services.UserAccountService.dll' or one of its dependencies. The system cannot find the file specified.
File name: 'Opensim.Services.UserAccountService.dll'
  at (wrapper managed-to-native) System.Reflection.Assembly:LoadFrom (string,bool)
  at System.Reflection.Assembly.LoadFrom (System.String assemblyFile) [0x00000] in <filename unknown>:0
  at OpenSim.Server.Base.ServerUtils.LoadPlugin[IAgentPreferencesService] (System.String dllName, System.String className, System.Object[] args) [0x00000] in <filename unknown>:0

Someone else also tried and had the same exact issue. We are running our robust under Mono in Linux.

(0028766)
cinderblocks (reporter)
2015-06-21 07:14

"Opensim.Services.UserAccountService.dll"

Should be OpenSim.Services.UserAccountService.dll
(0028767)
cinderblocks (reporter)
2015-06-21 07:20
edited on: 2015-06-21 07:20

Attached a patch with the fix. Should work for you guys. (RobustTypoFix.diff) Sorry about that. :)

(0028768)
Diva (administrator)
2015-06-21 08:44

[08:44] <cia-opensim> opensim: cinder * ra91f32e2c739 OpenSim/Region/ScriptEngine/Shared/Api/Implementation (LSL_Api.cs):
[08:44] <cia-opensim> Guard against null AgentPrefs service in llGetAgentLanguage()
[08:44] <cia-opensim>
[08:44] <cia-opensim> Signed-off-by: Diva Canto <diva@metaverseink.com>
[08:44] <cia-opensim> http://opensimulator.org/viewgit/?a=commit&p=opensim&h=a91f32e2c739edfce310a4baa43b7256e1a8fa9f [^]
[08:44] <cia-opensim> opensim: cinder * re99be0bb19d0 bin (Robust.HG.ini.example Robust.ini.example):
[08:44] <cia-opensim> Fix my typo, the dll is named OpenSim, not Opensim
[08:44] <cia-opensim>
[08:44] <cia-opensim> Signed-off-by: Diva Canto <diva@metaverseink.com>
(0028773)
idb (manager)
2015-06-21 17:59

Possibly I am missing something, why is data that is sent at every login being persisted?
(0028774)
melanie (administrator)
2015-06-21 18:17

Just my question. This should never hit the database. This is a super complex solution for an easy problem. Isn't this going overboard a bit?
(0028778)
aiaustin (developer)
2015-06-22 05:04
edited on: 2015-06-23 07:06

On a grid (AiLand) that seems to be working normally with AgentPreferences service on the Robust services and on all region servers (all Windows 8.1), when I log in for the FIRST TIME with an avatar not previously used since the upgrade to include Agent preferences services, I still get this popup error in Firestorm 4.7.1...

    There was a problem saving the default permissions due to the
    following reason: STATUS_ERROR. Please try setting the default
    permissions later.

See attached image 2015-06-21-OpenSim-26087-Default-Permissions-Save-Error.jpg

If I log off and immediately back on there is no such error message. So it appears to be a first time login issue at least for some avatars on some regions.

Added note: it seems to happen more than the first time, but I have not pinned down yet the circumstances... perhaps first time when on a different computer for the viewer. But I am unsure of that.

If I see a pattern I will report it. But definitely this STATUS_ERROR message appears on a grid that has been running the Agent Preferences services on its Robust.exe setup and its OpenSim.exe servers for some days now.

(0028779)
djphil (reporter)
2015-06-22 05:30

For information, llGetAgentLanguage is implemented in Aurora-Sim and it works fine, maybe you can inspire him ...
(0028780)
Diva (administrator)
2015-06-22 09:28

Melanie, does the viewer remember the preferences across sessions without the server needing to know about them? Is the storing of this data on the DB just so that llGetAgentLanguage and friends work?
(0028800)
tglion (reporter)
2015-06-24 23:21

Mhhh, why store this in a database?
Does it not suffice to hold this only in the user-session?
Does the viewer not know the language and sends this information to the regionserver after login?
(0028842)
djphil (reporter)
2015-06-29 07:37

I tested today and it works fine on OSGrid region.
A big thank you for your work!

Have you finished your discussion on this?
If so, then maybe i can close this mantis.
(0028843)
melanie (administrator)
2015-06-29 12:52

The documentation implies that this function only works when the avatar is in the region. Persistence is not required nor is it beneficial. The possibility of abusing this for mass statistics collection exists if the value is persisted and obtainable while the avatar is not in the region and interacting with the object.

I move to remove persistence as it serves no useful function.
(0028844)
aiaustin (developer)
2015-06-29 17:55
edited on: 2015-06-29 18:08

Please advise on the database tables or fields that should be removed IF AND ONLY IF this functionality is EVENTUALLY removed from dev master just so those of us testing don't end up with clutter.

(0028845)
melanie (administrator)
2015-06-29 18:00

Nothing is decided yet. I just tabled a motion.
(0030796)
djphil (reporter)
2016-06-27 02:29

Works well, thank you.

- Issue History
Date Modified Username Field Change
2014-05-08 09:13 djphil New Issue
2014-05-08 09:36 aiaustin Summary llGetAgentLanguage(llDetectedKey(0)) return allway en-us => llGetAgentLanguage(llDetectedKey(0)) return always en-us
2014-05-08 09:36 aiaustin Description Updated View Revisions
2014-05-08 09:46 TBG Renfold Note Added: 0025985
2014-05-08 10:59 djphil Note Added: 0025991
2014-05-08 11:00 djphil Status new => patch included
2014-05-08 11:04 djphil Note Edited: 0025991 View Revisions
2014-05-08 11:04 djphil Note Edited: 0025991 View Revisions
2014-05-08 11:15 nebadon Note Added: 0025992
2014-05-08 11:19 djphil Note Added: 0025993
2014-07-26 04:44 djphil Note Added: 0026603
2015-05-17 08:38 djphil Note Added: 0028388
2015-05-20 12:02 nebadon Note Added: 0028403
2015-05-20 13:19 djphil Note Added: 0028404
2015-06-05 07:53 cinderblocks File Added: patch.diff
2015-06-05 07:56 cinderblocks Note Added: 0028602
2015-06-05 07:56 cinderblocks File Deleted: patch.diff
2015-06-05 07:57 cinderblocks File Added: AgentPrefs.diff
2015-06-05 16:56 Diva Note Added: 0028614
2015-06-05 17:08 cinderblocks Note Added: 0028615
2015-06-05 17:14 cinderblocks File Added: AgentPrefs2.diff
2015-06-05 17:19 Diva Note Added: 0028616
2015-06-05 17:31 cinderblocks Note Added: 0028617
2015-06-05 17:54 Diva Note Added: 0028618
2015-06-05 21:53 Diva Note Edited: 0028618 View Revisions
2015-06-07 02:01 djphil Note Added: 0028636
2015-06-12 17:49 cinderblocks File Added: AgentPrefs3.diff
2015-06-12 17:50 cinderblocks Note Added: 0028659
2015-06-13 07:49 Diva Assigned To => Diva
2015-06-13 07:49 Diva Status patch included => assigned
2015-06-13 08:42 Diva Note Added: 0028666
2015-06-13 08:55 Diva Status assigned => resolved
2015-06-13 08:55 Diva Resolution open => fixed
2015-06-13 09:28 aiaustin Note Added: 0028667
2015-06-13 09:28 aiaustin Status resolved => feedback
2015-06-13 09:28 aiaustin Resolution fixed => reopened
2015-06-13 09:29 aiaustin Note Edited: 0028667 View Revisions
2015-06-13 09:29 aiaustin Note Edited: 0028667 View Revisions
2015-06-13 09:30 aiaustin Note Edited: 0028667 View Revisions
2015-06-13 09:31 aiaustin Note Edited: 0028667 View Revisions
2015-06-13 09:33 aiaustin Note Edited: 0028667 View Revisions
2015-06-13 09:33 cinderblocks Note Added: 0028668
2015-06-13 09:35 cinderblocks Note Edited: 0028668 View Revisions
2015-06-13 09:37 aiaustin Note Added: 0028669
2015-06-13 09:40 aiaustin Note Added: 0028670
2015-06-13 09:45 cinderblocks Note Added: 0028671
2015-06-13 09:46 cinderblocks Note Edited: 0028671 View Revisions
2015-06-13 09:49 aiaustin Note Added: 0028672
2015-06-13 10:04 aiaustin Note Added: 0028673
2015-06-13 10:05 aiaustin Note Edited: 0028673 View Revisions
2015-06-13 10:05 aiaustin Note Edited: 0028673 View Revisions
2015-06-13 10:10 aiaustin Note Edited: 0028673 View Revisions
2015-06-13 10:18 Diva Note Added: 0028674
2015-06-13 11:38 cinderblocks File Added: agentprefs4.diff
2015-06-13 11:39 cinderblocks Note Added: 0028676
2015-06-13 11:50 aiaustin Note Added: 0028677
2015-06-13 11:51 aiaustin Note Deleted: 0028677
2015-06-13 13:38 Diva Note Added: 0028683
2015-06-13 17:40 zadark File Added: 0001-AgentPreferences-SQLLite-Migration-update-Mantis-715.patch
2015-06-13 17:41 zadark Note Added: 0028689
2015-06-13 22:13 Diva Note Added: 0028690
2015-06-13 22:31 Diva Relationship added related to 0007610
2015-06-14 03:04 aiaustin Note Added: 0028694
2015-06-14 03:04 aiaustin File Added: OpenSim-r26072-Windows-8.1-Compile-Log.txt
2015-06-14 07:19 aiaustin Note Added: 0028695
2015-06-14 07:19 aiaustin Note Edited: 0028695 View Revisions
2015-06-14 07:22 aiaustin Note Edited: 0028695 View Revisions
2015-06-14 07:22 aiaustin Note Edited: 0028695 View Revisions
2015-06-14 07:46 cinderblocks File Added: AgentPrefsWarns.diff
2015-06-14 07:48 cinderblocks Note Added: 0028697
2015-06-14 07:50 cinderblocks Note Added: 0028698
2015-06-14 07:50 cinderblocks Note Edited: 0028698 View Revisions
2015-06-14 07:53 cinderblocks Note Edited: 0028697 View Revisions
2015-06-14 07:58 Diva Note Added: 0028701
2015-06-14 09:52 aiaustin Note Added: 0028707
2015-06-14 09:53 aiaustin Note Edited: 0028707 View Revisions
2015-06-14 09:56 Diva Note Added: 0028708
2015-06-14 09:56 aiaustin Note Edited: 0028707 View Revisions
2015-06-14 09:58 aiaustin Note Edited: 0028707 View Revisions
2015-06-14 09:59 aiaustin Note Edited: 0028707 View Revisions
2015-06-14 10:16 aiaustin Note Added: 0028710
2015-06-14 10:17 aiaustin Note Edited: 0028707 View Revisions
2015-06-14 10:17 cinderblocks Note Added: 0028711
2015-06-14 10:24 aiaustin Note Added: 0028712
2015-06-21 05:19 djphil Note Added: 0028761
2015-06-21 05:19 djphil Status feedback => assigned
2015-06-21 06:56 aiaustin Note Added: 0028762
2015-06-21 06:57 aiaustin Note Edited: 0028762 View Revisions
2015-06-21 06:59 aiaustin Note Edited: 0028762 View Revisions
2015-06-21 07:01 cinderblocks Note Added: 0028763
2015-06-21 07:10 cinderblocks File Added: AgentPrefsLSL.diff
2015-06-21 07:12 cinderblocks Note Added: 0028764
2015-06-21 07:12 nebadon Note Added: 0028765
2015-06-21 07:13 nebadon Note Edited: 0028765 View Revisions
2015-06-21 07:14 cinderblocks Note Added: 0028766
2015-06-21 07:18 cinderblocks File Added: RobustTypoFix.diff
2015-06-21 07:19 cinderblocks File Deleted: RobustTypoFix.diff
2015-06-21 07:20 cinderblocks File Added: RobustTypoFix.diff
2015-06-21 07:20 cinderblocks Note Added: 0028767
2015-06-21 07:20 cinderblocks Note Edited: 0028767 View Revisions
2015-06-21 08:44 Diva Note Added: 0028768
2015-06-21 17:59 idb Note Added: 0028773
2015-06-21 18:17 melanie Note Added: 0028774
2015-06-22 05:02 aiaustin Note Edited: 0028669 View Revisions
2015-06-22 05:04 aiaustin Note Added: 0028778
2015-06-22 05:04 aiaustin Note Edited: 0028778 View Revisions
2015-06-22 05:07 aiaustin File Added: 2015-06-21-OpenSim-26087-Default-Permissions-Save-Error.jpg
2015-06-22 05:07 aiaustin Note Edited: 0028778 View Revisions
2015-06-22 05:30 djphil Note Added: 0028779
2015-06-22 09:28 Diva Note Added: 0028780
2015-06-23 02:39 aiaustin Note Edited: 0028778 View Revisions
2015-06-23 07:06 aiaustin Note Edited: 0028778 View Revisions
2015-06-24 23:21 tglion Note Added: 0028800
2015-06-29 07:37 djphil Note Added: 0028842
2015-06-29 12:52 melanie Note Added: 0028843
2015-06-29 17:55 aiaustin Note Added: 0028844
2015-06-29 18:00 melanie Note Added: 0028845
2015-06-29 18:08 aiaustin Note Edited: 0028844 View Revisions
2016-06-27 02:29 djphil Status assigned => resolved
2016-06-27 02:29 djphil Resolution reopened => fixed
2016-06-27 02:29 djphil Note Added: 0030796
2016-06-27 02:29 djphil Status resolved => closed


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker