Anonymous | Login | 01-24-2021 22:49 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | |||||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
0001082 | [Squeak] Any | minor | always | 04-19-05 15:24 | 12-22-05 14:51 | |||||||
Reporter | aplantec | View Status | public | |||||||||
Assigned To | ||||||||||||
Priority | normal | Resolution | open | |||||||||
Status | new | Product Version | 3.8 | |||||||||
Summary | 0001082: Date class >> year: year month: month day: day fails when month is 0 | |||||||||||
Description | It occurs when creating new archive from ArchiveViewer | |||||||||||
Additional Information |
19 April 2005 2:21:08 pm VM: unix - a SmalltalkImage Image: Squeak3.8gamma [latest update: 0006662] SecurityManager state: Restricted: false FileAccess: true SocketAccess: true Working Dir /home/plantec/dvpt/squeak-test/3.8 Trusted Dir /home/plantec/dvpt/squeak-test/3.8/secure Untrusted Dir /home/plantec/dvpt/squeak-test/3.8/My Squeak Array(Object)>>error: Receiver: #(31 28 31 30 31 30 31 31 30 31 30 31) Arguments and temporary variables: aString: 'subscript is out of bounds: 0' Receiver's instance variables: #(31 28 31 30 31 30 31 31 30 31 30 31) Array(Object)>>errorSubscriptBounds: Receiver: #(31 28 31 30 31 30 31 31 30 31 30 31) Arguments and temporary variables: index: 0 Receiver's instance variables: #(31 28 31 30 31 30 31 31 30 31 30 31) Array(Object)>>at: Receiver: #(31 28 31 30 31 30 31 31 30 31 30 31) Arguments and temporary variables: index: 0 Receiver's instance variables: #(31 28 31 30 31 30 31 31 30 31 30 31) Month class>>daysInMonth:forYear: Receiver: Month Arguments and temporary variables: indexOrName: 0 yearInteger: 1911 index: 0 Receiver's instance variables: superclass: Timespan methodDict: a MethodDictionary(#asMonth->a CompiledMethod (863) #daysInMonth->a...etc... format: 134 instanceVariables: nil organization: ('squeak protocol' asMonth daysInMonth index name previous printO...etc... subclasses: nil name: #Month classPool: nil sharedPools: an OrderedCollection(ChronologyConstants) environment: a SystemDictionary(lots of globals) category: nil --- The full stack --- Array(Object)>>error: Array(Object)>>errorSubscriptBounds: Array(Object)>>at: Month class>>daysInMonth:forYear: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - DateAndTime class>>year:month:day:hour:minute:second:nanoSecond:offset: DateAndTime class>>year:month:day:hour:minute:second:offset: DateAndTime class>>year:month:day:hour:minute:second: DateAndTime class>>year:month:day:hour:minute: DateAndTime class>>year:month:day: Date class>>year:month:day: Date class>>newDay:month:year: ZipDirectoryMember(ZipArchiveMember)>>dosToUnixTime: ZipDirectoryMember(ZipArchiveMember)>>lastModTime ArchiveViewer>>displayLineFor: [] in ArchiveViewer>>memberList {[:ea | self displayLineFor: ea]} OrderedCollection>>collect: ArchiveViewer>>memberList PluggableListMorph>>getList PluggableListMorph>>getListSize PluggableListMorph>>selectionIndex: PluggableListMorph>>update: [] in ArchiveViewer(Object)>>changed: {[:aDependent | aDependent update: aParameter]} DependentsArray>>do: ArchiveViewer(Object)>>changed: ArchiveViewer>>memberIndex: ArchiveViewer>>addDirectory PluggableButtonMorph>>performAction [] in PluggableButtonMorph>>mouseUp: {[:m | (m containsPoint: evt cursorPoint) ifTrue: [m performAction]]} Array(SequenceableCollection)>>do: PluggableButtonMorph>>mouseUp: PluggableButtonMorph(Morph)>>handleMouseUp: MouseButtonEvent>>sentTo: PluggableButtonMorph(Morph)>>handleEvent: PluggableButtonMorph(Morph)>>handleFocusEvent: [] in HandMorph>>sendFocusEvent:to:clear: {[ActiveHand := self. ActiveEvent := anEvent. result := focusHolder han...]} [] in PasteUpMorph>>becomeActiveDuring: {[aBlock value]} BlockContext>>on:do: PasteUpMorph>>becomeActiveDuring: HandMorph>>sendFocusEvent:to:clear: HandMorph>>sendEvent:focus:clear: HandMorph>>sendMouseEvent: HandMorph>>handleEvent: HandMorph>>processEvents [] in WorldState>>doOneCycleNowFor: {[:h | ActiveHand := h. h processEvents. capturingGesture := capturingGest...]} Array(SequenceableCollection)>>do: WorldState>>handsDo: WorldState>>doOneCycleNowFor: WorldState>>doOneCycleFor: PasteUpMorph>>doOneCycle [] in Project class>>spawnNewProcess {[[World doOneCycle. Processor yield. false] whileFalse. nil]} [] in BlockContext>>newProcess {[self value. Processor terminateActive]} |
|||||||||||
Attached Files |
![]() |
|||||||||||
|
![]() |
|
(0003366 - 340 - 360 - 360 - 360 - 360 - 360) FrankShearar 12-20-05 11:06 |
In both 3.8-6665 and 3.9-6706 I opened a FileList2. I clicked on a zip file, hit the "open zip" button and opened an ArchiveViewer. I clicked the "New Archive" button and got a new archive. I don't see the bug. What were you doing when you opened the new archive? (Or, what are you and I doing differently that you see the bug and I don't?) |
(0003375 - 1683 - 2151 - 2151 - 2251 - 2251 - 2251) aplantec 12-22-05 13:40 |
I've re tested with Squeak3.9alpha. From a workspace : ArchiveViewer open then "New Archive" then "Add File" or "Add Directory" and voila. alain ------- 21 December 2005 7:21:51 pm VM: unix - a SmalltalkImage Image: Squeak3.9alpha [latest update: 0006704] SecurityManager state: Restricted: false FileAccess: true SocketAccess: true Working Dir /home/plantec/dvpt/squeak-test/Squeak3.9a-6704 Trusted Dir /home/plantec/dvpt/squeak-test/Squeak3.9a-6704/secure Untrusted Dir /home/plantec/dvpt/squeak-test/Squeak3.9a-6704/untrusted ..... -- The full stack --- Array(Object)>>error: Array(Object)>>errorSubscriptBounds: Array(Object)>>at: Month class>>daysInMonth:forYear: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - DateAndTime class>>year:month:day:hour:minute:second:nanoSecond:offset: DateAndTime class>>year:month:day:hour:minute:second:offset: DateAndTime class>>year:month:day:hour:minute:second: DateAndTime class>>year:month:day:hour:minute: DateAndTime class>>year:month:day: Date class>>year:month:day: Date class>>newDay:month:year: ZipDirectoryMember(ZipArchiveMember)>>dosToUnixTime: ZipDirectoryMember(ZipArchiveMember)>>lastModTime ArchiveViewer>>displayLineFor: [] in ArchiveViewer>>memberList {[:ea | self displayLineFor: ea]} OrderedCollection>>collect: ArchiveViewer>>memberList PluggableListMorph>>getList PluggableListMorph>>getListSize PluggableListMorph>>selectionIndex: PluggableListMorph>>update: [] in ArchiveViewer(Object)>>changed: {[:aDependent | aDependent update: aParameter]} DependentsArray>>do: ArchiveViewer(Object)>>changed: ArchiveViewer>>memberIndex: ArchiveViewer>>addDirectory |
(0003376 - 1099 - 1261 - 1261 - 1261 - 1261 - 1261) pmm 12-22-05 14:51 |
Some trace analysis: the problem is the eventually the following message is send Month daysInMonth: 0 forYear: 1911 The problem is the first argument which is zero which is and invalid value. How do we end up there? It starts in: ZipArchiveMember>>#lastModTime which sends ZipArchiveMember>>#dosToUnixTime: which does some masking and shifting and then sends Date class>>#newDay:month:year: which ends up in DateAndTime class>>#year:month:day:hour:minute:second:nanoSecond:offset: the month argument here must already be zero when passed because Month class >> #indexOfMonth:, it was never modified in the whole call hierarchy so the mon temp ZipArchiveMember>>#dosToUnixTime: in must have already been zero. To sum up, yes Date class >> year: year month: month day: day fails when month is 0 but that's ok, because 0 is just not a valid value for the month argument. Indices in Smalltalk are one-based. To me it looks more like a bug in ZipArchiveMember>> dosToUnixTime:. I can not yet reproduce it, but I suggest testing with Zip Files that where last modified in January. |
Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
47 total queries executed. 34 unique queries executed. |