Status: New
Owner: ---- Labels: Type-Defect Priority-Medium New issue 903 by [hidden email]: ROEdge without ROLine locks the image http://code.google.com/p/moose-technology/issues/detail?id=903 I have isolated the problem with the image locking up when ROEdge is used without ROLine. I noticed that problem occurred also when using ROAbstractLine instead of ROLine. So hacking breakpoints & logging into the four methods of ROLine lead me to these being called on from ROEdge on instance variable 'shape'. Looking at references of 'shape', I notice that ROEdge adds three methods that RONullShape does not have. So the image can be prevented from locking up with the following ugly hack... ROEdge>>contains: aPoint (shape isKindOf: RONullShape) ifTrue: [ ^false]. ^ shape contains: aPoint for: self ROEdge>>topLeft (shape isKindOf: RONullShape) ifTrue: [ ^ 0@0 ]. ^ (shape lineSegmentsFor: self) first I'll leave it there for Alexandre to come up with a more appropriate fix. cheers -ben Ben Coman wrote: > I can reproduce this on Windows 7 in Moose-4.7-beta from 2012-01-03 > (ConfigurationOfRoassal.A...B...752) > With the ROLine commented as shown below the image locks. Alt-. fails to > interrupt. > With the ROLine uncommented it works fine. > Forgetting ROLine is likely a common occurance for people new to Roassal, > so > this makes it a bit fragile. > --- > | view node1 node2 edge | > view := ROView new. > node1 := ROLabel elementOn: 'node1'. > node2 := ROLabel elementOn: 'node2'. > edge := (ROEdge from: node1 to: node2) "+ ROLine" . > view add: node1; add: node2; add: edge. > view open > --- > cheers -ben > Alexandre Bergel wrote: > > Hi Yuriy! > > > > I guess you meant "view add: edge; add: node1; add: node2." instead of > using "rawView". > > The script does not freeze the VM I use (Croquet Cog 4.0.2636 and the > one contained in the Pharo 1.4 one click). > > In fact, having an edge without line is perfectly okay. No error is > raised and none should be raised. The line is simply invisible. Strange > that you got this error. > > > > Anyone can reproduce this error? > > > > Cheers, > > Alexandre > > > > > > On Jan 25, 2013, at 10:37 AM, Yuriy Tymchuk <[hidden email]> > wrote: > > > > > >> Hi. > >> > >> When edges are initialized without lines, VM freezes. > >> > >> For instance when I run next code: > >> > >> | view node1 node2 edge | > >> view := ROView new. > >> node1 := ROLabel elementOn: 'node1'. > >> node2 := ROLabel elementOn: 'node2'. > >> node1 @ RODraggable. > >> node2 @ RODraggable. > >> edge := ROEdge from: node1 to: node2. > >> rawView add: edge; add: node1; add: node2. > >> ROHorizontalLineLayout on: (Array with: node1 with: node2). > >> view open > >> > >> > >> I know that you should do something like > >> > >> edge + (ROLine red). > >> > >> But Roasal shouldnt freeze the VM anyway :) > >> > >> > >> > >> -- > >> View this message in context: > http://moose-dev.97923.n3.nabble.com/Roasal-freezing-VM-tp4025992.html > >> Sent from the moose-dev mailing list archive at Nabble.com. > >> _______________________________________________ > >> Moose-dev mailing list > >> [hidden email] > >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > >> > > > > _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Comment #1 on issue 903 by [hidden email]: ROEdge without ROLine locks the image http://code.google.com/p/moose-technology/issues/detail?id=903 This is really strange. I do not have a window to try this out, but on OSX, with the last version of Roassal, the following code does not raise an exception. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view node1 node2 edge | view := ROView new. node1 := ROLabel elementOn: 'node1'. node2 := ROLabel elementOn: 'node2'. edge := (ROEdge from: node1 to: node2) "+ ROLine" . view add: node1; add: node2; add: edge. view bitmap -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= It should have raised an exception if an error would occur. Anyway, I see the problem with topLeft. The check in ROEdge>>contains: aPoint does not seem that necessary, since RONullShape return false to #contains: I guess the problem should go away with the new version, but since I cannot reproduce the problem. Ben, can you confirm the problem has disappeared and fix this issue? _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Comment #2 on issue 903 by [hidden email]: ROEdge without ROLine locks the image http://code.google.com/p/moose-technology/issues/detail?id=903 That has fixed it. However prior to your fix, your example ending in 'view bitmap' didn't raise an exception (or lock my image). Actually if I highlighted my example in Workspace but before executing it with Alt-d I moved my mouse to the far side of the screen, then Roassal opened without a problem. Only when I moved the focus into the Roassal window did the image lock. Perhaps the lack of your image locking is a difference in event processing between OSX/Windows. That would be nice to identify but out for scope for this issue. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Updates:
Status: Fixed Labels: Component-Roassal Milestone-4.7 Comment #3 on issue 903 by [hidden email]: ROEdge without ROLine locks the image http://code.google.com/p/moose-technology/issues/detail?id=903 (No comment was entered for this change.) _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Comment #4 on issue 903 by [hidden email]: ROEdge without ROLine locks the image http://code.google.com/p/moose-technology/issues/detail?id=903 Excellent feedback Ben! Yes, probably this is due to some difference between osx and windows _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Free forum by Nabble | Edit this page |