Defect #23962
Updated by Toshi MARUYAMA about 8 years ago
I was able to reproduce the bug descibed hereafter on a bitnami vanilla redmine install. This bug makes the server eventually run out of memory, so is quite severe in my opinion. <pre> Environment: Redmine version 3.3.0.stable Ruby version 2.1.10-p492 (2016-04-01) [x86_64-linux] Rails version 4.2.6 Environment production Database adapter Mysql2 SCM: Subversion 1.9.4 Cvs 1.12.13 Git 2.7.4 Filesystem Redmine plugins: no plugin installed </pre> The bug occurs when trying to export to pdf a list of issues (on the issues page) with a huge amount of columns (around 50 or more). It happens even if there is only 1 issue to export. To reproduce the bug, you can create around 40 custom fields with a random name (30 chars) / format and assign them to a tracker / project. then create an issue with random content in the fields. Then on the issues page, export to pdf with all columns included. Because anyway the pdf would not look nice with such big amount of columns, we could perhaps forbid the export if there are too many columns (lets say > 40) selected in the export. This is what I added to mitigate the error, in app/controllers/issues_controller.rb#index: <pre><code class="ruby"> <pre> if params[:format] == 'pdf' && @query.column_names.count > 40 redirect_to(:back) flash[:error] = "Please reduce the amount of columns selected." return end </code></pre> </pre> After further investigation, I found the problem to be located in lib/redmine/export/pdf.rb, in the RDMMultiCell method. So it may be due to RBPDF...