Release build seg faults at vector push_back
-
i'm currently experiencing a strange problem under vc++ .NET 7.0. i hope someone has a hint for me, i'm kind of lost atm. i'm using a vector of object instances in my code. using the release build,I get a runtime error intermittently while adding to the vector using push_back. When i use the debug build. i can add as much elements as i want without any problems . Is there any special setting to be done for reease build? It is is simple as EMEventContainer instance("key","value"); this_vector.push_back(instance); But it does not work properly in release build.
-
i'm currently experiencing a strange problem under vc++ .NET 7.0. i hope someone has a hint for me, i'm kind of lost atm. i'm using a vector of object instances in my code. using the release build,I get a runtime error intermittently while adding to the vector using push_back. When i use the debug build. i can add as much elements as i want without any problems . Is there any special setting to be done for reease build? It is is simple as EMEventContainer instance("key","value"); this_vector.push_back(instance); But it does not work properly in release build.
-
i'm currently experiencing a strange problem under vc++ .NET 7.0. i hope someone has a hint for me, i'm kind of lost atm. i'm using a vector of object instances in my code. using the release build,I get a runtime error intermittently while adding to the vector using push_back. When i use the debug build. i can add as much elements as i want without any problems . Is there any special setting to be done for reease build? It is is simple as EMEventContainer instance("key","value"); this_vector.push_back(instance); But it does not work properly in release build.
-
i'm currently experiencing a strange problem under vc++ .NET 7.0. i hope someone has a hint for me, i'm kind of lost atm. i'm using a vector of object instances in my code. using the release build,I get a runtime error intermittently while adding to the vector using push_back. When i use the debug build. i can add as much elements as i want without any problems . Is there any special setting to be done for reease build? It is is simple as EMEventContainer instance("key","value"); this_vector.push_back(instance); But it does not work properly in release build.
This is usually a sign that you have some memory issues elsewhere in your code. Debug builds allocate extra space before and after sections of memory to help indicate if you have any buffer overrun issues. Release builds don't have that, so if you do have such a problem, you will corrupt memory rather quickly. Things to look for are the constructor of the EMEventContainer object, its copy constructor, its copy assignment operator, any heap allocations within that class, and if you are using multiple threads, any unprotected accesses to an STL container.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac