CaduNunes79 / netprofilesmod

Automatically exported from code.google.com/p/netprofilesmod
0 stars 0 forks source link

Unhandled exception: Cannot bind to the new display member. #55

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Starting Netprofiles Mod for the 1st time using a WiFi interface only
2. Pressing "Yes" to "There are currently no network profiles. Would you like 
to create one now?"

What is the expected output? What do you see instead?
The "Profile Settings" window pops up, but an "Unhandled exception" occurs. You 
may find the details below.

What version of the product are you using? On what operating system?
0.1.1 at Winds 8 Pro 64bit

Please provide any additional information below.

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentException: Cannot bind to the new display member.
Parameter name: newDisplayMember
   at System.Windows.Forms.ListControl.SetDataConnection(Object newDataSource, BindingMemberInfo newDisplayMember, Boolean force)
   at System.Windows.Forms.ListControl.set_ValueMember(String value)
   at Net_Profiles.ProfileSettings.PopulateNetworkCards()
   at Net_Profiles.ProfileSettings.Timer1Tick(Object sender, EventArgs e)
   at System.Windows.Forms.Timer.OnTick(EventArgs e)
   at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.6400 (Win8RTMGDR.050727-6400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
Net Profiles mod
    Assembly Version: 0.1.1.0
    Win32 Version: 0.1.1.0
    CodeBase: file:///C:/Program%20Files/Net%20Profiles%20mod/Net%20Profiles%20mod.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.6387 (Win8RTM.050727-6300)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.6401 (Win8RTMGDR.050727-6400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.6402 (Win8RTMGDR.050727-6400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.6401 (Win8RTMGDR.050727-6400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.6387 (Win8RTM.050727-6300)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
AppModule.Globals
    Assembly Version: 1.0.4738.35925
    Win32 Version: 1.0.4738.35925
    CodeBase: file:///C:/Program%20Files/Net%20Profiles%20mod/AppModule.Globals.DLL
----------------------------------------
MessageBoxHook
    Assembly Version: 0.0.0.0
    Win32 Version: 1, 0, 1, 0
    CodeBase: file:///C:/Program%20Files/Net%20Profiles%20mod/MessageBoxHook.DLL
----------------------------------------
msvcm80
    Assembly Version: 8.0.50727.6910
    Win32 Version: 8.00.50727.6910
    CodeBase: file:///C:/Windows/WinSxS/amd64_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.6910_none_88dc8c812fb1ba3f/msvcm80.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.6387 (Win8RTM.050727-6300)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.6387 (Win8RTM.050727-6300)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
System.Management
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.6387 (Win8RTM.050727-6300)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Management/2.0.0.0__b03f5f7f11d50a3a/System.Management.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Original issue reported on code.google.com by Mana...@etw.de on 19 Apr 2013 at 3:54

GoogleCodeExporter commented 9 years ago
Thanks for reporting this issue. Was the WiFi connected while the application 
was started? If it was disconnected, it's very likely to be a duplicate of 
issue 54 (solved but no new version released yet).

Original comment by u...@urx.ch on 19 Apr 2013 at 4:23

GoogleCodeExporter commented 9 years ago
The WiFi was connected properly (I was able to submit the issue through it :-). 
But obviously the interface isn't detected by netprofiles mod now (reboot 
doesn't help) - although it had worked previously. In the meantime, I have 
downloaded the version, which you have provided within issue 53. In this 
version, previously reported "Unhandled exception" doesn't occur (most likely 
due to your solved issue 54). However, /a/ no network card is detected, and /b/ 
another unhandled exception occurs when pressing "Get current settings" 
(System.NullReferenceException: Object reference not set to an instance of an 
object).

Original comment by Mana...@etw.de on 19 Apr 2013 at 4:37

GoogleCodeExporter commented 9 years ago
It's now clear that this issue is caused by the inability to detect the WiFi 
adapter, maybe Windows 8 related. You write it has worked previously, is there 
a version that is able to detect your interface?

PS: With the version from issue 53 you will see the issue 54, it has been 
solved in revision 95e63a8c2511.

Original comment by u...@urx.ch on 21 Apr 2013 at 9:02

GoogleCodeExporter commented 9 years ago
Indeed, issue 54 has been resolved: Thanks for this!

However, 2 (sub-)issues remain open:

