nmwsharp / nmwsharp/polyscope

Callback functions for shutdown()?

オープン
#201 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
C++
スター
2.2k
フォーク
242
平均マージ
11分
マージ済み PR(30日)
1

説明

Hi, I encountered an issue that seems need some customization to the shutdown() function:

I have a separate thread initiated and detached before polyscope::init() -- a server listening from other software for sending geometries in.

The server use a shared_ptr<UIState> which is also used in the main().

Now if I close the main window of polyscope, there's always an error pointing to the ~shared_ptr<UIState>.

I'm not 100% sure what happened there, but it seems the main thread delete the shared_ptr<UIState> before the other thread exit. And when the server tries to delete that shared_ptr, it points to nowhere?

I assume manually exit the separate thread before the main should help.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

shutdown() のエントリポイントと、レポートで説明されている UIState の所有権およびライフタイムの経路を確認してください。シャットダウンフックによって、共有状態が破棄される前にデタッチされたサーバーを停止できるようにする方法を特定し、その後、報告されている shared_ptr エラーなしでメインウィンドウの終了が完了することを検証してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp
領域
desktop
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。