• Welcome to Valhalla Legends Archive.
 

[VB6] Problem Loading Form

Started by shadypalm88, December 01, 2003, 10:36 PM

Previous topic - Next topic

shadypalm88

I've run into a problem suddenly in my app.  After doing some work in a module, I saved my project and compiled and tried to run my app.  It never showed up on the screen, although the app was running and using 99% CPU.  I did some simple testing and found that it hung when trying to load frmMain (a MsgBox before "Load frmMain" would show up, but not one after it, nor one at the top of frmMain's Form_Load() sub).

Here's the part that has me royally stumped.  The app runs fine in the Visual Basic IDE, as well as when compiled to pseudo-code.  I only get this problem when compiling to native code.  I tried swapping out the form and replacing it with an earlier backup of the form that did not present the problem, but it is still occuring.  I have no idea where to even begin in fixing this.  Does anyone have any ideas as to what may be causing the problem?

Puzzle


shadypalm88

#2
I've been tracing my problem through the program's startup and I'm getting very puzzled.  The app in question here is a bot that uses the winsock DLLs for its connections.  It uses WSAAsyncSelect to instruct winsock to notify it of connections and new messages passed to dummy textboxes.  I placed a message box in the BNLS socket creation/connection sequence so that it is the last thing that executes.  If I do not click the OK button in the message box, the bot will continue to function.  It finishes the connection to BNLS, connects to B.Net and logs on, populates the channel list, parses chat messages, all that good stuff.  However as soon as I click the OK button, the bot starts using all my CPU cycles and hangs.

Since this is not reproducable in the Visual Basic IDE, what are my other options as to debugging this?

Edit: Fixed typo.

Adron

Since you're compiling to native mode, you can generate a pdb file and use windbg to debug your program.

shadypalm88

Quote from: Adron on December 03, 2003, 10:42 AM
Since you're compiling to native mode, you can generate a pdb file and use windbg to debug your program.
I do not know what a pdb file is, but I downloaded windbg and ran it with my executable.  The output it gives is:CommandLine: C:\Documents and Settings\Eric Naeseth\My Documents\CloakedChatX\CloakedChatX.exe
Symbol search path is: *** Invalid ***
****************************************************************************
* Symbol loading may be unreliable without a symbol search path.           *
* Use .symfix to have the debugger choose a symbol path.                   *
* After setting your symbol path, use .reload to refresh symbol locations. *
****************************************************************************
Executable search path is:
ModLoad: 00400000 0045c000   image00400000
ModLoad: 77f50000 77ff7000   ntdll.dll
ModLoad: 77e60000 77f46000   C:\WINDOWS\system32\kernel32.dll
ModLoad: 73420000 73573000   C:\WINDOWS\System32\MSVBVM60.DLL
ModLoad: 77d40000 77dcc000   C:\WINDOWS\system32\USER32.dll
ModLoad: 77c70000 77cb0000   C:\WINDOWS\system32\GDI32.dll
ModLoad: 77dd0000 77e5d000   C:\WINDOWS\system32\ADVAPI32.dll
ModLoad: 78000000 78086000   C:\WINDOWS\system32\RPCRT4.dll
ModLoad: 771b0000 772d1000   C:\WINDOWS\system32\ole32.dll
ModLoad: 77120000 771ab000   C:\WINDOWS\system32\OLEAUT32.dll
ModLoad: 77c10000 77c63000   C:\WINDOWS\system32\MSVCRT.DLL
(c30.c34): Break instruction exception - code 80000003 (first chance)
eax=00241eb4 ebx=7ffdf000 ecx=00000004 edx=77f51310 esi=00241eb4 edi=00241f48
eip=77f75a58 esp=0012fb38 ebp=0012fc2c iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000202
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ntdll.dll -
ntdll!DbgBreakPoint:
77f75a58 cc               int     3
0:000> g
ModLoad: 5ad70000 5ada4000   C:\WINDOWS\System32\uxtheme.dll
ModLoad: 10000000 10110000   C:\Program Files\Messenger Plus! 2\MsgPlusH1.dll
ModLoad: 77340000 773cb000   C:\WINDOWS\system32\COMCTL32.dll
ModLoad: 763b0000 763f5000   C:\WINDOWS\system32\comdlg32.dll
ModLoad: 70a70000 70ad5000   C:\WINDOWS\system32\SHLWAPI.dll
ModLoad: 773d0000 77bc2000   C:\WINDOWS\system32\SHELL32.dll
ModLoad: 71950000 71a34000   C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.10.0_x-ww_f7fb5805\comctl32.dll
ModLoad: 71ad0000 71ad8000   C:\WINDOWS\System32\wsock32.dll
ModLoad: 71ab0000 71ac5000   C:\WINDOWS\System32\WS2_32.dll
ModLoad: 71aa0000 71aa8000   C:\WINDOWS\System32\WS2HELP.dll
ModLoad: 76fd0000 77048000   C:\WINDOWS\System32\CLBCATQ.DLL
ModLoad: 77050000 77115000   C:\WINDOWS\System32\COMRes.dll
ModLoad: 77c00000 77c07000   C:\WINDOWS\system32\VERSION.dll
ModLoad: 76400000 76601000   C:\WINDOWS\System32\msi.dll
ModLoad: 27580000 27685000   C:\WINDOWS\System32\MSCOMCTL.OCX
ModLoad: 708f0000 70903000   C:\WINDOWS\System32\asycfilt.dll
ModLoad: 20000000 20032000   C:\WINDOWS\System32\Richtx32.ocx
ModLoad: 74d30000 74d50000   C:\WINDOWS\System32\oledlg.dll
ModLoad: 732e0000 732e5000   C:\WINDOWS\System32\RichEd32.DLL
ModLoad: 74e30000 74e9a000   C:\WINDOWS\System32\RICHED20.dll
ModLoad: 01440000 01450000   C:\WINDOWS\System32\ctagent.dll
ModLoad: 75e90000 75f37000   C:\WINDOWS\System32\SXS.DLL
(c30.c34): Unknown exception - code c000008f (first chance)
That last line (Unknown exception) repeats until I stop debugging or kill the .exe.  Any ideas on what it means?

Skywing

//
// MessageId: STATUS_FLOAT_INEXACT_RESULT
//
// MessageText:
//
//  {EXCEPTION}
//  Floating-point inexact result.
//
#define STATUS_FLOAT_INEXACT_RESULT      ((NTSTATUS)0xC000008FL)    // winnt


Not a fatal exception.  Strange that VB unmasks floating point exceptions though, that's performance--.