Re: [Pharo-users] Crash or locked VM

2016-01-09 Thread Hilaire
With the fix I explored a bit further the construction tree with the
Athletic tree
https://www.facebook.com/DrGeoLibre/videos/895237543929818/ ;)


Le 09/01/2016 10:30, Hilaire a écrit :
> Le 09/01/2016 00:30, Nicolai Hess a écrit :
>> Hi Hilaire,
>>
>> I think this is the same bug as
>> https://pharo.fogbugz.com/f/cases/13854/frameSize-calculated-wrongly-for-lineSegmentsDo
>>
>> this is fixed in pharo4.0 and pharo5.0 but not in pharo3.0
>> I modified the changeset for pharo4.0 to make it loadable in pharo3.0
>> But I did not looked further on the code changes, maybe it won't fully
>> work.
>> Find attached the changeset. You have to switch compiler class before
>> and after loading this.
>>
>> SmalltalkImage compilerClass: Compiler.
>> 'opal_drgeo.cs' asFileReference fileIn.
>> SmalltalkImage compilerClass: OpalCompiler.
>>
>>
> It works!
> Ouf! Reading at the issue , that's quite an important one. Thanks for
> the retro-fix for Pharo3. It is important for people still in mark3 not
> yet migrated to subsequent release
>
> Hilaire
>
>

-- 
Dr. Geo
http://drgeo.eu





Re: [Pharo-users] Crash or locked VM

2016-01-09 Thread Hilaire
Le 09/01/2016 00:30, Nicolai Hess a écrit :
> Hi Hilaire,
>
> I think this is the same bug as
> https://pharo.fogbugz.com/f/cases/13854/frameSize-calculated-wrongly-for-lineSegmentsDo
>
> this is fixed in pharo4.0 and pharo5.0 but not in pharo3.0
> I modified the changeset for pharo4.0 to make it loadable in pharo3.0
> But I did not looked further on the code changes, maybe it won't fully
> work.
> Find attached the changeset. You have to switch compiler class before
> and after loading this.
>
> SmalltalkImage compilerClass: Compiler.
> 'opal_drgeo.cs' asFileReference fileIn.
> SmalltalkImage compilerClass: OpalCompiler.
>
>

It works!
Ouf! Reading at the issue , that's quite an important one. Thanks for
the retro-fix for Pharo3. It is important for people still in mark3 not
yet migrated to subsequent release

Hilaire


-- 
Dr. Geo
http://drgeo.eu





Re: [Pharo-users] Crash or locked VM

2016-01-08 Thread Nicolai Hess
2016-01-08 23:20 GMT+01:00 Hilaire :

> Le 08/01/2016 21:31, Nicolai Hess a écrit :
> >
> >
> > The crashing image itself can be found there in case of
> usefulness
> > https://www.dropbox.com/s/rur8ayt8eon6mab/drgeo.image.zip?dl=0
> >
> >
> > Do you have the changes file, too?
>
> Here: https://www.dropbox.com/s/dwg99xmvtgak10o/DrGeoCrashVM.zip?dl=0
>
> Thanks
>
>
Hi Hilaire,

I think this is the same bug as
https://pharo.fogbugz.com/f/cases/13854/frameSize-calculated-wrongly-for-lineSegmentsDo

this is fixed in pharo4.0 and pharo5.0 but not in pharo3.0
I modified the changeset for pharo4.0 to make it loadable in pharo3.0
But I did not looked further on the code changes, maybe it won't fully work.
Find attached the changeset. You have to switch compiler class before and
after loading this.

SmalltalkImage compilerClass: Compiler.
'opal_drgeo.cs' asFileReference fileIn.
SmalltalkImage compilerClass: OpalCompiler.




> --
> Dr. Geo
> http://drgeo.eu
>
>
>
>
'From Pharo3.0 of 18 March 2013 [Latest update: #30864] on 9 January 2016 at 12:23:34.657922 am'!
IRStackCount subclass: #IRClosureStackCount
	instanceVariableNames: 'numMethodTempVars'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'OpalCompiler-Core-Bytecode'!

