Mantis - Squeak
Viewing Issue Advanced Details
2380 Files minor always 12-18-05 21:05 12-18-05 22:38
Eddie Cottongim  
cdegroot  
normal  
assigned 3.9  
open  
none    
none  
0002380: [BUG] [in 6905] Can't open Read Only MIDIs from File List
I wasn't sure about the category for this one...

Opening read-only midis fails from the file list, apparently because StandardFileStream oldFileNamed: returns nil. This in turns seems to be because oldFileNamed: tries to assert write access to the file.

The file list is using the ScorePlayerMorph>>playMidiFile: class method. This alternative snippet does work to open a midi score:
(ScorePlayerMorph onMIDIFileNamed: 'C:\explode\cd archive June 11 1999\media\midi\ilr6.mid') openInWorld

I'm not sure where the fault lies here.
UndefinedObject(Object)>>doesNotUnderstand: #binary
[] in ScorePlayerMorph class>>playMidiFile: {[:midiReader | f := (FileStream oldFileNamed: fullName) binary. score := (...]}
SystemDictionary(Dictionary)>>at:ifPresent:
ScorePlayerMorph class>>playMidiFile:
SimpleServiceEntry>>performServiceFor:
[] in MenuItemMorph>>invokeWithEvent: {[(selArgCount := selector numArgs) = 0 ifTrue: [target perform: selector] ...]}
BlockContext>>ensure:
CursorWithMask(Cursor)>>showWhile:
MenuItemMorph>>invokeWithEvent:
MenuItemMorph>>mouseUp:
MenuItemMorph>>handleMouseUp:
MouseButtonEvent>>sentTo:
MenuItemMorph(Morph)>>handleEvent:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>dispatchEvent:with:
MenuItemMorph(Morph)>>processEvent:using:
MorphicEventDispatcher>>dispatch:toSubmorphsOf:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>dispatchEvent:with:
MenuMorph(Morph)>>processEvent:using:


Notes
(0003343)
Eddie Cottongim   
12-18-05 22:38   
A similar problem occurs if you load a file more than once and the file handle hasn't been released. There is probably a problem trying to assert write access twice.

BTW, this is on Win2K.