You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in PR: #541
which was a temporary fix for the assertion error: python: /project/src/dlite-json.c:306: dlite_json_asprint: Assertion `0 <= m && m < (int)*size' failed.
Added one more byte to the allocated buffer than expected, which seems to fix the assertion. Requiring this extra byte is unexpected. It seems to be caused by dlite_json_sprint() reporting one byte too little when called with size=0 for a collection with relations!
Create a proper fix for this issue!
add unit tests
The text was updated successfully, but these errors were encountered:
PR #649 checks that dlite_json_sprintf() returns the correct number of bytes needed for serialising a collection with relations. Seems that the hypothesis that this issue is "caused by dlite_json_sprint() reporting one byte too little when called with size=0 for a collection with relations" may be wrong.
It would be great to get an example that consistently reproduces this issue.
# Description
Added new test for issue #543. It check whether there is an issue with
dlite_json_sprint() reporting one byte too little when writing a
collection with relations. The new does not reproduce the issue...
## Type of change
- [ ] Bug fix & code cleanup
- [ ] New feature
- [ ] Documentation update
- [x] Test update
## Checklist for the reviewer
This checklist should be used as a help for the reviewer.
- [ ] Is the change limited to one issue?
- [ ] Does this PR close the issue?
- [ ] Is the code easy to read and understand?
- [ ] Do all new feature have an accompanying new test?
- [ ] Has the documentation been updated as necessary?
in PR: #541
which was a temporary fix for the assertion error: python: /project/src/dlite-json.c:306: dlite_json_asprint: Assertion `0 <= m && m < (int)*size' failed.
Added one more byte to the allocated buffer than expected, which seems to fix the assertion. Requiring this extra byte is unexpected. It seems to be caused by dlite_json_sprint() reporting one byte too little when called with size=0 for a collection with relations!
The text was updated successfully, but these errors were encountered: