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

Unityの箱庭アセット登録で失敗する #6

Open
tmori opened this issue Aug 25, 2023 · 1 comment
Open

Unityの箱庭アセット登録で失敗する #6

tmori opened this issue Aug 25, 2023 · 1 comment

Comments

@tmori
Copy link
Contributor

tmori commented Aug 25, 2023

  • 問題が発生する条件:

    • libshakocの共有ライブラリを使用して箱庭のアセットへ登録する場合
  • 原因の調査状況:

    • Unityのシミュレーション停止ボタンを押しても、共有メモリが解放されないことが原因と思われる。
    • Unity再起動したら問題が発生しないため。
  • 対処案:

    • Unity側から共有メモリを解放する(今のところ方法がわからない)
    • 箱庭コア側の起動時にメモリを完全に初期化してしまう
@tmori
Copy link
Contributor Author

tmori commented Aug 27, 2023

原因わかりました。

設計として、共有メモリとセマフォをUnityとは箱庭の起動スクリプト側で使っています。

Unity側の仕様?では、シミュレーション終わっても、共有メモリとセマフォは参照してはなさい。
一方で、起動スクリプト側では、毎回、共有メモリとセマフォを解放しようとしている。

このスクリプトを実行すると、共有メモリは解放されないが、セマフォは解放されてしまっている。
おそらく、この不整合が原因で失敗したものと思われます。

証拠に、以下の修正を加えたところ問題は顕在化しなくなりました。

toppers/hakoniwa-mros2sim@a27fc05

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

No branches or pull requests

1 participant