Hi John. This issue is solved in latest image 19892 <https://pharo.fogbugz.com/f/cases/19892/Socket-problem-with-LatestVM>. But it only fixes primitive fallback code. General problem is still in latest VM 19893 <https://pharo.fogbugz.com/f/cases/19893/primitiveFindSubstring-primitive-is-...> 2017-04-04 15:18 GMT+02:00 John Brant <brant@refactoryworkers.com>:
I can't use a ftp Monticello repository using:
Pharo6.0 Latest update: #60315 pharo-linux-x86_64threaded-201704041239-b3f27b3
It appears that the primitive for findSubstringViaPrimitive:in:startingAt:matchTable: has changed so that this method now throws an error instead of returning 0. The ftp code eventually evaluates something similar to this:
| eol | eol := String with: Character cr with: Character lf. eol findSubstringViaPrimitive: eol in: (String new: 4096) startingAt: 0 matchTable: (String classPool at: #CaseSensitiveOrder)
This returns 0 with an older vm, but throws an error in a new vm. Of course, it may make sense for it to throw an error since 0 is an invalid start index. If that is the case, then SocketStream should be changed so that it doesn't call indexOfSubCollection:startingAt: with a 0:
SocketStream>>upToAll: aStringOrByteArray limit: nBytes "..."
| index sz result searchedSoFar | sz := aStringOrByteArray size. "Look in the current inBuffer first" index := inBuffer indexOfSubCollection: aStringOrByteArray startingAt: (lastRead - sz + 2 max: 1).
Adding the "max: 1" allows me to connect to the ftp repository.
John Brant