none
Crash in MFC application in ConnectTransact Function of DBNMPNTW.DLL RRS feed

  • Question

  • My MFC Desktop application has connection to SQL server (in another server) using Named pipe. Some time (it may be atleast once in a day), I'm getting crash in the MFC applicaton, which has the following stack trace.

     

    11:18:25 Unhandled Exception: Exception code: C0000005 ACCESS_VIOLATION
    Fault address:  7331293E 01:0000193E C:\icm\bin\DBNMPNTW.DLL
    Call stack:
    Address   Frame
    7331293E  013D68DC  ConnectionTransact+1AE

     

    The SQL Version is SQL Server 2000 with SP4.

     

    Since the stack trace is not giving any point of crash in the MFC application, its very difficult to trace what caused the issue in the application. One of the search result in the google shows, it might be because of the network glitch which causes some security issues in the implementation of the Default Named Pipe. We are using DBLib library for the SQL operations. The SQL clinet and SQL server protocol order is - first Named Pipe and then TCP/IP.

     

    I couldn't figure out the reason of the crash yet. If any one could shed light on this, it would be great.

    Wednesday, May 14, 2008 10:37 AM

All replies

  • I'm sorry I do not have a direct answer to your problem right now.
    You can enable postmortem debugging to get a better understanding of the call stack. At least you should be able to find out where you were in your application at the moment of crash.
    Wednesday, May 14, 2008 6:47 PM
    Moderator
  • Thanks Anton for the reply. The application is already enabled for post mortem debugging. It produces the mdmp file, but it only points to the crash in the DLL function, no stack in the MFC application. This is what makes it more difficult to trace.

     

    Is there a way to know on what all conditions this function crashes in the DLL?

    Thursday, May 15, 2008 5:04 AM
  • What do you mean by "no stack in the MFC application"?
    What is the call stack you are able to see?
    Is your application multithreaded?
    Friday, May 16, 2008 6:25 AM
    Moderator
  •  

    Sorry for the delay in my reply.

     

    I couldn't see any call to the crashing function - ConnectionTransact in the module dbnmpntw.dll in the call stack. It's there in the original posting thread. Attaching here for your reference.

     

    11:18:25 aw-edt Unhandled Exception: Exception code: C0000005 ACCESS_VIOLATION

    Fault address:  7331293E 01:0000193E C:\icm\bin\DBNMPNTW.DLL

     

    Registers:

    EAX:FFFFFFFF

    EBX:7C59A001

    ECX:03BAFF68

    EDX:00000001

    ESI:00000068

    EDI:00000000

    CS:EIP:001B:7331293E

    SS:ESP:0023:03BAFA54  EBP:013D68DC

    DS:0023  ES:0023  FS:0038  GS:0000

    Flags:00010286

     

    Call stack:

    Address   Frame

    7331293E  013D68DC  ConnectionTransact+1AE

     

    The application is multi-threaded. Though the stack should show the calling function from the application, right?

    Monday, August 25, 2008 6:33 AM
  • Did you try opening a mdmp file in a debugger?
    Tuesday, August 26, 2008 8:58 PM
    Moderator