View Issue Details

IDProjectCategoryView StatusLast Update
0013765mantisbtcsvpublic2014-09-23 18:05
ReporterChristianLuef Assigned Todregad  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.8 
Target Version1.2.9Fixed in Version1.2.9 
Summary0013765: Excel Export ends in infinite loop if number of viewing issues mod 100 = 0
Description

If the number of "Viewing Issues" equals a multiple of $t_per_page from excel_xml_export.php, which is 100 by default, and you try to do an "Excel Export", the request end up in an infinite loop.

I think it has something to do with the following code snippet from excel_xml_export.php:

...
if ( $t_row_count == $t_per_page ) {
$t_page_number++;
$t_bug_count = null;
$t_page_count = null;

        $result = filter_get_bug_rows( $t_page_number, $t_per_page, $t_page_count, $t_bug_count );
        if ( $result === false ) {
            $t_more = false;
        }
    } else {
        $t_more = false;
    }

...

If for example the $t_row_count == 100 and $t_per_page == 100, the filter_get_bug_rows method is called which I think will not return false in this case but tries infinitely to export the elements [0-99].

TagsNo tags attached.

Relationships

related to 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 

Activities

dregad

dregad

2012-01-18 14:39

developer   ~0030933

I confirm the behavior, should be easy enough to fix.

dregad

dregad

2012-01-19 05:55

developer   ~0030939

I changed the condition to process next page.

grangeway

grangeway

2013-04-05 17:57

reporter   ~0036352

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

Related Changesets

MantisBT: master d95ce2f0

2012-01-18 21:26

dregad


Details Diff
Fix 0013765: infinite loop in Excel export

If the number of records in the View Issues page was a multiple of 100,
the Excel export ended up in an infinite loop.

Instead of testing on the number of rows returned vs the number of rows
per page, the code now uses the current page number vs the total number
of pages returned by filter_get_bug_rows() to set the loop's exit flag.
Affected Issues
0013765
mod - excel_xml_export.php Diff File

MantisBT: master-1.2.x 88d7fa68

2012-01-18 21:26

dregad


Details Diff
Fix 0013765: infinite loop in Excel export

If the number of records in the View Issues page was a multiple of 100,
the Excel export ended up in an infinite loop.

Instead of testing on the number of rows returned vs the number of rows
per page, the code now uses the current page number vs the total number
of pages returned by filter_get_bug_rows() to set the loop's exit flag.
Affected Issues
0013765
mod - excel_xml_export.php Diff File