プロジェクト

全般

プロフィール

Vote #75030

完了

Random crash when using custom fields

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Code cleanup/refactoring_30
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
30
version_id:
82
issue_org_id:
16319
author_id:
3866
assigned_to_id:
1
comments:
5
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

We ("Planio":https://plan.io) have seen several random crashes when using custom fields and have narrowed the problem to the usage of @super@ to access attribute setters and getters in ActiveRecord models. According the the "@ActiveRecord@ docs":http://api.rubyonrails.org/classes/ActiveRecord/Base.html#class-ActiveRecord::Base-label-Overwriting+default+accessors, the preferred way to set and get a value from within a custom setter and getter is to use @read_attribute@ and @write_attribute@.


journals

The attached patch changes the @super@ calls in @CustomField#possible_values@ and @CustomField#possible_values=@ to @read_attribute@ and @write_attribute@.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
I experience some random crashed too. Isn't your problem the same as my problem which I worked around using the attached patch?
--------------------------------------------------------------------------------
Patch applied in r12968, thanks.
--------------------------------------------------------------------------------
Merged.
--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

  • カテゴリCode cleanup/refactoring_30 にセット
  • 対象バージョン2.5.1_82 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0