Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing up PNGOutputter issues #13753

Merged
merged 1 commit into from
Jul 17, 2019
Merged

Fixing up PNGOutputter issues #13753

merged 1 commit into from
Jul 17, 2019

Conversation

permcody
Copy link
Member

  • PNGOutputter restricted to work in dynaimc linkage mode only
    due to unresolved linkage problem with the library in static mode
  • Some constness added to member variables
  • Memory issue fixed

refs #13646

@@ -280,7 +279,7 @@ PNGOutput::makePNG()
Real width = dist_x * _resolution;
Real height = dist_y * _resolution;
// Allocate resources.
std::vector<png_byte> row((width * 4) + 1);
std::vector<png_byte> row((width + 1) * 4);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cause of running out of bounds...

@@ -348,7 +347,7 @@ PNGOutput::makePNG()
if (infop != nullptr)
png_free_data(pngp, infop, PNG_FREE_ALL, -1);
if (pngp != nullptr)
png_destroy_write_struct(&pngp, (png_infopp) nullptr);
png_destroy_write_struct(&pngp, &infop);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaking the info struct...

@permcody
Copy link
Member Author

FYI @Hysrok - This commit fixes up a few issues with the outputted that is preventing it from getting merged into the devel branch. Let me know if you have any questions. There were two memory issues.

- PNGOutputter restricted to work in dynaimc linkage mode only
  due to unresolved linkage problem with the library in static mode
- Some constness added to member variables
- Memory issue fixed

refs idaholab#13646
@rwcarlsen rwcarlsen added the PR: Auto Merge Add this label to have CIVET merge on success label Jul 17, 2019
@moosebuild
Copy link
Contributor

Job Documentation on d2d9331 wanted to post the following:

View the site here

This comment will be updated on new commits.

@moosebuild moosebuild merged commit dc28954 into idaholab:next Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Auto Merge Add this label to have CIVET merge on success PR: Ready for review/merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants