Skip to content

Fix crash when displaying vehicle overlay during route calculation#579

Merged
simupoppo merged 1 commit into
OTRP-KUTAv6from
fix-route-crash
Jun 11, 2026
Merged

Fix crash when displaying vehicle overlay during route calculation#579
simupoppo merged 1 commit into
OTRP-KUTAv6from
fix-route-crash

Conversation

@teamhimeh

Copy link
Copy Markdown
Owner

概要

経路計算中の画面更新で、空になっている経路の末尾を参照してクラッシュする問題を修正します。

原因

route_t::calc_route() は経路探索開始時に既存の経路をクリアします。探索中の INT_CHECK() から画面更新が実行されると、vehicle_t::display_overlay() が空の経路に対して back() を呼び、範囲外アクセスが発生していました。

修正内容

  • 経路に要素がある場合のみ back()welt->lookup() を呼ぶように変更
  • 経路が空の場合は終点の地面を NULL として既存の表示処理を継続

確認

  • make -j8 成功
  • git diff --check 成功

@simupoppo
simupoppo merged commit 9bc093f into OTRP-KUTAv6 Jun 11, 2026
16 checks passed
@teamhimeh
teamhimeh deleted the fix-route-crash branch June 11, 2026 11:23
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

Successfully merging this pull request may close these issues.

2 participants