Uploaded image for project: 'BlueJ'
  1. BlueJ
  2. BLUEJ-240

Compiler hang when calling nonexistent function from array

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Low
    • Resolution: Done
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.0.0
    • Component/s: Compiler

      Description

      The compiler seems to hang if a nonexistent function is called from an array of objects in a loop. I have included an example project. In this example, there is a class Foo which contains no methods. (though this will work with any object. I initially found this bug with the String class.) The Bar class contains a method test which accepts an array of Foo objects. The test function iterates through the array and prints the result of calling fooArray[i].nonExistantMethod()

      Instead of alerting the user that there is no such method nonExistantMethod(), the compiler hangs. Furthermore, the compiler will refuse to compile anything else, even after this line of bad code is removed, until BlueJ is restarted.

        Attachments

          Activity

            People

            • Assignee:
              davmac Davin McCall
              Reporter:
              external External via trac
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: