Thread: Visual Studio-produced DLL crashing VS-VB application

  1. #1
    Registered User
    Join Date
    Nov 2011
    Posts
    28

    Visual Studio-produced DLL crashing VS-VB application

    We are producing a DLL in Visual Studio. That DLL when called by a VB application crashes the application in production. It does not crash it in debug mode. We produce a very similar DLL and successfully call it in a different VB application with no issues whatsoever. What should we be looking at for a cause?

    I know, I know...don't use Visual Studio. But, I'm just trying to logically figure this thing out. It makes no sense.

  2. #2
    Registered User
    Join Date
    Nov 2011
    Posts
    28
    Oh...let me add that the exact same code compiled in Pelles does not crash the app.

  3. #3
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Either the DLL has a bug, or the VB app which uses it has a bug. There's nothing particularly mysterious about a bug that happens in release but not debug build.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  4. #4
    Registered User
    Join Date
    Nov 2011
    Posts
    28
    What about the Pelles compiled code not crashing the app? Any idea as to why that version works?

  5. #5
    'Allo, 'Allo, Allo
    Join Date
    Apr 2008
    Posts
    639
    It probably doesn't work, it just probably fails in a slightly less violent manner, say by corrupting already allocated memory rather than trying to write to unallocated memory (which triggers the crash).

    Attach the Visual Studio debugger, interact with the VB app in a manner which causes the crash, profit. Now you know what causes it, rather than just 'It crashes'. Consider investing some of your time in learning how to figure out these basics, it'll help you spin your wheels in a more efficient manner.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. TCP Application Using C++ in Visual Studio
    By zawii87 in forum C++ Programming
    Replies: 1
    Last Post: 08-11-2011, 05:49 AM
  2. Visual Studio 2010 - BSOD, always crashing...
    By Devils Child in forum General Discussions
    Replies: 24
    Last Post: 07-08-2010, 07:36 PM
  3. win32 application wizard in microsoft visual studio
    By stanlvw in forum C++ Programming
    Replies: 4
    Last Post: 02-25-2008, 01:26 AM
  4. Replies: 3
    Last Post: 10-09-2005, 04:06 PM
  5. Developing TCP/IP Application in Microsoft Visual Studio VC++
    By ashu12 in forum Windows Programming
    Replies: 1
    Last Post: 09-11-2002, 03:30 AM