Model default constructor does not initialize base Model structure members
まだ誰も着手していません。
評価
調査の方向性
Start at the raylib::Model default constructor shown in the issue and inspect how it derives from ::Model. Reproduce the provided local-scope example under Visual Studio, then verify that destroying a default-constructed model no longer attempts to free invalid pointers.
索引モデルが issue の本文から書いたものです。
説明
I've found that raylib::Model class is deraived from ::Model structure.
Whe you instantiate raylib::Model with default constructor no any members of ::Model is initialized, under Visual Studio you got all of members filled with some debug non zero values.
When you try to call ~Model destructor you will try to free memory by invalid pointer.
This Code inserted anywhere in main will cause an error:
{
raylib::Model model;
// You'll get an exception on block exit
}
Very quick fix - add base structure initialization like this:
/**
* Model type
*/
class Model : public ::Model {
public:
Model() : ::Model{}
{
// Nothing.
}
- 主要言語
- C++
- スター
- 965
- フォーク
- 120
- 平均マージ
- 1日 12時間
- マージ済み PR(30日)
- 8
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
RobLoach/raylib-cpp のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
RobLoach/raylib-cpp#425 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
RobLoach/raylib-cpp#427 ·
-
Code genオープン
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
RobLoach/raylib-cpp#415 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
RobLoach/raylib-cpp#370 · コメント 1 件 ·
-
SDF Font Supportオープン
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
RobLoach/raylib-cpp#366 · コメント 3 件 ·
RobLoach/raylib-cpp の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
WebAssembly/binaryen#9207 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
godotengine/godot#124139 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
ChicoState/autovalidate#195 ·