List:General Discussion« Previous MessageNext Message »
From:Miguel Cardenas Date:January 14 2009 4:09pm
Subject:Re: VC++ 2008 / MySQL debug / Unhandled exception
View as plain text  
Hi

I tested with both release and debug versions and the problem is the same,
it fails when calling

mysql_real_connect()
   shared memory request function
      strcpy() asm code access violation to 0x00000000

Regards,
Miguel

On Sun, Jan 11, 2009 at 9:57 AM, Patrick Sherrill <patrick@stripped>wrote:

> I seem to recall the issue with the debug library, but don't recall the
> fix. Do you get the same permissions (access) error with the release
> library?
> Pat...
>
> ----- Original Message ----- From: "Miguel Cardenas" <renito73@stripped>
> To: <mysql@stripped>
> Sent: Saturday, January 10, 2009 10:22 AM
> Subject: VC++ 2008 / MySQL debug / Unhandled exception
>
>
>
>  Hello list
>>
>> I have a problem debugging a program that uses MySQL. The program itself
>> does not have problems, it runs perfectly when run in the console (command
>> prompt), but if it is executed inside the Visual C++ 2008 debugger it
>> causes
>> an error:
>>
>> Unhandled exception at 0x004b1560 in MyProgram.exe: 0xC0000005: Access
>> violation reading location 0x00000000
>>
>> when it reaches mysql_real_connect() I'm using "mysql-6.0.8-alpha-win32"
>> binary with setup.exe installer.
>>
>> Note that I don't try to enter inside mysql functions, even if no
>> breakpoints are setup and I let the program to run freely it aborts there
>> with the unhandled exception.
>>
>> My VC++ 2008 configuration is this:
>>
>> ------------------------------------------------------------------------
>> Includes:
>> C:\Program Files\MySQL\MySQL Server 6.0\include
>>
>> Libraries:
>> C:\Program Files\MySQL\MySQL Server 6.0\lib\debug
>>
>> Code generation:
>> Multi-threaded /MT
>>
>> Precompiled headers: NO
>>
>> Aditional dependencies:
>> wsock32.lib mysqlclient.lib libmysql.lib mysys.lib
>>
>> Ignore specific library: (as found in a forum post)
>> LIBCMTD.lib
>>
>> Debugging: YES /DEBUG
>> ------------------------------------------------------------------------
>>
>> I based my configuration on this post for VC++ 6.0
>> http://forums.mysql.com/read.php?45,49606,49606#msg-49606
>>
>> I guess it may be due to the ignored LIBCMTD.lib (debug version of MT?),
>> but
>> if don't ignore it the compilation fails at link time with lots of
>> redefined
>> symbols.
>>
>> My concrete question: is there something wrong with the configuration
>> shown
>> in that post that I adapted to VC++ 2008? are VC++ programs with MySQL
>> unable to run inside VC++ debugger? I don't want to debut my MySQL code it
>> is working already for *NIX, but there are other parts of the program that
>> may require debug and it aborts when calling a mysql function.
>>
>> Thanks for any comment or help
>>
>>
>

Thread
VC++ 2008 / MySQL debug / Unhandled exceptionMiguel Cardenas10 Jan
  • Re: VC++ 2008 / MySQL debug / Unhandled exceptionsafknw11 Jan
    • RE: VC++ 2008 / MySQL debug / Unhandled exceptionMartin Gainty11 Jan
      • Re: VC++ 2008 / MySQL debug / Unhandled exceptionMiguel Cardenas14 Jan
  • Re: VC++ 2008 / MySQL debug / Unhandled exceptionPatrick Sherrill11 Jan
    • Re: VC++ 2008 / MySQL debug / Unhandled exceptionMiguel Cardenas14 Jan