lextudio / sharpsnmplib

Sharp SNMP Library- Open Source SNMP for .NET
https://sharpsnmp.com
MIT License
356 stars 152 forks source link

Crash of Mib Browser, trying to load a specific MIB #219

Closed lextudio-support closed 4 hours ago

lextudio-support commented 4 hours ago

NOTE: this is a purely copy/paste of this thread http://sharpsnmplib.codeplex.com/discussions/262668 , as I don't know what I can add to help.

I'm trying to do a C# software which read some data over a SNMP server (among other things). So I tried to read the data from this server with #SNMP Mib Browser, as I will use the same API.

When I try to load the MIB file I need to use with this server with MIB Browser 6.1.1, I got this:

System.IndexOutOfRangeException: Index was outside the bounds of the array. at Lextm.SharpSnmpLib.Mib.ModuleLoader.ParseLine(String line, String module) in g:\sharpsnmplib\SharpSnmpLib\Mib\ModuleLoader.cs:line 61 at Lextm.SharpSnmpLib.Mib.ModuleLoader..ctor(TextReader reader, String moduleName) in g:\sharpsnmplib\SharpSnmpLib\Mib\ModuleLoader.cs:line 38 at Lextm.SharpSnmpLib.Mib.ObjectTree.PrepareFiles(IEnumerable`1 files) in g:\sharpsnmplib\SharpSnmpLib\Mib\ObjectTree.cs:line 81 at Lextm.SharpSnmpLib.Mib.ReloadableObjectRegistry.LoadModuleFolder(String path) in g:\sharpsnmplib\SharpSnmpLib\Mib\ReloadableObjectRegistry.cs:line 79 at Lextm.SharpSnmpLib.Mib.ReloadableObjectRegistry.Reload() in g:\sharpsnmplib\SharpSnmpLib\Mib\ReloadableObjectRegistry.cs:line 55 at Lextm.SharpSnmpLib.Browser.ModuleListPanel.ActAddExecute(Object sender, EventArgs e) in g:\sharpsnmplib\Browser\ModuleListPanel.cs:line 133 at Crad.Windows.Forms.Actions.Action.OnExecute(EventArgs e) at Crad.Windows.Forms.Actions.Action.DoExecute() at Crad.Windows.Forms.Actions.Action.handleClick(Object sender, EventArgs e) at Crad.Windows.Forms.Actions.Action.target_Click(Object sender, EventArgs e) at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e) at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ToolStrip.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Since it may be the MIB file which are bogus, I tried with iReasonning MIB Browser. The MIB file works and I can see the SNMP server (which loaded the MIB file too, so I think the file is good), read the values and all.

Thank you in advance

Original Reported Date: 2011-06-27T00:33:51.583-07:00 Planned For Release:

Original CodePlex ID: 7219

lextudio-support commented 4 hours ago

Copied from CodePlex without authors:

Well, I get the problem: browsing the source, I got there is two softwares, a compiler and a browser, and I need to compile the mib file first.

The name "mib browser" are indeed very confusing.

Anyway, you can close the bug report, it was solely a PEBKAC (or a full flat RTFM), and I'm really sorry (and ashamed) about that.

Original Posted Date: 2011-06-27T08:30:43.51-07:00

lextudio-support commented 4 hours ago

Copied from CodePlex without authors:

It reminds me of how important it is to make such information discoverable. I will try to update our Wiki pages in the coming weeks.

Original Posted Date: 2011-06-29T06:20:41.75-07:00

lextudio-support commented 4 hours ago

Not a real bug.

Original Closed Date: 2011-06-29T06:21:41.327-07:00