Crashes on M107 when creating peer connection only on debug build on Windows

62 views
Skip to first unread message

Nick Hwang

unread,
May 21, 2023, 9:24:10 AM5/21/23
to discuss-webrtc
What steps will reproduce the problem?
1.Build the webrtc with MSVC by using c++latest and fix few bugs
2. Create PeerConnection by

```
peer_connection_factory_->CreatePeerConnectionOrError(config, PeerConnectionDependencies{//observer})
```

It crashes on
```
void TaskQueuePacedSender::SetPacingRates(DataRate pacing_rate,
                                          DataRate padding_rate) {
  task_queue_.PostTask([this, pacing_rate, padding_rate]() {
    RTC_DCHECK_RUN_ON(&task_queue_);
    pacing_controller_.SetPacingRates(pacing_rate, padding_rate);
    MaybeProcessPackets(Timestamp::MinusInfinity());
  });
}
```

Actual place of crash is 
```

  void InitializeRemoteManager(Args&&... args) {

    // unique_ptr is used for exception-safety in case construction throws.

    std::unique_ptr<void, TrivialDeleter> uninitialized_target(

        ::operator new(sizeof(T)), TrivialDeleter(sizeof(T)));

    ::new (uninitialized_target.get()) T(std::forward<Args>(args)...);

    state_.remote.target = uninitialized_target.release();

    state_.remote.size = sizeof(T);

    manager_ = RemoteManagerTrivial;

  }

```
with null pointer exception.

I am using M107 and my OS is
Windows 10 Enterprise
21H2 19044.2965

Crashes seem to only occur on debug build. I have tried to build the webrtc on is_clang=true, but it crashes when used with MSVC program with same error as https://groups.google.com/g/discuss-webrtc/c/xmU6yqO7Vhc

If anyone know how to fix this issue or successful running Windows on debug build. Please let me know.
Reply all
Reply to author
Forward
0 new messages