Dependency Graph

Dependency Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
0011079mantisbtbugtrackerpublic2010-04-23 23:22
Reporteralainp Assigned Todhx  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionduplicate 
Product Version1.2.0rc1 
Summary0011079: Error viewing private note
Description

User "reporter" has following error when viewing a bug with a private note :

Fatal error: Maximum execution time of 40 seconds exceeded in /home/cpodm/public_html/help/core/user_pref_api.php on line 526

When the private note is deleted, the bug view page opens correctly.

(User "developer" has no problem viewing the bug with the private note).

TagsNo tags attached.

Relationships

duplicate of 0010655 closedvboctor Private notes cause the view page to stop rendering 

Activities

dhx

dhx

2009-10-26 07:10

reporter   ~0023327

Can you please try upgrading to 1.2.0rc2 and if that doesn't fix your problem, could you please copy+paste approx 10 lines either side of where the error is occurring within user_pref_api.php?

I can't reproduce the error you're getting and I also can't see any reason why line 526 in user_pref_api.php (of version 1.2.0rc1) would create an endless loop.

Just out of interest, can you reproduce this timeout in other tickets with private bug notes? The 40 second timeout could be a simple matter of trying to view a bug with 1000 notes attached on a server that is already overloaded.

alainp

alainp

2009-10-26 07:32

reporter   ~0023329

I'll try upgrading to rc2.

in the meantime, I can reproduce this on any bug, simply by making a note private and trying to access it with a "reporter" user. (Max number of notes per bug is 10).

Note that my default language is not english ("french") as the lines 516 + in user_pref_api.php point to language selection.

/**

  • returns user language
  • @param int $p_user_id
  • @param int $p_project_id
  • @return string
    */
    function user_pref_get_language( $p_user_id, $p_project_id = ALL_PROJECTS ) {
    $t_prefs = user_pref_get( $p_user_id, $p_project_id );

    // ensure the language is a valid one
    $t_lang = $t_prefs->language;
    if( !lang_language_exists( $t_lang ) ) {
            $t_lang = false;
    }
    return $t_lang;

    }

The problem is still happening when I switch to english, but in this case, I got a slightly different error message :
Fatal error: Maximum execution time of 40 seconds exceeded in /home/cpodm/public_html/help/core/bugnote_api.php on line 357

This seems to me that the timeout occured elswhere in the loop : but this time is it relevant to the issue :

    # build a list of the latest bugnotes that the user can see
    for( $i = 0; $i < $t_bugnote_count && $i < $t_bugnote_limit; ) {
            $t_bugnote = array_pop( $t_all_bugnotes );

            if( $t_private_bugnote_visible || $t_bugnote->reporter_id == $t_user_id || ( VS_PUBLIC == $t_bugnote->view_state ) ) {

                    # If the access level specified is not enough to see time tracking information
                    # then reset it to 0.
                    if( !$t_time_tracking_visible ) {
                            $t_bugnote->time_tracking = 0;
                    }

                    $t_bugnotes[$i++] = $t_bugnote;
            }
    }
dhx

dhx

2009-10-26 07:45

reporter   ~0023331

Thanks for the additional detail. The bug you encountered was indeed in the second dump of code you provided. After tracing it back, it appears Victor fixed this already as part of 0010655. This patch is included in the RC2 release.

I'll close this bug report as a duplicate of 0010655 (which has been completed/fixed).

If you can still reproduce this problem with RC2 please reopen this bug report.

Once again, thanks for reporting this problem :)

alainp

alainp

2009-10-26 07:53

reporter   ~0023333

Patched with the diff of 0010655 and it works perfectly now ! Thank you for so much efficiency !