!IRClosureStackCount commentStamp: '' prior: 0!
IRClosureStackCount is used to distinguish between a stack 
in the method scope and a stack within a closure block. The
closure stack size is independent of the number of tempvars from the compiled method, therefore that number is subtracted
from this stack size length.!


!IRBytecodeGenerator methodsFor: 'instructions' stamp: 'DrGeoUser 1/9/2016 00:03'!
pushClosureCopyNumCopiedValues: numCopied numArgs: numArgs2 to: toSeqId
	
	| blockSeqId |
	blockSeqId := self newDummySeqId.
	stack pop: numCopied. 
	stacks at: blockSeqId put: ((IRClosureStackCount new numMethodTempVars:(numberOfTemps)) startAt: (numArgs2+numCopied)).
	stack push.
	stacks at: toSeqId put: (stack linkTo: (stacks at: toSeqId ifAbsentPut: [nil])).
	self saveLastJump: (Message
		selector: #closureFrom:to:copyNumCopiedValues:numArgs:
		arguments: {currentSeqId.toSeqId. numCopied. numArgs2.}).

	self closureFrom: currentSeqId to: toSeqId copyNumCopiedValues: numCopied numArgs: numArgs2.
	self label: blockSeqId.
! !

!IRBytecodeGenerator methodsFor: 'instructions' stamp: 'DrGeoUser 1/9/2016 00:03'!
label: seqId
	lastSpecialReturn := nil.
	currentSeqId := seqId.
	currentSeqNum := currentSeqNum + 1.
	seqOrder at: seqId put: currentSeqNum.
	orderSeq at: currentSeqNum ifAbsentPut: [seqId].
	bytes := seqBytes at: seqId ifAbsentPut: [OrderedCollection new].
	jumps at: seqId ifAbsentPut: [nil].
	instrMap := instrMaps at: seqId ifAbsentPut: [OrderedCollection new].
	stack
		ifNil: [ stack := stacks at: currentSeqId ifAbsentPut: [ IRStackCount new ] ]
		ifNotNil: [stack := stacks at: currentSeqId ifAbsentPut: [ stack class newOn:stack ] ]! !


!IRStackCount methodsFor: 'results' stamp: 'NicolaiHess 11/8/2014 23:51'!
linkTo: stackOrNil

	stackOrNil ifNil: [^ self class newOn: self].
	^ self position = stackOrNil start
		ifTrue: [stackOrNil]
		ifFalse: [self error: 'stack out of sync in bytecode generator']! !


!IRClosureStackCount methodsFor: 'accessing' stamp: 'NicolaiHess 11/8/2014 23:47'!
numMethodTempVars
	^ numMethodTempVars! !

!IRClosureStackCount methodsFor: 'accessing' stamp: 'NicolaiHess 11/9/2014 00:05'!
numMethodTempVars: nilOrNumber
	numMethodTempVars := nilOrNumber ifNil:[0]! !

!IRClosureStackCount methodsFor: 'accessing' stamp: 'NicolaiHess 11/8/2014 23:47'!
length

	^ super length - self numMethodTempVars! !

!IRClosureStackCount methodsFor: 'initialize' stamp: 'NicolaiHess 11/8/2014 23:47'!
initialize

	super initialize.

	numMethodTempVars := 0.! !


!IRStackCount class methodsFor: 'instance creation' stamp: 'NicolaiHess 11/8/2014 23:50'!
newOn: stack

	^ self startAt: stack position! !


!IRClosureStackCount class methodsFor: 'instance creation' stamp: 'NicolaiHess 11/8/2014 23:54'!
newOn: stack
	^ (self startAt: stack position)
		numMethodTempVars: stack numMethodTempVars;
		yourself! !



Re: [Pharo-users] Crash or locked VM

2016-01-08 Thread Hilaire
Le 08/01/2016 21:31, Nicolai Hess a écrit :
>
>
> The crashing image itself can be found there in case of usefulness
> https://www.dropbox.com/s/rur8ayt8eon6mab/drgeo.image.zip?dl=0
>
>
> Do you have the changes file, too?

