List:MySQL++« Previous MessageNext Message »
From:Drew Vogel Date:December 12 2005 6:38pm
Subject:Re: BadConverion::what()=Tried to convert "0.00P\uffffI" to a "d
View as plain text  
Warren Young wrote:
> Drew Vogel wrote:
>>  If I
>> select all of the columns in the table (named, not using *), the last 
>> column (wpc_bludgeoning) is corrupted. When I select just the four 
>> wpc_* columns, the data in the third column (wpc_chopping) corrupted. 
>> In both scenerios, it corrupts the data in the last or third rows, 
>> respectively, for both rows in the result set.
> 
> Sounds like you have a memory bug somewhere.  While it's possible that 
> it is in MySQL++, you'd think that someone else would have run into 
> something this blatant before.
> 
> If you're running on a Linux or OS X machine, try running your program 
> under valgrind.  If on Windows, you may only have the choice of 
> commercial programs like Bounds Checker.
> 

I'm not sure I actually solved this, but it went away. I went over the 
execution path once more today (think fresh eyes might catch something 
new). I realized that the Connection object was never closed or deleted. 
I added a call to ->close() and a delete statement. Now the data 
corruption is gone.

I am using the State Threads library, but the library never actually 
creates a new thread (the exception was being thrown in the startup 
code, before new threads are needed) so it is unlikely that this was 
causing a problem. Any ideas how closing or not closing the Connection 
object (well after the conversion is made) could have any effect on the 
conversion? If anything, I would think that the data corruption would 
happen if the conversion happened _after_ the connection was closed.

Drew Vogel
Thread
BadConverion::what()=Tried to convert "0.00P\uffffI" to a "dDrew Vogel11 Dec
  • Re: BadConverion::what()=Tried to convert "0.00P\uffffI" to a "dDrew Vogel11 Dec
  • Re: BadConverion::what()=Tried to convert "0.00P\uffffI" to a "dWarren Young12 Dec
    • Re: BadConverion::what()=Tried to convert "0.00P\uffffI" to a "dDrew Vogel12 Dec
      • Re: BadConverion::what()=Tried to convert "0.00P\uffffI" to a "dWarren Young12 Dec
        • Re: BadConverion::what()=Tried to convert "0.00P\uffffI" to a "dDrew Vogel12 Dec
          • Re: BadConverion::what()=Tried to convert "0.00P\uffffI" to a "dWarren Young12 Dec
            • Re: BadConverion::what()=Tried to convert "0.00P\uffffI" to a "dDrew Vogel12 Dec
          • Re: BadConverion::what()=Tried to convert "0.00P\uffffI" to a "dDrew Vogel16 Dec
            • Re: BadConverion::what()=Tried to convert "0.00P\uffffI" to a "dChris Frey19 Dec