FogBugz (Case [Issue]20074) Nautilus - Red-pane-of-death when sources file missing

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

FogBugz (Case [Issue]20074) Nautilus - Red-pane-of-death when sources file missing

Pharo Issue Tracker
FogBugz Notification
avatar
Ben Coman opened Case 20074: Red-pane-of-death when sources file missing and assigned it to Everyone:
Bug in Project:  Nautilus: 1. Pharo Image  •  You are subscribed to this case
Get a red-pane-of-death within 30 seconds of opening image 60494 started from PharoLauncher. 
@Henrik,  You seem to have worked in the area. Could you please review incoming slice.

After starting image, opened Nautilus System Browser and clicked package AST-Core.
Got a red-death class pane.  Debugger says "#readOnlyCopy was sent to nil" in... 
  SourceFileArray>>createReadOnlyFiles
      | readOnly failed |
      failed := false.
      readOnly := files collect: [ :file | 
         [ file readOnlyCopy ]                 "<<<HERE"
           on: FileDoesNotExistException
           do: [ failed := true. nil ]
      ^ failed ifFalse: [ readOnly ] ifTrue: [ self closeFileArray: readOnly. nil ]

This was due to missing PharoV60.sources, since nil "file" is not guarded against, while...
  SourceFileArray>>ensureOpen
      files := Array
         with: PharoFilesOpener default sourcesFileOrNil
         with: PharoFilesOpener default changesFileOrNil.

explicitly indicates "files" can hold nil.

To be more robust to a missing sources file, modifying createReadOnlyFiles thus seems to work...
      readOnly := files collect: [ :file | file 
            ifNil: [  failed := true. nil ]
            ifNotNil: [ [ file readOnlyCopy ]
               on: FileDoesNotExistException
               do: [ failed := true. nil ] ].
Priority Priority: 5 – Fix If Time Status Status: Work Needed
Assigned To Assigned to: Everyone Milestone Milestone: Pharo6.0

Go to Case
No longer need updates? Unsubscribe from this case.

Don't want FogBugz notifications anymore? Update your preferences.

FogBugz

_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
https://lists.gforge.inria.fr/mailman/listinfo/pharo-bugtracker