home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
VirtualKeyboard throws exception: System.ArgumentOutOfRangeException
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Lightning303" data-source="post: 1070152" data-attributes="member: 97876"><p>Hey,</p><p>im currently working on the atmolight plugin.</p><p>What i want to do is to show some infos via the GUIDialogOK and when OK is pressed open the VirtualKeyboard. After that i will again show some infos via GUIDialogOK.</p><p></p><p>My code looks like this:</p><p>[CODE] GUIDialogOK dlgOK = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK);</p><p> if (dlgOK != null)</p><p> {</p><p> dlgOK.SetHeading("Static Color:");</p><p> dlgOK.SetLine(1, "Red: N/A (next)");</p><p> dlgOK.SetLine(2, "Green: N/A");</p><p> dlgOK.SetLine(3, "Blue: N/A");</p><p> dlgOK.DoModal(GUIWindowManager.ActiveWindow);</p><p> }</p><p></p><p> VirtualKeyboard RGBKeyboard = (VirtualKeyboard)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_VIRTUAL_KEYBOARD);</p><p> if (RGBKeyboard == null)</p><p> {</p><p> return;</p><p> }</p><p> RGBKeyboard.Reset();</p><p> RGBKeyboard.Text = "";</p><p> RGBKeyboard.DoModal(GUIWindowManager.ActiveWindow);</p><p> if (RGBKeyboard.IsConfirmed)</p><p> {</p><p> StaticColor = RGBKeyboard.Text;</p><p> }[/CODE]</p><p></p><p>When this is now triggered, i can see the OK Dialog, and after pressing OK, the keyboard opens like expected. I can input my value and press ok.</p><p>However the log shows me this:</p><p></p><p>[CODE][2014-03-16 01:08:01,434] [Log ] [29 ] [WARN ] - GUIWindow:OnWindowLoaded: 'C:\ProgramData\Team MediaPortal\MediaPortal\Skin\Titan\dialogOK.xml' is missing control id 11 (window property: btnYes)</p><p>[2014-03-16 01:08:01,436] [Log ] [29 ] [DEBUG] - WindowManager: route WindowPlugins.home.GUIBasicHome:35->MediaPortal.Dialogs.GUIDialogOK:2002</p><p>[2014-03-16 01:08:01,611] [Log ] [29 ] [DEBUG] - DialogWindow: MediaPortal.Dialogs.GUIDialogOK init</p><p>[2014-03-16 01:08:02,971] [Log ] [MPMain ] [DEBUG] - GUIButtonControl.HyperLink: Trying to use parsed string, original , parsed</p><p>[2014-03-16 01:08:02,971] [Log ] [MPMain ] [DEBUG] - GUIButtonControl.ActionID: Trying to use parsed string, original , parsed</p><p>[2014-03-16 01:08:03,511] [Log ] [29 ] [DEBUG] - WindowManager: unroute to MediaPortal.Dialogs.GUIDialogOK:2002->WindowPlugins.home.GUIBasicHome:35</p><p>[2014-03-16 01:08:03,611] [Log ] [29 ] [WARN ] - GUIWindow:OnWindowLoaded: 'C:\ProgramData\Team MediaPortal\MediaPortal\Skin\Titan\stdKeyboard.xml' is missing control id 2 (window property: _background)</p><p>[2014-03-16 01:08:03,691] [Log ] [29 ] [WARN ] - GUIWindow:OnWindowLoaded: 'C:\ProgramData\Team MediaPortal\MediaPortal\Skin\Titan\stdKeyboard.xml' is missing control id 2 (window property: _background)</p><p>[2014-03-16 01:08:03,797] [Log ] [29 ] [DEBUG] - WindowManager: route WindowPlugins.home.GUIBasicHome:35->MediaPortal.Dialogs.StandardKeyboard:1002</p><p>[2014-03-16 01:08:03,979] [Error ] [MPMain ] [ERROR] - render exception:System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.</p><p>Parameter name: index</p><p> at System.Collections.ArrayList.get_Item(Int32 index)</p><p> at MediaPortal.GUI.Library.GUIStandardKeyboard.RenderKeyboardLatin(Single timePassed)</p><p> at MediaPortal.GUI.Library.GUIKeyboard.Render(Single timePassed)</p><p> at MediaPortal.GUI.Library.GUIControl.DoRender(Single timePassed, UInt32 currentTime)</p><p> at MediaPortal.GUI.Library.GUIWindow.Render(Single timePassed)</p><p>[2014-03-16 01:08:03,998] [Error ] [MPMain ] [ERROR] - render exception:System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.</p><p>Parameter name: index</p><p> at System.Collections.ArrayList.get_Item(Int32 index)</p><p> at MediaPortal.GUI.Library.GUIStandardKeyboard.RenderKeyboardLatin(Single timePassed)</p><p> at MediaPortal.GUI.Library.GUIKeyboard.Render(Single timePassed)</p><p> at MediaPortal.GUI.Library.GUIControl.DoRender(Single timePassed, UInt32 currentTime)</p><p> at MediaPortal.GUI.Library.GUIWindow.Render(Single timePassed)</p><p>[2014-03-16 01:08:04,020] [Error ] [MPMain ] [ERROR] - render exception:System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.</p><p>Parameter name: index</p><p> at System.Collections.ArrayList.get_Item(Int32 index)</p><p> at MediaPortal.GUI.Library.GUIStandardKeyboard.RenderKeyboardLatin(Single timePassed)</p><p> at MediaPortal.GUI.Library.GUIKeyboard.Render(Single timePassed)</p><p> at MediaPortal.GUI.Library.GUIControl.DoRender(Single timePassed, UInt32 currentTime)</p><p> at MediaPortal.GUI.Library.GUIWindow.Render(Single timePassed)</p><p>[2014-03-16 01:08:04,116] [Log ] [29 ] [DEBUG] - Window: MediaPortal.Dialogs.StandardKeyboard init</p><p>[2014-03-16 01:08:07,838] [Log ] [29 ] [DEBUG] - WindowManager: unroute to MediaPortal.Dialogs.StandardKeyboard:1002->WindowPlugins.home.GUIBasicHome:35</p><p>[2014-03-16 01:08:07,839] [Log ] [29 ] [DEBUG] - Window: MediaPortal.Dialogs.StandardKeyboard deinit</p><p>[2014-03-16 01:08:07,849] [Log ] [MPMain ] [WARN ] - GUIWindow:OnWindowLoaded: 'C:\ProgramData\Team MediaPortal\MediaPortal\Skin\Titan\stdKeyboard.xml' is missing control id 2 (window property: _background)</p><p>[2014-03-16 01:08:07,851] [Log ] [MPMain ] [WARN ] - GUIWindow:OnWindowLoaded: 'C:\ProgramData\Team MediaPortal\MediaPortal\Skin\Titan\stdKeyboard.xml' is missing control id 2 (window property: _background)</p><p>[2014-03-16 01:08:07,883] [Error ] [MPMain ] [ERROR] - render exception:System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.</p><p>Parameter name: index</p><p> at System.Collections.ArrayList.get_Item(Int32 index)</p><p> at MediaPortal.GUI.Library.GUIStandardKeyboard.RenderKeyboardLatin(Single timePassed)</p><p> at MediaPortal.GUI.Library.GUIKeyboard.Render(Single timePassed)</p><p> at MediaPortal.GUI.Library.GUIControl.DoRender(Single timePassed, UInt32 currentTime)</p><p> at MediaPortal.GUI.Library.GUIWindow.Render(Single timePassed)</p><p>[2014-03-16 01:08:07,889] [Log ] [29 ] [DEBUG] - Window: MediaPortal.Dialogs.StandardKeyboard deinit[/CODE]</p><p></p><p>And the interesting part. Doing this on my HTPC gives me these errors everytime. About 10% of the time StaticColor gets the value i entered in the keyboard, about 90% it doesnt. In both cases these exceptions occur.</p><p>When using my Laptop however, i dont get the exceptions, and my input works 100% of the time.</p><p></p><p>Both systems are Win 7 with Mediaportal 1.7 pre. HTPC has plugins installed and so on. Laptop is vanilla mp.</p><p></p><p>Anybody an idea why this is happening and how i can prevent it?</p><p>Thanks!</p><p></p><p></p><p>Edit:</p><p>Fixed it <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink ;)" loading="lazy" data-shortname=";)" />.</p><p>The code was using GUIGraphicsContext for the ActionHandler, now its using GUIWindowManager.</p></blockquote><p></p>
[QUOTE="Lightning303, post: 1070152, member: 97876"] Hey, im currently working on the atmolight plugin. What i want to do is to show some infos via the GUIDialogOK and when OK is pressed open the VirtualKeyboard. After that i will again show some infos via GUIDialogOK. My code looks like this: [CODE] GUIDialogOK dlgOK = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK); if (dlgOK != null) { dlgOK.SetHeading("Static Color:"); dlgOK.SetLine(1, "Red: N/A (next)"); dlgOK.SetLine(2, "Green: N/A"); dlgOK.SetLine(3, "Blue: N/A"); dlgOK.DoModal(GUIWindowManager.ActiveWindow); } VirtualKeyboard RGBKeyboard = (VirtualKeyboard)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_VIRTUAL_KEYBOARD); if (RGBKeyboard == null) { return; } RGBKeyboard.Reset(); RGBKeyboard.Text = ""; RGBKeyboard.DoModal(GUIWindowManager.ActiveWindow); if (RGBKeyboard.IsConfirmed) { StaticColor = RGBKeyboard.Text; }[/CODE] When this is now triggered, i can see the OK Dialog, and after pressing OK, the keyboard opens like expected. I can input my value and press ok. However the log shows me this: [CODE][2014-03-16 01:08:01,434] [Log ] [29 ] [WARN ] - GUIWindow:OnWindowLoaded: 'C:\ProgramData\Team MediaPortal\MediaPortal\Skin\Titan\dialogOK.xml' is missing control id 11 (window property: btnYes) [2014-03-16 01:08:01,436] [Log ] [29 ] [DEBUG] - WindowManager: route WindowPlugins.home.GUIBasicHome:35->MediaPortal.Dialogs.GUIDialogOK:2002 [2014-03-16 01:08:01,611] [Log ] [29 ] [DEBUG] - DialogWindow: MediaPortal.Dialogs.GUIDialogOK init [2014-03-16 01:08:02,971] [Log ] [MPMain ] [DEBUG] - GUIButtonControl.HyperLink: Trying to use parsed string, original , parsed [2014-03-16 01:08:02,971] [Log ] [MPMain ] [DEBUG] - GUIButtonControl.ActionID: Trying to use parsed string, original , parsed [2014-03-16 01:08:03,511] [Log ] [29 ] [DEBUG] - WindowManager: unroute to MediaPortal.Dialogs.GUIDialogOK:2002->WindowPlugins.home.GUIBasicHome:35 [2014-03-16 01:08:03,611] [Log ] [29 ] [WARN ] - GUIWindow:OnWindowLoaded: 'C:\ProgramData\Team MediaPortal\MediaPortal\Skin\Titan\stdKeyboard.xml' is missing control id 2 (window property: _background) [2014-03-16 01:08:03,691] [Log ] [29 ] [WARN ] - GUIWindow:OnWindowLoaded: 'C:\ProgramData\Team MediaPortal\MediaPortal\Skin\Titan\stdKeyboard.xml' is missing control id 2 (window property: _background) [2014-03-16 01:08:03,797] [Log ] [29 ] [DEBUG] - WindowManager: route WindowPlugins.home.GUIBasicHome:35->MediaPortal.Dialogs.StandardKeyboard:1002 [2014-03-16 01:08:03,979] [Error ] [MPMain ] [ERROR] - render exception:System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.Collections.ArrayList.get_Item(Int32 index) at MediaPortal.GUI.Library.GUIStandardKeyboard.RenderKeyboardLatin(Single timePassed) at MediaPortal.GUI.Library.GUIKeyboard.Render(Single timePassed) at MediaPortal.GUI.Library.GUIControl.DoRender(Single timePassed, UInt32 currentTime) at MediaPortal.GUI.Library.GUIWindow.Render(Single timePassed) [2014-03-16 01:08:03,998] [Error ] [MPMain ] [ERROR] - render exception:System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.Collections.ArrayList.get_Item(Int32 index) at MediaPortal.GUI.Library.GUIStandardKeyboard.RenderKeyboardLatin(Single timePassed) at MediaPortal.GUI.Library.GUIKeyboard.Render(Single timePassed) at MediaPortal.GUI.Library.GUIControl.DoRender(Single timePassed, UInt32 currentTime) at MediaPortal.GUI.Library.GUIWindow.Render(Single timePassed) [2014-03-16 01:08:04,020] [Error ] [MPMain ] [ERROR] - render exception:System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.Collections.ArrayList.get_Item(Int32 index) at MediaPortal.GUI.Library.GUIStandardKeyboard.RenderKeyboardLatin(Single timePassed) at MediaPortal.GUI.Library.GUIKeyboard.Render(Single timePassed) at MediaPortal.GUI.Library.GUIControl.DoRender(Single timePassed, UInt32 currentTime) at MediaPortal.GUI.Library.GUIWindow.Render(Single timePassed) [2014-03-16 01:08:04,116] [Log ] [29 ] [DEBUG] - Window: MediaPortal.Dialogs.StandardKeyboard init [2014-03-16 01:08:07,838] [Log ] [29 ] [DEBUG] - WindowManager: unroute to MediaPortal.Dialogs.StandardKeyboard:1002->WindowPlugins.home.GUIBasicHome:35 [2014-03-16 01:08:07,839] [Log ] [29 ] [DEBUG] - Window: MediaPortal.Dialogs.StandardKeyboard deinit [2014-03-16 01:08:07,849] [Log ] [MPMain ] [WARN ] - GUIWindow:OnWindowLoaded: 'C:\ProgramData\Team MediaPortal\MediaPortal\Skin\Titan\stdKeyboard.xml' is missing control id 2 (window property: _background) [2014-03-16 01:08:07,851] [Log ] [MPMain ] [WARN ] - GUIWindow:OnWindowLoaded: 'C:\ProgramData\Team MediaPortal\MediaPortal\Skin\Titan\stdKeyboard.xml' is missing control id 2 (window property: _background) [2014-03-16 01:08:07,883] [Error ] [MPMain ] [ERROR] - render exception:System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.Collections.ArrayList.get_Item(Int32 index) at MediaPortal.GUI.Library.GUIStandardKeyboard.RenderKeyboardLatin(Single timePassed) at MediaPortal.GUI.Library.GUIKeyboard.Render(Single timePassed) at MediaPortal.GUI.Library.GUIControl.DoRender(Single timePassed, UInt32 currentTime) at MediaPortal.GUI.Library.GUIWindow.Render(Single timePassed) [2014-03-16 01:08:07,889] [Log ] [29 ] [DEBUG] - Window: MediaPortal.Dialogs.StandardKeyboard deinit[/CODE] And the interesting part. Doing this on my HTPC gives me these errors everytime. About 10% of the time StaticColor gets the value i entered in the keyboard, about 90% it doesnt. In both cases these exceptions occur. When using my Laptop however, i dont get the exceptions, and my input works 100% of the time. Both systems are Win 7 with Mediaportal 1.7 pre. HTPC has plugins installed and so on. Laptop is vanilla mp. Anybody an idea why this is happening and how i can prevent it? Thanks! Edit: Fixed it ;). The code was using GUIGraphicsContext for the ActionHandler, now its using GUIWindowManager. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
VirtualKeyboard throws exception: System.ArgumentOutOfRangeException
Contact us
RSS
Top
Bottom