mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #145] Lib trying to free image memory without image defined #118
Labels
No labels
awaiting user feedback
bug
cmake
cmake
docs
feature request
in progress
long term
medium term
medium term
pull-request
question
question
ready to close
short term
under investigation
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/libxlsxwriter#118
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ncfernan on GitHub (Jan 26, 2018).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/145
Originally assigned to: @jmcnamara on GitHub.
When using the function worksheet_insert_chart_opt the options parameters is copied to an internal structure that is shared with image functions, so when the program closes the workbook, the image points to dirty areas because no image was set.
If the options parameter is set to NULL, no problem arises.
@ncfernan commented on GitHub (Jan 26, 2018):
I found the problem in worksheet.c:
@jmcnamara commented on GitHub (Jan 26, 2018):
Thanks for the report.
Could you add a small, compilable program that demonstrates the issue.
John
@RaFaeL-NN commented on GitHub (Jan 29, 2018):
I sent out the same report a month ago. The problem is especially relevant when using the library with other programming languages in binary form. The best way is to split the options into two structures - one for external user use with 4 fields as a parameter, and the second one complete for internal
@jmcnamara commented on GitHub (Jan 29, 2018):
@ncfernan You will need to initialize the
lxw_image_optionsstruct since it includes some non public members.However, I'll split the external and internal structs in a future release to avoid this type of issue.
@jmcnamara commented on GitHub (Feb 4, 2018):
I've pushed a fix for this issue to the master branch. It will be in the next release.
@ncfernan commented on GitHub (Feb 4, 2018):
Thank you, John. That was the best response for an issue that I've seen in a long time. Keep up the excellent work!
@jmcnamara commented on GitHub (Feb 4, 2018):
Thanks. :-)