Re: Crash while initializing StaticDescriptorInitializer

2009-03-27 Thread Jesper Eskilson

On Fri, Mar 27, 2009 at 8:08 PM, Kenton Varda  wrote:
> On Fri, Mar 27, 2009 at 3:33 AM, Jesper Eskilson  wrote:
>>
>> (BTW: I created a set of CMake (http://cmake.org) build files for
>> Protobufs, in case you're interested in not maintaining parallell
>> Makefiles/project files for Linux/Windows.)
>
> We considered using cmake originally, but decided it was more important to
> avoid making users download extra tools before they could compile protocol
> buffers.  So I continue to toil away, maintaining MSVC project files, as
> silly as they are...

That is one major hurdle for getting people to like CMake; you need an
extra tool before you get your buildfiles. If CMake just could create
relocatable project files, things would look much brighter.

-- 
/Jesper

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Crash while initializing StaticDescriptorInitializer

2009-03-27 Thread Kenton Varda
On Fri, Mar 27, 2009 at 3:33 AM, Jesper Eskilson  wrote:

> (BTW: I created a set of CMake (http://cmake.org) build files for
> Protobufs, in case you're interested in not maintaining parallell
> Makefiles/project files for Linux/Windows.)


We considered using cmake originally, but decided it was more important to
avoid making users download extra tools before they could compile protocol
buffers.  So I continue to toil away, maintaining MSVC project files, as
silly as they are...

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Crash while initializing StaticDescriptorInitializer

2009-03-27 Thread Jesper Eskilson

On Thu, Mar 26, 2009 at 6:57 PM, Kenton Varda  wrote:
> On Thu, Mar 26, 2009 at 9:28 AM, Jesper  wrote:
>>
>> I think so, but I'll double-check. (Wouldn't that have showed up when
>> libprotobuf.lib was linked into the exe?)
>
> Unfortunately, probably not.  Strange crashes at runtime are the usual
> symptom.  :(

It turned out to be caused by a mismatch in using _SECURE_SCL, i.e.
checked iterators. Just to add to the Debug/Release problems,
Microsoft has added extra defines which must not be mixed --
_SECURE_SCL affects the binary layout of STL containers, so it has to
be defined the same way everywhere, and unfortunately the code I'm
working on has a non-default setting for _SECURE_SCL.

Thanks anyway for all the help.

(BTW: I created a set of CMake (http://cmake.org) build files for
Protobufs, in case you're interested in not maintaining parallell
Makefiles/project files for Linux/Windows.)

-- 
/Jesper

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Crash while initializing StaticDescriptorInitializer

2009-03-26 Thread os_

On Mar 26, 9:28 am, Jesper  wrote:
> I think so, but I'll double-check. (Wouldn't that have showed up when
> libprotobuf.lib was linked into the exe?)
Also, make sure that C++ runtime linkage is consistent between these
components. Actually, it should be set to "dynamic" as that would give
you a shared heap.

Oleg.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Crash while initializing StaticDescriptorInitializer

2009-03-26 Thread Kenton Varda
On Thu, Mar 26, 2009 at 9:28 AM, Jesper  wrote:

> I think so, but I'll double-check. (Wouldn't that have showed up when
> libprotobuf.lib was linked into the exe?)


Unfortunately, probably not.  Strange crashes at runtime are the usual
symptom.  :(

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Crash while initializing StaticDescriptorInitializer

2009-03-26 Thread Jesper



On Mar 26, 5:22 pm, Kenton Varda  wrote:
> Did you make sure to compile libprotobuf and your code using the same
> settings?  (E.g. debug vs. release, same compiler version.)  MSVC is pretty
> touchy about that when using STL in the interface to a library.

I think so, but I'll double-check. (Wouldn't that have showed up when
libprotobuf.lib was linked into the exe?)

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Crash while initializing StaticDescriptorInitializer

2009-03-26 Thread Kenton Varda
Did you make sure to compile libprotobuf and your code using the same
settings?  (E.g. debug vs. release, same compiler version.)  MSVC is pretty
touchy about that when using STL in the interface to a library.

On Thu, Mar 26, 2009 at 9:08 AM,  wrote:

>
> I have libprotobuf.lib linked into a DLL, and when loading the DLL, I
> get the following crash. (Noteworthy is that I previously hade the
> same code linked into a single exe, and then it worked without any
> problem.)
>
> Any clues about how I can solve this?
>
> CSpyServerLib.dll!
>
> std::_Tree,std::allocator
>
> >,std::less,std::allocator
> >
>
> >,std::allocator,std::allocator
> > >,0> >::erase
>
> (std::_Tree,std::allocator
>
> >,std::less,std::allocator
> >
>
> >,std::allocator,std::allocator
> > >,0> >::iterator _First=,
>
> std::_Tree,std::allocator
>
> >,std::less,std::allocator
> >
>
> >,std::allocator,std::allocator
> > >,0> >::iterator _Last="")  Line 926 + 0xb bytes  C++
>CSpyServerLib.dll!google::protobuf::DescriptorBuilder::BuildFile
> (const google::protobuf::FileDescriptorProto & proto={...}, void
> (const google::protobuf::FileDescriptor *)*
> descriptor_assigner=0x00d7c0e0)  Line 2420 + 0x25 bytes C++
>CSpyServerLib.dll!
> google::protobuf::DescriptorPool::InternalBuildGeneratedFile(const
> void * data=0x00db31b8, int size=3449, void (const
> google::protobuf::FileDescriptor *)* descriptor_assigner=0x00d7c0e0)
> Line 1962 + 0x2f bytes  C++
>CSpyServerLib.dll!
> google::protobuf::protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto
> ()  Line 547C++
>CSpyServerLib.dll!google::protobuf::MessageOptions::default_instance
> ()  Line 3743   C++
>CSpyServerLib.dll!
> google::protobuf::DescriptorBuilder::CrossLinkMessage
> (google::protobuf::Descriptor * message=0x00bbf448, const
> google::protobuf::DescriptorProto & proto={...})  Line 2890 + 0x5
> bytes   C++
>CSpyServerLib.dll!google::protobuf::DescriptorBuilder::CrossLinkFile
> (google::protobuf::FileDescriptor * file=0x00bbf2c8, const
> google::protobuf::FileDescriptorProto & proto={...})  Line 2871 + 0x18
> bytes   C++
>CSpyServerLib.dll!google::protobuf::DescriptorBuilder::BuildFile
> (const google::protobuf::FileDescriptorProto & proto={...}, void
> (const google::protobuf::FileDescriptor *)*
> descriptor_assigner=0x00ccb7f0)  Line 2400  C++
>CSpyServerLib.dll!
> google::protobuf::DescriptorPool::InternalBuildGeneratedFile(const
> void * data=0x00da9a18, int size=6815, void (const
> google::protobuf::FileDescriptor *)* descriptor_assigner=0x00ccb7f0)
> Line 1962 + 0x2f bytes  C++
> >   CSpyServerLib.dll!cdp::`dynamic initializer for
> 'static_descriptor_initializer_cdp_2eproto_''()  Line 1293 + 0x42 bytes C++
>msvcr80.dll!78131742()
> ...
>
>
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Crash while initializing StaticDescriptorInitializer

2009-03-26 Thread jesper . eskilson

I have libprotobuf.lib linked into a DLL, and when loading the DLL, I
get the following crash. (Noteworthy is that I previously hade the
same code linked into a single exe, and then it worked without any
problem.)

Any clues about how I can solve this?

CSpyServerLib.dll!
std::_Tree,std::allocator
>,std::less,std::allocator
>
>,std::allocator,std::allocator
> >,0> >::erase
(std::_Tree,std::allocator
>,std::less,std::allocator
>
>,std::allocator,std::allocator
> >,0> >::iterator _First=,
std::_Tree,std::allocator
>,std::less,std::allocator
>
>,std::allocator,std::allocator
> >,0> >::iterator _Last="")  Line 926 + 0xb bytes  C++
CSpyServerLib.dll!google::protobuf::DescriptorBuilder::BuildFile
(const google::protobuf::FileDescriptorProto & proto={...}, void
(const google::protobuf::FileDescriptor *)*
descriptor_assigner=0x00d7c0e0)  Line 2420 + 0x25 bytes C++
CSpyServerLib.dll!
google::protobuf::DescriptorPool::InternalBuildGeneratedFile(const
void * data=0x00db31b8, int size=3449, void (const
google::protobuf::FileDescriptor *)* descriptor_assigner=0x00d7c0e0)
Line 1962 + 0x2f bytes  C++
CSpyServerLib.dll!
google::protobuf::protobuf_BuildDesc_google_2fprotobuf_2fdescriptor_2eproto
()  Line 547C++
CSpyServerLib.dll!google::protobuf::MessageOptions::default_instance
()  Line 3743   C++
CSpyServerLib.dll!
google::protobuf::DescriptorBuilder::CrossLinkMessage
(google::protobuf::Descriptor * message=0x00bbf448, const
google::protobuf::DescriptorProto & proto={...})  Line 2890 + 0x5
bytes   C++
CSpyServerLib.dll!google::protobuf::DescriptorBuilder::CrossLinkFile
(google::protobuf::FileDescriptor * file=0x00bbf2c8, const
google::protobuf::FileDescriptorProto & proto={...})  Line 2871 + 0x18
bytes   C++
CSpyServerLib.dll!google::protobuf::DescriptorBuilder::BuildFile
(const google::protobuf::FileDescriptorProto & proto={...}, void
(const google::protobuf::FileDescriptor *)*
descriptor_assigner=0x00ccb7f0)  Line 2400  C++
CSpyServerLib.dll!
google::protobuf::DescriptorPool::InternalBuildGeneratedFile(const
void * data=0x00da9a18, int size=6815, void (const
google::protobuf::FileDescriptor *)* descriptor_assigner=0x00ccb7f0)
Line 1962 + 0x2f bytes  C++
>   CSpyServerLib.dll!cdp::`dynamic initializer for 
> 'static_descriptor_initializer_cdp_2eproto_''()  Line 1293 + 0x42 bytes C++
msvcr80.dll!78131742()
...


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---