Kenton, thanks for the help.

yes it was exactly due to the debug verison of the protobuf DLL used
in an application build in Release.
After we changed all binaries (libprotobuf, libprotc) to release build
every thing started working.

Cheers
Anu


On Dec 11, 7:34 pm, Kenton Varda <ken...@google.com> wrote:
> Make sure that if your app is compiled in debug mode, you are also using a
> debug-mode compile of libprotobuf.lib, and similarly if your app is complied
> in release mode you use the release-mode libprotobuf.lib.  Unfortunately,
> MSVC's STL implementation differs between debug and release mode, and
> libprotobuf uses STL in its interface, so the debug and release libs are not
> binary-compatible.
>
> Also make sure that you've updated to version 2.0.3, as there was a bug
> fixed in TextFormat.  (But I don't think it's one that could differ in debug
> vs. release mode.)
>
> If you still have the problem, please write an example program demonstrating
> the problem and send it to me to debug.  Thanks.
>
> On Thu, Dec 11, 2008 at 2:41 AM, anu <anu.rajag...@gmail.com> wrote:
>
> > Hi,
>
> > We are facing a strange problem in visual studio 2008 while using
> > google::protobuf::TextFormat::ParseFromString (string , Message *)
>
> > In debug mode the program works fine and is able to read the messages
> > correctly . In relase mode the usage of ParseFromString is leading to
> > a crash.
>
> > The usage is
>
> > ScenarioInfo *scnInfo = new ScenarioInfo();
> > std::string scn; //+ contains the data in protocol buffer format
>
> > //+ next line is crashing in Release Mode
> > if (google::protobuf::TextFormat::ParseFromString(scn.toStdString(),
> > scninfo)) {
> >   scninfo->has_name();
> >   //Do some thing
> > }
>
> > Does anybody faced similar problem in Windows Visual Studio 2008
> > environment ? Is it some thing to do with the usage of API's ?
>
> > Please help.
>
> > Thanks in Advance
> > Anu
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to