[C++-sig] [c++-sig] python std::string assignment
Furkan Kuru
furkankuru at gmail.com
Fri Oct 17 16:07:26 CEST 2008
Definitely, but
On Fri, Oct 17, 2008 at 4:43 PM, Stefan Seefeld <seefeld at sympatico.ca>wrote:
> Furkan Kuru wrote:
>
>> b)
>> I am using Visual Studio 2005 and Windows Xp as development environment.
>>
>> I do not know too much about configuration details.
>>
>
> You should. Did you compile boost yourself or did you obtain a binary
> package from somewhere else ? As I said, you have to make sure boost
> (notably boost.python) is compiled with the same runtime settings (I believe
> that are the /M, /MD, /MT etc. flags) as your application.
>
Definitely, I will look into the details of build configuration.
I complied boost myself and the runtime settings are all same: /MD
I have a main application (exe)
a pyd
and boost_python-vc80-mt-1_36.dll
>
> What I think may be causing the crashes you are observing is that the
> initial strings get allocated from a memory pool of one runtime library, and
> then (attempted to be) deleted in another (during resize), causing the
> crash. But that's just a guess.
>
>
I tried setting strings to 30 chars in the constructors to force the size
allocation in another way but no change same problem.
name= "1234567890123456789012345678901234567890";
I do not know if it fails while deleting but it booms just during
assignment. I dont think it reaches delete time.
Do different configured PCs have different memory allocation routines?
Because a friend of mine tested the application on a different computer
running same os (vista) without anyproblems.
Regards,
--
Furkan Kuru
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20081017/495f1575/attachment.htm>
More information about the Cplusplus-sig
mailing list