Here: https://www.dropbox.com/s/dwg99xmvtgak10o/DrGeoCrashVM.zip?dl=0

Thanks

-- 
Dr. Geo
http://drgeo.eu





Re: [Pharo-users] Crash or locked VM

2016-01-08 Thread Nicolai Hess
2016-01-08 21:01 GMT+01:00 stepharo :

> thanks hilaire.
>
> Stef
>
> Le 5/1/16 22:11, Hilaire a écrit :
>
> Hi,
>>
>> I have a situation with a recursive Dr. Geo script where the image crash
>> or get locked (Can't hold on the image).
>> I tried with latest VM as detailed in the joined crash dump.
>>
>> I did not get similar problem with other recursive script. So I may have
>> very special interaction between the objects, but I did not find out.
>>
>> It may also be related to Morph because when instantiating first the
>> canvas and its window (2nd line of the script), then the rest of the
>> script, it does not crash.
>>
>> The crashing image itself can be found there in case of usefulness
>> https://www.dropbox.com/s/rur8ayt8eon6mab/drgeo.image.zip?dl=0
>
>
Do you have the changes file, too?



>
>>
>> When not crashing it outputs this cherry tree.
>>
>> Thanks
>>
>> Hilaire
>>
>>
>
>


Re: [Pharo-users] Crash or locked VM

2016-01-08 Thread stepharo

thanks hilaire.

Stef

Le 5/1/16 22:11, Hilaire a écrit :

Hi,

I have a situation with a recursive Dr. Geo script where the image crash
or get locked (Can't hold on the image).
I tried with latest VM as detailed in the joined crash dump.

I did not get similar problem with other recursive script. So I may have
very special interaction between the objects, but I did not find out.

It may also be related to Morph because when instantiating first the
canvas and its window (2nd line of the script), then the rest of the
script, it does not crash.

The crashing image itself can be found there in case of usefulness
https://www.dropbox.com/s/rur8ayt8eon6mab/drgeo.image.zip?dl=0

When not crashing it outputs this cherry tree.

Thanks

Hilaire






Re: [Pharo-users] Crash or locked VM

2016-01-07 Thread Hilaire
What is really strange in the VM crash, is I can't even step in the
recursive block. When stepping in the tree call (last line of the script
bellow), the VM crash.


| canvas tree angl angr fac|
canvas := DrGeoCanvas new fullscreen.
fac := (canvas freeValue: 2/3) hide.
angl := (canvas freeValue: 2.8) hide.
angr := (canvas freeValue: -2.8) hide.

tree := [ ].
tree := [ :a :b :k | | ab  m v bm lbc rbc lb rb mb |
"construction of the tree"
ab := canvas segment: a to: b.
m := (canvas middleOf: ab) hide.
v := (canvas vector: b to: m) hide.
bm := (canvas scale:  ab center: b factor: fac) hide.
lbc := canvas rotate: bm center: b angle: angr.
rbc := canvas rotate: bm center:  b angle: angl.
canvas translate:  lbc vector: v.
lb := (canvas rotate: m center: b angle: angr) .
rb := (canvas rotate: m center: b angle: angl) .
mb := (canvas translate: rb vector: v) .
k > 0 ifTrue: [
tree value: m value: mb value: k - 1.
tree value: b value: lb value: k - 1.
tree value: b value: rb value: k - 1]].
tree value:  0@0 value: 0@6 value: 5



Crash dump:
last object overwritten

/home/hilaire/Travaux/Developpement/DrGeoII/trunk/build/tmp/DrGeo.appCrash/Contents/Linux/pharo
pharo VM version: 3.9-7 #1 Sat Jun 14 17:26:13 CEST 2014 gcc 4.6.3
[Production ITHB VM]
Built from: NBCoInterpreter NativeBoost-CogPlugin-EstebanLorenzano.20
uuid: cf2a-897d-48fd-8251-6789dd21d958 Jun 14 2014
With: NBCogit NativeBoost-CogPlugin-EstebanLorenzano.20 uuid:
cf2a-897d-48fd-8251-6789dd21d958 Jun 14 2014
Revision: https://github.com/pharo-project/pharo-vm.git Commit:
0e8bbfbaeb03237fa6bb63ba834773fab18ca307 Date: 2014-06-14 12:20:21 -0300
By: Esteban Lorenzano  Jenkins build #14833
Build host: Linux pharo-linux 3.2.0-31-generic-pae #50-Ubuntu SMP Fri
Sep 7 16:39:45 UTC 2012 i686 i686 i386 GNU/Linux
plugin path:
/home/hilaire/Travaux/Developpement/DrGeoII/trunk/build/tmp/DrGeo.appCrash/Contents/Linux
[default:
/home/hilaire/Travaux/Developpement/DrGeoII/trunk/build/tmp/DrGeo.appCrash/Contents/Linux/]


C stack backtrace & registers:
*/home/hilaire/Travaux/Developpement/DrGeoII/trunk/build/tmp/DrGeo.appCrash/Contents/Linux/pharo[0x809fc8c]
/home/hilaire/Travaux/Developpement/DrGeoII/trunk/build/tmp/DrGeo.appCrash/Contents/Linux/pharo(error+0x17)[0x809fe97]
/home/hilaire/Travaux/Developpement/DrGeoII/trunk/build/tmp/DrGeo.appCrash/Contents/Linux/pharo[0x8074a98]
/home/hilaire/Travaux/Developpement/DrGeoII/trunk/build/tmp/DrGeo.appCrash/Contents/Linux/pharo[0x8074bf0]
/home/hilaire/Travaux/Developpement/DrGeoII/trunk/build/tmp/DrGeo.appCrash/Contents/Linux/pharo(interpret+0x2de0)[0x8093640]
/home/hilaire/Travaux/Developpement/DrGeoII/trunk/build/tmp/DrGeo.appCrash/Contents/Linux/pharo(enterSmalltalkExecutiveImplementation+0x59)[0x8095d79]
/home/hilaire/Travaux/Developpement/DrGeoII/trunk/build/tmp/DrGeo.appCrash/Contents/Linux/pharo(interpret+0x1de)[0x8090a3e]
/home/hilaire/Travaux/Developpement/DrGeoII/trunk/build/tmp/DrGeo.appCrash/Contents/Linux/pharo(main+0x2b2)[0x805b842]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0xf74dfa83]
/home/hilaire/Travaux/Developpement/DrGeoII/trunk/build/tmp/DrGeo.appCrash/Contents/Linux/pharo[0x805bb61]
[0x0]


Smalltalk stack dump:
0xffcd7858 I EventManager class>actionMapFor: 0xb4cc1a40: a(n)
EventManager class
0xffcd787c I DebugSession(Object)>actionMap 0xb65028a8: a(n) DebugSession
0xffcd78a0 I DebugSession(Object)>actionForEvent: 0xb65028a8: a(n)
DebugSession
0xffcd78c4 I DebugSession(Object)>triggerEvent: 0xb65028a8: a(n)
DebugSession
0xffcd78e8 I DebugSession>stepInto: 0xb65028a8: a(n) DebugSession
0xffcd7904 M StepIntoDebugAction>executeAction 0xb676297c: a(n)
StepIntoDebugAction
0xffcd7924 I StepIntoDebugAction(DebugAction)>execute 0xb676297c: a(n)
StepIntoDebugAction
0xffcd7940 M [] in SpecDebugActionButton>update 0xb6768a38: a(n)
SpecDebugActionButton
0xffcd7960 I SpecDebugActionButton(ButtonModel)>performAction
0xb6768a38: a(n) SpecDebugActionButton
0xffcd797c M MorphicButtonAdapter>action 0xb677ed78: a(n)
MorphicButtonAdapter
0xffcd799c I PluggableButtonMorph>performAction: 0xb677edac: a(n)
PluggableButtonMorph
0xffcd6814 M [] in PluggableButtonMorph>mouseUp: 0xb677edac: a(n)
PluggableButtonMorph
0xffcd6838 M Array(SequenceableCollection)>do: 0xb6834688: a(n) Array
0xffcd6858 M PluggableButtonMorph>mouseUp: 0xb677edac: a(n)
PluggableButtonMorph
0xffcd6884 I PluggableButtonMorph(Morph)>handleMouseUp: 0xb677edac: a(n)
PluggableButtonMorph
0xffcd68a0 M MouseButtonEvent>sentTo: 0xb6834660: a(n) MouseButtonEvent
0xffcd68bc M PluggableButtonMorph(Morph)>handleEvent: 0xb677edac: a(n)
PluggableButtonMorph
0xffcd68d8 M PluggableButtonMorph(Morph)>handleFocusEvent: 0xb677edac:
a(n) PluggableButtonMorph
0xffcd6900 M [] in HandMorph>sendFocusEvent:to:clear: 0xb4f45f38: a(n)
HandMorph
0xffcd691c M BlockClosure>on:do: 0xb68345c8: a(n) BlockClosure
0xffcd6948 M WorldMorph(PasteUpMorph)>becomeActiveDuring: 0xb4f45e50:
a(n) Wor

[Pharo-users] Crash or locked VM

2016-01-05 Thread Hilaire
Hi,

I have a situation with a recursive Dr. Geo script where the image crash
or get locked (Can't hold on the image).
I tried with latest VM as detailed in the joined crash dump.

I did not get similar problem with other recursive script. So I may have
very special interaction between the objects, but I did not find out.

It may also be related to Morph because when instantiating first the
canvas and its window (2nd line of the script), then the rest of the
script, it does not crash.

The crashing image itself can be found there in case of usefulness
https://www.dropbox.com/s/rur8ayt8eon6mab/drgeo.image.zip?dl=0

When not crashing it outputs this cherry tree.

Thanks

Hilaire

-- 
Dr. Geo
http://drgeo.eu

Segmentation fault Tue Jan  5 21:17:54 2016


/home/hilaire/Travaux/Developpement/DrGeoII/trunk/build/tmp/pharo
pharo VM version: 3.9-7 #1 Thu Dec 24 00:36:34 CET 2015 gcc 4.6.3 [Production 
ITHB VM]
Built from: NBCoInterpreter NativeBoost-CogPlugin-EstebanLorenzano.21 uuid: 
4d9b9bdf-2dfa-4c0b-99eb-5b110dadc697 Dec 24 2015
With: NBCogit NativeBoost-CogPlugin-EstebanLorenzano.21 uuid: 
4d9b9bdf-2dfa-4c0b-99eb-5b110dadc697 Dec 24 2015
Revision: https://github.com/pharo-project/pharo-vm.git Commit: 
bad6fa2684afcf1d7cdb485f11049a4a4290fbc8 Date: 2015-12-14 12:47:06 +0100 By: 
Esteban Lorenzano  Jenkins build #15025
Build host: Linux pharo-linux 3.2.0-31-generic-pae #50-Ubuntu SMP Fri Sep 7 
16:39:45 UTC 2012 i686 i686 i386 GNU/Linux
plugin path: /home/hilaire/Travaux/Developpement/DrGeoII/trunk/build/tmp/ 
[default: /home/hilaire/Travaux/Developpement/DrGeoII/trunk/build/tmp/]


C stack backtrace & registers:
eax 0xff9d4e24 ebx 0xff9d4d40 ecx 0xff9d4dd8 edx 0xff9d4d8c
edi 0xff9d4c10 esi 0xff9d4c10 ebp 0xff9d4ca8 esp 0xff9d4cf4
eip 0xff9d4f08
*[0xff9d4f08]
./pharo[0x80a3332]
./pharo[0x80a3696]
[0xf770a410]
./pharo[0x8084627]
./pharo[0x8085311]
./pharo(incrementalGC+0x212)[0x80874c2]
./pharo[0x80876fa]
./pharo[0x8087ad7]
./pharo[0x8087bba]
./pharo(ceStackOverflow+0x54)[0x8089c04]
[0xb4968260]
[0xb4a1f936]
[0xb4a20f50]
[0xb4a20de4]
[0xb4a206d1]
[0xb4a224b6]
[0xb4a20508]
[0xb4968648]
[0x442]


Smalltalk stack dump:
0xff9e6e9c M Association(Magnitude)>max: 0xb634e1f0: a(n) Association
0xff9e6ec8 M Rectangle class>origin:extent: 0xb4cc0f44: a(n) Rectangle class
0xff9e6ef8 M INVALID RECEIVER>insetRectangle: 0xb634e194 is in old space
0xff9e6f14 M Float(Rectangle)>insetBy: 0xb63468f8: a(n) Float
0xff9e6f30 M DrGDrawable(Morph)>innerBounds 0xb6339b18: a(n) DrGDrawable
0xff9e6f48 M DrGDrawable(Morph)>clippingBounds 0xb6339b18: a(n) DrGDrawable
0xff9e6f68 M DrGDrawable(Morph)>invalidRect:from: 0xb6339b18: a(n) DrGDrawable
0xb634e214 is not a context

Most recent primitives
new:
at:put:
new:
replaceFrom:to:with:startingAt:
replaceFrom:to:with:startingAt:
replaceFrom:to:with:startingAt:
millisecondClockValue
basicNew
new:
millisecondClockValue
basicNew
at:put:
at:put:
at:put:
at:put:
basicNew
@
@
basicNew
@
basicNew
@
@
basicNew
@
@
@
@
@
@
perform:with:
truncated
truncated
@
@
@
basicNew
@
@
basicNew
compare:with:collated:
compare:with:collated:
@
@
perform:with:
@
@
@
basicNew
@
new:
at:put:
at:put:
perform:with:
truncated
fractionPart
truncated
perform:with:
truncated
bitShiftMagnitude:
+
hashBytes:startingWith:
digitCompare:
digitCompare:
perform:with:
truncated
@
@
perform:with:
@
@
@
new:
at:put:
new:
replaceFrom:to:with:startingAt:
replaceFrom:to:with:startingAt:
millisecondClockValue
basicNew
new:
millisecondClockValue
basicNew
at:put:
at:put:
at:put:
at:put:
basicNew
@
@
basicNew
@
basicNew
@
@
basicNew
@
@
@
@
@
@
basicNew
@
@
basicNew
@
perform:with:
perform:with:
@
perform:with:
perform:with:
@
basicNew
basicNew
@
@
basicNew
@
perform:with:
perform:with:
@
perform:with:
perform:with:
@
basicNew
perform:with:
perform:with:
@
perform:with:
perform:with:
@
basicNew
at:put:
basicNew
basicNew
new:
at:put:
at:put:
at:put:
at:put:
at:put:
at:put:
at:put:
at:put:
at:put:
basicNew
truncated
fractionPart
fractionPart
truncated
fractionPart
truncated
fractionPart
truncated
truncated
basicNew
truncated
fractionPart
fractionPart
truncated
fractionPart
truncated
fractionPart
truncated
truncated
basicNew
truncated
fractionPart
fractionPart
truncated
fractionPart
truncated
fractionPart
truncated
truncated
basicNew
@
@
basicNew
@
basicNew
@
@
basicNew
@
basicNew
truncated
fractionPart
fractionPart
truncated
fractionPart
truncated
fractionPart
truncated
truncated
basicNew
truncated
fractionPart
fractionPart
truncated
fractionPart
truncated
fractionPart
truncated
truncated
basicNew
truncated
fractionPart
fractionPart
truncated
fractionPart
truncated
fractionPart
truncated
truncated
basicNew
truncated
fractionPart
fractionPart
truncated
fractionPart
truncated
fractionPart
truncated
truncated
basicNew
truncated
fractionPart
fractionPart
truncated
fractionPart
truncated
fractionPart
truncated
truncated
basicNew
truncated
fractionPart
fractionPart
truncated
fractionPart
truncated
fractionPart
truncated
tru