Search code examples
smalltalkpharo

Pointer Detective - Inspecting an Object (instance) and Doing a "PointerDetective openOn: self." leads to a System Error in Pharo?


Pointer Detective - Inspecting an Object (instance) and Doing a "PointerDetective openOn: self." leads to a System Error in Pharo?

The object is a WhateverRoot instance (subclass of WAComponent) that has "canBeRoot ^true."

Am I doing something wrong?

PS. My "eagle eye" caught a typo on line 9 of the error. "'Orginal error:' ,title asString.". Maybe, just maybe...

System Error screen capture


Solution

  • Pharo 3: Managed to zero in closer to the issue. It seems the problem only happens with the latest commit (10) of PointerDetective. The one before that (9) works as advertised. This "weak self" error only happens on the latest commit.

    Squeak 4.5 and Pharo 4 (bleeding edge): Also tried the latest commit (10) on Squeak 4.5 All In One and on the latest Build of Pharo 4 and they both pop up a Debugger instead of the White Crash.

    Easy to replicate, even the example on the smalltalkhub page crashes it.

    Steps to replicate:

    1. Get Pharo 3

    2. Open Monticello

    3. Add repository.

    4. Open repository.

    5. Choose latest commit (10)

    6. Load

    7. Open Workspace

    Paste in example and Do It -> White screen press esc to remove.

    testObject := 'END5'.
    ref1 := { testObject. nil }.
    ref2 := { ref1 }.
    ref3 := PDTestResource new heldObject: ref2. 
    ref1 at: 2 put: ref3.  "note the reference loop this creates"
    PointerDetective openOn: testObject.