2: 2010-05-22 (土) 10:28:38 admin |
3: 2010-05-22 (土) 19:16:09 admin |
- | 03:12:20 - [PRESENCE HANDLER]: Exception in method getagent: System.FormatException: Invalid format for Guid.Guid(string). | + | ** Invalid format for Guid.Guid [#re2c7dd6] |
| + | - ログイン時に Robost.exe がエラーを出して,ログインが取り消される. |
| + | #br |
| + | |
| + | *** エラーメッセージ [#ma6a3d99] |
| + | 03:12:20 - [PRESENCE HANDLER]: Exception in method getagent: System.FormatException: Invalid format for Guid.Guid(string). |
| at System.Guid+GuidParser.ParseChar (Char c) [0x00000] in <filename unknown>:0 | | at System.Guid+GuidParser.ParseChar (Char c) [0x00000] in <filename unknown>:0 |
| at System.Guid+GuidParser.ParseGuid2 () [0x00000] in <filename unknown>:0 | | at System.Guid+GuidParser.ParseGuid2 () [0x00000] in <filename unknown>:0 |
| | | |
| | | |
- | - mcs/class/corlib/System/Guid.cs | + | *** Mono [#i5077b7b] |
| + | - エラー自体は Monoのエラー |
| + | - mcs/class/corlib/System/Guid.csの GuidParserで src="" が渡されるのが原因 |
| + | - つまり,GUIDの検査で NULL文字 "" が渡されて,例外を起こす. |
| + | - ParseGuid1() で System.IndexOutOfRangeException を起こし,キャッチされて ParseGuid2() に渡され System.FormatException: Invalid format for Guid.Guid(string) を起こす, |
| + | - 本来は OpenSimのバグだが,GuidParserのコンストラクタで,以下のようにしてしまうのも一つの手 |
| + | public GuidParser (string src) |
| + | { |
| + | if (src=="") { |
| + | //System.Console.WriteLine("====> System.GuidParser: Inputed src is null"); |
| + | src = "00000000-0000-0000-0000-000000000000"; |
| + | } |
| + | _src = src; |
| + | Reset (); |
| + | } |
| + | |
| + | *** PresenceService.cs [#mc801b2e] |
| + | - OpenSim/Services/PresenceService/PresenceService.cs の LoginAgent()で Presenceテーブルに HomeRegionIDが設定されないのが原因. |
| + | - 対策としては,とりあえず ログイン時に Presenceテーブルの HomeRegionIDを "00000000-0000-0000-0000-000000000000" にする |
| + | public bool LoginAgent(string userID, UUID sessionID, |
| + | UUID secureSessionID) |
| + | { |
| + | PresenceData[] d = m_Database.Get("UserID", userID); |
| + | |
| + | PresenceData data = new PresenceData(); |
| + | |
| + | data.UserID = userID; |
| + | data.RegionID = UUID.Zero; |
| + | data.SessionID = sessionID; |
| + | data.Data = new Dictionary<string, string>(); |
| + | data.Data["SecureSessionID"] = secureSessionID.ToString(); |
| + | // added by Fumi.Iseki |
| + | data.Data["HomeRegionID"] = UUID.Zero.ToString(); |
| + | |
| + | m_Database.Store(data); |
| + | |
| + | m_log.DebugFormat("[PRESENCE SERVICE]: LoginAgent {0} with session {1} and ssession {2}", |
| + | userID, sessionID, secureSessionID); |
| + | return true; |
| + | } |
| + | - 本来は ホームの情報を GridUserレコードから引っ張って来るべきだが,PresenceのHomeRegionIDは現在はまだ未使用のよう (r12862) |
| + | #br |
| + | |
| + | *** 蛇足 [#z9ca90bb] |
| + | **** 参考:Presenceの HomeRegionIDを設定する関数例 (ポジション無し.インターフェイス,およびそれを継承している他のクラスにも実装の必要性あり) [#tc1b64e3] |
| + | public bool SetHomeRegion(UUID sessionID, UUID homeRegionID) |
| + | { |
| + | PresenceData data = m_Database.Get(sessionID); |
| + | data.Data["HomeRegionID"] = homeRegionID.ToString(); |
| + | |
| + | m_Database.Store(data); |
| + | return true; |
| + | } |
| + | |
| + | **** ログイン時の Presenceテーブルのレコード作成 [#m5efb2ae] |
| + | - OpenSim/Services/LLLoginService/LLLoginService.cs |
| + | -- success = m_PresenceService.LoginAgent(account.PrincipalID.ToString(), session, secureSession); |
| + | --- /OpenSim/Services/PresenceService/PresenceService.cs |
| + | ---- LoginAgent() で,Presence データベースのレコードを作成.ただし HomeRegionIDはnull (ParseGuidのエラーの原因) |
| + | ---- GridUserテーブルから HomeRegionIDを引っ張ってくる.または UUID.Zero を入れる. |
| + | #br |
| + | |
| + | **** OpenSim/Services/Interfaces/IPresenceService.cs を継承するクラス [#p832cab3] |
| + | -- OpenSim/Services/PresenceService/PresenceService.cs |
| + | -- OpenSim/Services/Connectors/Presence/PresenceServiceConnector.cs |
| + | -- OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/LocalPresenceServiceConnector.cs |
| + | -- OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/RemotePresenceServiceConnector.cs |
| + | #br |
| | | |
- | XXXX GuidParser src = bfe0c255-0000-0000-0000-000000000000 | + | **** HomeRegionIDの設定 [#x7adb4f5] |
- | 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 | + | - GridUserテーブルの HomeRegionIDは(ホーム変更時に)OpenSim/Services/UserAccountService/GridUserService.cs の SetHome()で設定される |
- | 0000 ParseOptChar { = b | + | - ↑これは OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs の SetHomeから呼び出される. |
- | 0000 ParseOptChar ( = b | + | #br |
- | 0000 ParseOptChar - = - | + | |
- | 0000 ParseOptChar - = - | + | |
- | 0000 ParseOptChar - = - | + | |
- | 0000 ParseOptChar - = - | + | |
- | 111111111111EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE11111111111111111111111111111 | + | |