[protobuf] Re: Issue 371 in protobuf: GeneratedMessageTest.MergeFromSelf CHECK failed: (from) != (this)

2012-02-08 Thread protobuf

Updates:
Status: Accepted

Comment #1 on issue 371 by liuj...@google.com:  
GeneratedMessageTest.MergeFromSelf CHECK failed: (from) != (this)

http://code.google.com/p/protobuf/issues/detail?id=371

gtest-1.6.0 have known issues working with protobuf tests. Since 2.4.1,  
protobuf changes the CHECK() in test to throw std::exception by default  
instead of exit(1), which fails the gtest death check.


Workarounds:
1) use gtest-1.5 (the only version works with vs2010)
2) hack src\google\protobuf\stub\common.h by commenting out the #define  
PROTOBUF_USE_EXCEPTION block.


The svn head actually already points to gtest-1.5, however this doesn't  
work with MinGW32, as gtest-1.5 uses a non-portal nanosleep syscall, sigh..  
In the next release, we will make the PROTOBUF_USE_EXCEPTION configurable,  
and disable the exceptions in unittest, so vs2010 should work with gtest1.6


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



[protobuf] GeneratedMessageTest.MergeFromSelf CHECK failed: (from) != (this)

2012-02-06 Thread Artyom V. Pasyukov
Windows 7 64-bit, VS2010
Protobuf is from protobuf-2.4.1.zip.
gtest is replaced with gtest-1.6.0, because native isn't compiled.

tests.exe in Debug mode reports 11 failures (in release mode in reports 4
failures):
[  FAILED  ] 11 tests, listed below:
[  FAILED  ] GeneratedMessageTest.MergeFromSelf
[  FAILED  ] ExtensionSetTest.InvalidEnumDeath
[  FAILED  ] GeneratedMessageReflectionTest.UsageErrors
[  FAILED  ] MessageTest.SerializeFailsIfNotInitialized
[  FAILED  ] MessageTest.CheckInitialized
[  FAILED  ] Printer.Death
[  FAILED  ] ReflectionOpsTest.MergeFromSelf
[  FAILED  ] RepeatedField.Truncate
[  FAILED  ] TokenizerTest.ParseInteger
[  FAILED  ] TokenizerTest.ParseFloat
[  FAILED  ] TokenizerTest.ParseString

First of them:

libprotobuf FATAL d:\protobuf\protobuf-2.4.1\vsprojects\google\protobuf\
unittest.pb.cc:5538] CHECK failed: (from) != (this):
d:\protobuf\protobuf-2.4.1\src\google\protobuf\compiler\cpp\cpp_unittest.cc(500)::
Caught std::exception-derived exception escaping the death test statement.
Exception message: CHECK failed: (from) != (this):

Please advise.

Artyom

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



[protobuf] Issue 371 in protobuf: GeneratedMessageTest.MergeFromSelf CHECK failed: (from) != (this)

2012-01-31 Thread protobuf

Status: New
Owner: 
Labels: Type-Defect Priority-Medium

New issue 371 by wto...@gmail.com: GeneratedMessageTest.MergeFromSelf CHECK  
failed: (from) != (this)

http://code.google.com/p/protobuf/issues/detail?id=371

What steps will reproduce the problem?

Windows 7 64-bit, VS2010
Protobuf is from protobuf-2.4.1.zip.
gtest is replaced with gtest-1.6.0, because native isn't compiled.

1. In project properties for all projects set General/CharacterSet to Use  
Multi-Byte Character Set.
1. In project properties for all projects set C/C++/Code Generation/Runtime  
library to Multi-threaded Debug DLL (/MDd).

2. Build in Debug mode
3. Run tests.exe from protobuf-2.4.1\vsprojects\Debug

What is the expected output? What do you see instead?

tests.exe in Debug mode reports 11 failures (in release mode in reports 4  
failures):

[  FAILED  ] 11 tests, listed below:
[  FAILED  ] GeneratedMessageTest.MergeFromSelf
[  FAILED  ] ExtensionSetTest.InvalidEnumDeath
[  FAILED  ] GeneratedMessageReflectionTest.UsageErrors
[  FAILED  ] MessageTest.SerializeFailsIfNotInitialized
[  FAILED  ] MessageTest.CheckInitialized
[  FAILED  ] Printer.Death
[  FAILED  ] ReflectionOpsTest.MergeFromSelf
[  FAILED  ] RepeatedField.Truncate
[  FAILED  ] TokenizerTest.ParseInteger
[  FAILED  ] TokenizerTest.ParseFloat
[  FAILED  ] TokenizerTest.ParseString

Please use labels and text to provide additional information.

First of them:

libprotobuf FATAL  
d:\protobuf\protobuf-2.4.1\vsprojects\google\protobuf\unittest.pb.cc:5538]  
CHECK failed: (from) != (this):
d:\protobuf\protobuf-2.4.1\src\google\protobuf\compiler\cpp\cpp_unittest.cc(500)::  
Caught  
std::exception-derived exception escaping the death test statement.  
Exception message: CHECK failed: (from) != (this):



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