Actions
Patch #16319
closedRandom crash when using custom fields
Status:
Closed
Priority:
Normal
Assignee:
Category:
Code cleanup/refactoring
Target version:
Start date:
Due date:
% Done:
0%
Estimated time:
Description
We (Planio) 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, the preferred way to set and get a value from within a custom setter and getter is to use read_attribute
and write_attribute
.
Files
Updated by Felix Schäfer over 10 years ago
- File 16319.patch 16319.patch added
The attached patch changes the super
calls in CustomField#possible_values
and CustomField#possible_values=
to read_attribute
and write_attribute
.
Updated by Etienne Massip over 10 years ago
- Target version set to Candidate for next minor release
Updated by Ebrahim Mohammadi over 10 years ago
- File fix-crash.diff fix-crash.diff added
I experience some random crashed too. Isn't your problem the same as my problem which I worked around using the attached patch?
Updated by Jean-Philippe Lang over 10 years ago
- Category set to Code cleanup/refactoring
- Status changed from New to Resolved
- Assignee set to Jean-Philippe Lang
- Target version changed from Candidate for next minor release to 2.5.1
Patch applied in r12968, thanks.
Actions