Moodle
  1. Moodle
  2. MDL-33736

Occasional "PHP catchable fatal error" when using Browse list of users

    Details

    • Database:
      Microsoft SQL
    • Affected Branches:
      MOODLE_20_STABLE
    • Rank:
      41768

      Description

      I've received some complains from some users on my production Moodle site (2.0.4+ (Build: 20110907)) saying that they are occasionally getting a "Coding error detected, it must be fixed by a programmer: PHP catchable fatal error" message when they use filters on the 'Browse list of users' page in Moodle:

      Debug info: Argument 1 passed to textlib::asort() must be an array, null given, called in C:\Moodle\lib\moodlelib.php on line 5980 and defined
      Stack trace: 
      line 359 of \lib\setuplib.php: coding_exception thrown
      line 475 of \lib\textlib.class.php: call to default_error_handler()
      line 5980 of \lib\moodlelib.php: call to textlib->asort()
      line 109 of \user\filters\lib.php: call to core_string_manager->get_list_of_countries()
      line 44 of \user\filters\lib.php: call to user_filtering->get_field()
      line 116 of \admin\user.php: call to user_filtering->user_filtering()
      

      The interesting thing is that it's completely random - it only happens occasionally. Most of the time users can use the 'Browse list of users' function without problems. I'm unable to easily reproduce the error easily - but it does appear that it gets triggered when users are using the advanced filters on that 'Browse list of users' page.

      And it seems to sort itself out! After a few minutes users are again able to use that 'Browse list of users' function again.

      My production environment is made up of:
      Windows Server 2003 Standard Edition SP2
      Intel Xeon CPU 5160 @ 3.00GHz 2.00GB RAM
      Internet Information Services 6
      Microsoft SQL Server 2005 - 9.00.4035.00 (X64) Enterprise Edition (64-bit) on a SQL cluster running Windows NT 5.2 (Build 3790: Service Pack 2)
      PHP 5.3.3 NTS VC9
      PHP date.timezone = "Africa/Johannesburg"
      Microsoft SQL Server Driver for PHP 2.0.1802.200
      Microsoft FastCGI Handler x86 6.1.36.1
      Microsoft Windows Cache Extension for PHP 1.1.630.0
      No NON-CORE Moodle modules installed

      Moodle config:
      $CFG->dbtype = 'sqlsrv';
      $CFG->dblibrary = 'native';

        Activity

        Hide
        Michael de Raadt added a comment -

        Thanks for reporting that.

        A quick look at the area of code where the bug is reported seems to be getting a list of countries. It might be worth playing around with the current language to see if this has an effect. Without a set of replication steps, it's hard to fix such issues; not impossible, but hard.

        Show
        Michael de Raadt added a comment - Thanks for reporting that. A quick look at the area of code where the bug is reported seems to be getting a list of countries. It might be worth playing around with the current language to see if this has an effect. Without a set of replication steps, it's hard to fix such issues; not impossible, but hard.
        Hide
        Michael de Raadt added a comment -

        It might also be worth considering upgrading.

        I noted that there has been a code change in this area since 2.0.x. If we are going to work on this now, it would need to be a problem with a supported version (at this stage: 2.1, 2.2 and 2.3).

        Show
        Michael de Raadt added a comment - It might also be worth considering upgrading. I noted that there has been a code change in this area since 2.0.x. If we are going to work on this now, it would need to be a problem with a supported version (at this stage: 2.1, 2.2 and 2.3).
        Hide
        Luis de Vasconcelos added a comment -

        Thanks.

        Yes, replication is a bit difficult at the moment since it happens randomly - presumably when our teachers/admins are using filters to browse the list of users.

        I only have one language pack installed, the default 'English (en)'.
        The "Default language" list on the 'Site administration / Language / Language settings' only contains one option: 'English (en)'.

        'Language autodetect' is not selected.
        'Display language menu' is not selected.
        'Languages on language menu' is blank.
        'Cache language menu' is selected.
        'Cache all language strings' is selected.

        We have customised some of the language strings (approx 7 of them).

        An upgrade is on the cards, but the upgrade from 2.0.4+ to 2.1 is crashing during the question bank / quiz attempts conversion, so there are issues to resolve there first...

        If/when the "catchable" crash happpens again I'll play around with the 'Cache language menu' and 'Cache all language strings' options to see if they have any effect.

        Show
        Luis de Vasconcelos added a comment - Thanks. Yes, replication is a bit difficult at the moment since it happens randomly - presumably when our teachers/admins are using filters to browse the list of users. I only have one language pack installed, the default 'English (en)'. The "Default language" list on the 'Site administration / Language / Language settings' only contains one option: 'English (en)'. 'Language autodetect' is not selected. 'Display language menu' is not selected. 'Languages on language menu' is blank. 'Cache language menu' is selected. 'Cache all language strings' is selected. We have customised some of the language strings (approx 7 of them). An upgrade is on the cards, but the upgrade from 2.0.4+ to 2.1 is crashing during the question bank / quiz attempts conversion, so there are issues to resolve there first... If/when the "catchable" crash happpens again I'll play around with the 'Cache language menu' and 'Cache all language strings' options to see if they have any effect.
        Hide
        Rajesh Taneja added a comment -

        Hello. I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue.

        For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment

        If you have any information about this issue or a possible fix please post it here

        Show
        Rajesh Taneja added a comment - Hello. I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue. For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment If you have any information about this issue or a possible fix please post it here

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: