Open empirefox opened 9 years ago
Hi empirefox, I'm seeing the same thing with similar results in gdb in Release. No theories at the moment.
One data point, when I built my usual target, which is several thousand commits behind, b8425b (revision 7625) and ran your snippet in Release, I didn't get a segfault.
./main run start create capturer ok delete capturer ok quit
Seems degrading the revision is the only way now. I'll do it as a temporary solution.
Did anyone get any further with this?
I too see this crash when linking against the Release build, not with the Debug build, not even an error reported by valgrind in the debug build - currently using 10279/a9046d0
I started making some very simple test cases instantiating single classes, the one that appears to cause the crash in a full application (rtc::RollingAccumulator
A basic instance of cricket::VideoCapturer however crashes. So I started building up to to a copy of this class from scratch and found that as soon as I add cricket::CoordinatedVideoAdapter I start to see crashes. indeed the following crashes :
int main(int artgc,char\ argv) { cricket::CoordinatedVideoAdapter adaptor; }
I made my own copy of cricket::CoordinatedVideoAdapter, MyCoordinatedVideoAdapter, bizarrely this doesn't crash!
class MyCoordinatedVideoAdapter { ...... ......
int main(int artgc,char\ argv) { MyCoordinatedVideoAdapter adaptor; }
The class definition and all the methods are exact copies form the build with only the namespaces amended where required and class name changed to be a bit more explicit on what I have done.
So now I am left scratching my head (well , actually writing this) and wonder where to look next, possibly compile and linker flags.
Are there any special compile/link time flags needed besides those in lib/
I'm getting all kinds of odd results, so decided to try building the peerconnection_client. Sure enough this doesn't behave, linked against the Debug lib it launches, connects to server but crashes when ateempt to connect to another client at:
(common.cc:59): ../../talk/app/webrtc/videosource.cc(334): ASSERT FAILED: capturer != NULL @ Create
when linked with the Release lib it crashes as soon as hit the connect button.
The prebuilt binary works fine, not had audio connected to check that works but I get video at both ends.
By prebuilt, I mean the binary that gets built by the builder, I used the builder to build here locally rather than downloading a prebuilt zip.
Any solution to this problem,yet?
To prevent this simply put #define NDEBUG in your code It is present in all the ninja build scripts, even the release ones
@amitv87 ,Thank you SO MUCH, you saved my time!
I meet this error in Debug version. very funny. And I follow the advice to add NDEBUG. And it works. Any body can give an explanation?
Hi vsimon
I came across a problem which took me 3 weeks to find what code always cause segfault. Though i have work hard on it, i only found the debug and release versions are different and i still don't know what the diff is. Finally i build a simple test here and i cannot move forward one step:
Log when using debug lib:
Log when using release lib:
The gdb info when using release lib:
The gdb info of my origin code is weird(output.c is a source of ffmpeg): sometimes:
and sometimes:
Env:
Thanks!