/a/ no network card is detected: No version is currently able to detect my WiFi 
adapter. It had worked before I have used (and configured) an Ethernet adapter. 
Now, when the Ethernet adapter is inactive (and not displayed - see issue 53) 
but the WiFi adapter is active, no adapter is detected.

/b/ in case no network card is detected, "Get current settings" can be pressed 
and cause an unhandled exception. Either the button should be greyed out and/or 
pressing ignored.

IMHO /b/ may have a low priority, but /a/ doesn't allow me to make use of 
netprofiles :-(

PS: ipconfig /all shows Windows IP Configuration

   Host Name . . . . . . . . . . . . : PC00XX
   Primary Dns Suffix  . . . . . . . : xxx.de
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : xxx.de

Wireless LAN adapter Local Area Connection* 2:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Virtueller Microsoft-Adapter für direktes
 WiFi
   Physical Address. . . . . . . . . : C8-F7-33-XX-XX-XX
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter WiFi:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Intel(R) Centrino(R) Advanced-N 6235
   Physical Address. . . . . . . . . : C8-F7-33-XX-XX-XX
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   IPv4 Address. . . . . . . . . . . : 192.168.1.XX(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : 21 April 2013 10:38:54
   Lease Expires . . . . . . . . . . : 01 May 2013 10:38:57
   Default Gateway . . . . . . . . . : 192.168.1.1
   DHCP Server . . . . . . . . . . . : 192.168.1.1
   DNS Servers . . . . . . . . . . . : 192.168.1.1
   NetBIOS over Tcpip. . . . . . . . : Disabled

Tunnel adapter Teredo Tunneling Pseudo-Interface:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   IPv6 Address. . . . . . . . . . . : 2001:XXX(Preferred)
   Link-local IPv6 Address . . . . . : fe80:XXX(Preferred)
   Default Gateway . . . . . . . . . : ::
   DHCPv6 IAID . . . . . . . . . . . : xx
   DHCPv6 Client DUID. . . . . . . . : 00-xx

   NetBIOS over Tcpip. . . . . . . . : Disabled

Tunnel adapter isatap.{123BB3DA-xx}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Original comment by Mana...@etw.de on 21 Apr 2013 at 9:45

GoogleCodeExporter commented 9 years ago
Could you try this:
Copy the example VB code from 
http://msdn.microsoft.com/en-us/library/windows/desktop/aa394217(v=vs.85).aspx 
to a file like NetworkAdapterConfiguration.vbs and then run it from the command 
prompt with "cscript NetworkAdapterConfiguration.vbs" and check if it shows 
information about your adapter. Maybe you also want to run "cscript 
NetworkAdapterConfiguration.vbs > Adapters.txt" to save the output to a file. 
If you look at PopulateNetworkCardArray() 
https://code.google.com/p/netprofilesmod/source/browse/Net+Profiles+mod/Globals.
vb?r=9dd7765192612263ef73bc3463e94d4f17d3b4ae#260 you see that Net Profiles mod 
uses almost the same code that is unchanged since the fork. Maybe you could 
post the output for your WiFi adapter here. The most important thing is the 
state of IPEnabled, it has to be True.

Original comment by u...@urx.ch on 24 Apr 2013 at 11:18

GoogleCodeExporter commented 9 years ago
Sub-issue /a/ -the critical one- seems to be resolved now: 

I have tested various example VB codes shown on the page as well as simple 
PowerShell commands, e.g. "PS C:\> Get-WmiObject 
win32_networkadapterconfiguration -Filter 'ipenabled = "true"'". In all cases 
no WiFi adapter has shown up, although it continued to be visible at MS's 
network and sharing center. This behaviour didn't change even when I updated 
the device driver to the very last one published by Intel but not yet released 
by Dell.

The solution was to uninstall the device driver in the device manager, and scan 
for hardware changes. Afterwards, netprofiles mod sees the WiFi adapter :-)))

Sub-issue /b/ remains, but will most likely rarely been hit by users ...

Thx a lot for your support, and sorry for raising the issue although it 
probably will be a buggy Win8 / Intel driver interaction.

Original comment by Mana...@etw.de on 29 Apr 2013 at 8:59

GoogleCodeExporter commented 9 years ago
Thank you very much for the interesting results from your tests. Sub-issue /b/ 
is already solved in r31a4f1b8b641, the test version from issue 53 is built on 
the code before this commit. I'll close this issue now and think about 
preparing the release of version 0.2.0 :)

Original comment by u...@urx.ch on 29 Apr 2013 at 10:30