Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw osc::OutOfBufferMemoryException in release mode (Win32 VS2010 CL) #16

Open
GoogleCodeExporter opened this issue Aug 25, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

Platform :

Windows 7 / CMAKE GUI 2.8.12.2 generated VS2010 express 32bit project.

When the project is set to Release/MinSizeRel/RelWithDebInf

Whenever any message is added after osc::BeginMessage("..."), the error will 
throw.
eg:
osc::OutboundPacketStream p( buffer, OUTPUT_BUFFER_SIZE );
p << osc::BeginMessage( "/test" ) << osc::EndMessage;  // OK
p << osc::BeginMessage( "/test" ) << osc::Nil << osc::EndMessage;  // throw 
error.

Also warning C4702: unreachable code during compilation, in 
OutboundPacketStream << operator overload.
Seems any code after "CheckForAvailableArgumentSpace(X);" won't run.

The warning can be surpressed by turning off the optimization, but the error 
will still throw.

Could I know the direction how to debug it (I'm not an expert in C++, so need 
some advices).

Thanks.

Original issue reported on code.google.com by [email protected] on 13 May 2014 at 5:03

@GoogleCodeExporter
Copy link
Author

Found the error.

OscOutBoundPacketStream.cpp

Line 262
Insert: if( required > Capacity() )

Needed for windows platform

Original comment by [email protected] on 13 May 2014 at 5:30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant