[pharo-project/pharo-core] dbba45: 50646

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[pharo-project/pharo-core] dbba45: 50646

Eliot Miranda-3
  Branch: refs/heads/5.0
  Home:   https://github.com/pharo-project/pharo-core
  Commit: dbba4588eb4f9c70592fd4944454981d76807339
      https://github.com/pharo-project/pharo-core/commit/dbba4588eb4f9c70592fd4944454981d76807339
  Author: Jenkins Build Server <[hidden email]>
  Date:   2016-03-16 (Wed, 16 Mar 2016)

  Changed paths:
    M FontInfrastructure.package/LogicalFont.class/instance/accessing/realFont.st
    M FreeType.package/FT2Handle.class/class/system startup/clearRegistry.st
    M FreeType.package/FT2Handle.class/class/system startup/startUp_.st
    M FreeType.package/FT2Handle.class/instance/private/pvtDestroyHandle.st
    M FreeType.package/FT2Handle.class/instance/testing/isValid.st
    A FreeType.package/FT2Handle.class/instance/validation/validate.st
    M FreeType.package/FT2MemoryFaceData.class/instance/validation/validate.st
    M FreeType.package/FreeTypeExternalMemory.class/instance/validation/validate.st
    M FreeType.package/FreeTypeSettings.class/class/system startup/shutDown_.st
    R ScriptLoader50.package/ScriptLoader.class/instance/pharo - scripts/script50645.st
    A ScriptLoader50.package/ScriptLoader.class/instance/pharo - scripts/script50646.st
    R ScriptLoader50.package/ScriptLoader.class/instance/pharo - updates/update50645.st
    A ScriptLoader50.package/ScriptLoader.class/instance/pharo - updates/update50646.st
    M ScriptLoader50.package/ScriptLoader.class/instance/public/commentForCurrentUpdate.st
    M Slot-Tests.package/SlotSilentTest.class/README.md
    M Slot-Tests.package/SlotSilentTest.class/instance/running/runCase.st

  Log Message:
  -----------
  50646
17825 SlotSilentTest should also silence Author during tests
        https://pharo.fogbugz.com/f/cases/17825

17797 random crash while trying to dispose a NULL handle
        https://pharo.fogbugz.com/f/cases/17797

http://files.pharo.org/image/50/50646.zip


Reply | Threaded
Open this post in threaded view
|

Re: [pharo-project/pharo-core] dbba45: 50646

EstebanLM
On 16 Mar 2016, at 13:28, GitHub <[hidden email]> wrote:

17797 random crash while trying to dispose a NULL handle
https://pharo.fogbugz.com/f/cases/17797


again, this is an attempt against the "Font crashing VM” bug… please I need all reports possible… even if you think is the same as before (even if IS the same as before).

thanks!
Esteban


Reply | Threaded
Open this post in threaded view
|

Re: [pharo-project/pharo-core] dbba45: 50646

stepharo
TX esteban I will try my super crashing power to see if I can.
I just need time to code :)


Le 16/3/16 13:36, Esteban Lorenzano a écrit :
On 16 Mar 2016, at 13:28, GitHub <[hidden email]> wrote:

17797 random crash while trying to dispose a NULL handle
https://pharo.fogbugz.com/f/cases/17797


again, this is an attempt against the "Font crashing VM” bug… please I need all reports possible… even if you think is the same as before (even if IS the same as before).

thanks!
Esteban



Reply | Threaded
Open this post in threaded view
|

Re: [pharo-project/pharo-core] dbba45: 50646

Ben Coman
In reply to this post by EstebanLM
On Wed, Mar 16, 2016 at 8:36 PM, Esteban Lorenzano <[hidden email]> wrote:

> On 16 Mar 2016, at 13:28, GitHub <[hidden email]> wrote:
>
> 17797 random crash while trying to dispose a NULL handle
> https://pharo.fogbugz.com/f/cases/17797
>
>
>
> again, this is an attempt against the "Font crashing VM” bug… please I need
> all reports possible… even if you think is the same as before (even if IS
> the same as before).
>
> thanks!
> Esteban
>
>
I am using a fresh Tracker image per attached refresh.sh
Debian 8 Jessie 32-bit
Pharo5.0 Latest update: #50647
CoInterpreter VMMaker.oscog-eem.1726 Mar 15 2016 Jenkins build #576

After one refresh, after starting Image, in Playground and doing the
following several times...
   "[A]" ImageWorker do: [ 1 + 1] within: 2 seconds onTimeout: [ self
inform: 'timeout' ]

1. In parent did [A] and got...
      Error: External Image Failed: 34304
      ImageWorker>>handleForkedImageResultWithExitStatus:

2. In parent did [A] and got...
      Error: External Image Failed: 34304
      ImageWorker>>handleForkedImageResultWithExitStatus:

3. In parent did [A], and in child got...
      FT2Error: Freetype2 primitive failed [error 2][unknown file format]
      FreeTypeFace(FT2Handle)>>primitiveFailed:
      FreeTypeFace(FT2Handle)>>primitiveFailed
      FreeTypeFace(FT2Face)>>primNewFaceFromExternalMemory:size:index:
      FreeTypeFace(FT2Face)>>newFaceFromExternalMemory:index:
      FreeTypeFace>>create
      FreeTypeFace>>validate
      FreeTypeFont>>face
      FreeTypeFontProvider>>fontFor:familyName:
      LogicalFontManager>>bestFontFor:whenFindingAlternativeIgnoreAll:
      LogicalFontManager>>bestFontFor:
      LogicalFont>>findRealFont
      LogicalFont>>realFont
      LogicalFont>>installOn:foregroundColor:backgroundColor:
      FormCanvas>>drawString:from:to:in:font:color:
      FormCanvas(Canvas)>>drawString:in:

4. In parent did [A], and in child got...
      FT2Error: Freetype2 primitive failed [error 2][unknown file format]

5. In parent, did a save&quit. Tried to restart from command line got...
      primNewFaceFromExternalMemory:size:index:
      stack page bytes 4096 available headroom 2788 minimum unused headroom 3020
  (Segmentation fault)
     Aborted

refresh.sh (1004 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [pharo-project/pharo-core] dbba45: 50646

Ben Coman
In reply to this post by EstebanLM
On Wed, Mar 16, 2016 at 8:36 PM, Esteban Lorenzano <[hidden email]> wrote:
> On 16 Mar 2016, at 13:28, GitHub <[hidden email]> wrote:
>
> 17797 random crash while trying to dispose a NULL handle
> https://pharo.fogbugz.com/f/cases/17797
>
> again, this is an attempt against the "Font crashing VM” bug… please I need
> all reports possible… even if you think is the same as before (even if IS
> the same as before).

   "[A]" ImageWorker do: [ 1 + 1] within: 2 seconds onTimeout: [ self
inform: 'timeout' ]

1. Ran refresh.sh per last post and opened Image.
2. Opened playground without adjusting native window.
3. Three times successfully inspected [A], seeing "2".
4. Opened Nautilus and a few more times successfully inspected [A], seeing "2".
5. Maximised native window
6. Inspecting [A] caused forked child to remain open with error
     FT2Error: Freetype2 primitive failed [error 2][unknown file format]

Reply | Threaded
Open this post in threaded view
|

Re: [pharo-project/pharo-core] dbba45: 50646

Ben Coman
On Thu, Mar 17, 2016 at 1:07 AM, Ben Coman <[hidden email]> wrote:

> On Wed, Mar 16, 2016 at 8:36 PM, Esteban Lorenzano <[hidden email]> wrote:
>> On 16 Mar 2016, at 13:28, GitHub <[hidden email]> wrote:
>>
>> 17797 random crash while trying to dispose a NULL handle
>> https://pharo.fogbugz.com/f/cases/17797
>>
>> again, this is an attempt against the "Font crashing VM” bug… please I need
>> all reports possible… even if you think is the same as before (even if IS
>> the same as before).
>
>    "[A]" ImageWorker do: [ 1 + 1] within: 2 seconds onTimeout: [ self
      inform: 'timeout' ]
>
> A1. Ran refresh.sh per last post and opened Image.
> A2. Opened playground without adjusting native window.
> A3. Three times successfully inspected [A], seeing "2".
> A4. Opened Nautilus and a few more times successfully inspected [A], seeing "2".
> A5. Maximised native window
> A6. Inspecting [A] caused forked child Image to remain open with error
>      FT2Error: Freetype2 primitive failed [error 2][unknown file format]

Refinements...
B1. Ran refresh.sh per last post and opened Image.
B2. Opened playground without adjusting native window.
B3. Three times successfully inspected [A], seeing "2".
B4. Maximised native window
B5. Inspecting [A] caused forked child Image to remain open with error
>      FT2Error: Freetype2 primitive failed [error 2][unknown file format]

C1. Ran refresh.sh per last post and opened Image.
C2. Maximised native window.
C3. Opened playground
C4.  Inspected [A] once, getting...
>      Error: External Image Failed: 34304
C5. Saved&quit Image
C6. Restarted, got...
    stack page bytes 4096 available headroom 2788 minimum unused headroom 3020
    (Segmentation fault)

D1. Ran refresh.sh per last post and opened Image.
D2. Opened playground
D3. Inspected [A], successfully getting "2"
D4. Several times, Saved Image, Restarted Image, goto D3.
D5. Maximised window.
D6. Inspected [A], forked child Image stayed open, playground is
red-pane-of-death,
      predebug window... FT2Error: Freetype2 primitive failed [error
2][unknown file format]
D7. Quit child Image without saving.
D8. In parent, save&quit then restart produces error...
     stack page bytes 4096 available headroom 2788 minimum unused
headroom 3020 (segmentation fault)

Btw, sometimes the the forked child Image (e.g. named
3635603974497675) that starts up, and sometimes the parent Image is
started, so there are two native windows open titled
"Pharo-5.0-Issue-Tracker-image.image" Both encounter similar frequency
of FT2Error errors.

Trying incrementally changing resolution
244x665 okay = 2
244x683 okay = 2
244x695 okay = 2
244x709 child error FT2Error
244x685 okay = 2 (recovered)
244x700 okay = 2
244x705 parent error Error: External Image Failed: 34304
244x709 okay = 2
244x716 okay = 2
244x918 okay = 2
244x1147 child error FT2Error

The last one is full height.  Now I repeatedly inspected [A] with
strange results.
Using CTRL-I would predominately fail with some successes. Most fails
occurred in spawned Image with a FT2Error.  Using "Inspect" from the
context menu predominately succeeded, with some failures.

Also, sometimes the spawned image startup is s-l-o-w, so the 'timeout'
inform executes, even though the inspect [A] successfully returns "2".

More mucking around indicates a definite tendency to error more often
when the window is large.

cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: [pharo-project/pharo-core] dbba45: 50646

Guillermo Polito
Ok, I started following Ben's breadcrumbs. I'm on debian jessie also, 64bits.

First, I could reproduce the issue (only if I maximize the image). And I started looking at the debugger/stack trace.  

The first thing I noticed is that with the debugger open in 

newFaceFromExternalMemory: aFreeTypeExternalMemory index: anInteger

If I retry to evaluate

self 
primNewFaceFromExternalMemory: aFreeTypeExternalMemory 
size: memSize 
index: anInteger.


This always fails.

I checked the Freetype plugin an the freetype library doc and my only guess is that the first argument (aFreeTypeExternalMemory) is wrong, or a remanent from another session.

BUT!

I made another discovery. If we actually walk to the top of the stack, we will see

- the failure happens at startup, while starting up WorldMorph (what would explain why people observe this issue when saving the image)
And, the redrawing happens because I maximized the window, what forces the morphs to redraw, explaining somehow why the bug appears when we maximize the window (?).

- and then if we evaluate

SessionManager default startupList

we will see that WorldMorph is being started up before freetype. This means that the WorldMorph is being redrawn before freetype objects are cleaned, which may cause having wrong freetype handles/values.

Of course, I'm half-way understanding all what's happenning :) These are all conjectures. But nevertheless, if somebody wants to try, I made a changeset (attached) that should be filed in and two lines that reset the session manager

SessionManager default: SessionManager initializedSessionManager.
SessionManager default installNewSession. 

Guille

On Wed, Mar 16, 2016 at 7:09 PM, Ben Coman <[hidden email]> wrote:
On Thu, Mar 17, 2016 at 1:07 AM, Ben Coman <[hidden email]> wrote:
> On Wed, Mar 16, 2016 at 8:36 PM, Esteban Lorenzano <[hidden email]> wrote:
>> On 16 Mar 2016, at 13:28, GitHub <[hidden email]> wrote:
>>
>> 17797 random crash while trying to dispose a NULL handle
>> https://pharo.fogbugz.com/f/cases/17797
>>
>> again, this is an attempt against the "Font crashing VM” bug… please I need
>> all reports possible… even if you think is the same as before (even if IS
>> the same as before).
>
>    "[A]" ImageWorker do: [ 1 + 1] within: 2 seconds onTimeout: [ self
      inform: 'timeout' ]
>
> A1. Ran refresh.sh per last post and opened Image.
> A2. Opened playground without adjusting native window.
> A3. Three times successfully inspected [A], seeing "2".
> A4. Opened Nautilus and a few more times successfully inspected [A], seeing "2".
> A5. Maximised native window
> A6. Inspecting [A] caused forked child Image to remain open with error
>      FT2Error: Freetype2 primitive failed [error 2][unknown file format]

Refinements...
B1. Ran refresh.sh per last post and opened Image.
B2. Opened playground without adjusting native window.
B3. Three times successfully inspected [A], seeing "2".
B4. Maximised native window
B5. Inspecting [A] caused forked child Image to remain open with error
>      FT2Error: Freetype2 primitive failed [error 2][unknown file format]

C1. Ran refresh.sh per last post and opened Image.
C2. Maximised native window.
C3. Opened playground
C4.  Inspected [A] once, getting...
>      Error: External Image Failed: 34304
C5. Saved&quit Image
C6. Restarted, got...
    stack page bytes 4096 available headroom 2788 minimum unused headroom 3020
    (Segmentation fault)

D1. Ran refresh.sh per last post and opened Image.
D2. Opened playground
D3. Inspected [A], successfully getting "2"
D4. Several times, Saved Image, Restarted Image, goto D3.
D5. Maximised window.
D6. Inspected [A], forked child Image stayed open, playground is
red-pane-of-death,
      predebug window... FT2Error: Freetype2 primitive failed [error
2][unknown file format]
D7. Quit child Image without saving.
D8. In parent, save&quit then restart produces error...
     stack page bytes 4096 available headroom 2788 minimum unused
headroom 3020 (segmentation fault)

Btw, sometimes the the forked child Image (e.g. named
3635603974497675) that starts up, and sometimes the parent Image is
started, so there are two native windows open titled
"Pharo-5.0-Issue-Tracker-image.image" Both encounter similar frequency
of FT2Error errors.

Trying incrementally changing resolution
244x665 okay = 2
244x683 okay = 2
244x695 okay = 2
244x709 child error FT2Error
244x685 okay = 2 (recovered)
244x700 okay = 2
244x705 parent error Error: External Image Failed: 34304
244x709 okay = 2
244x716 okay = 2
244x918 okay = 2
244x1147 child error FT2Error

The last one is full height.  Now I repeatedly inspected [A] with
strange results.
Using CTRL-I would predominately fail with some successes. Most fails
occurred in spawned Image with a FT2Error.  Using "Inspect" from the
context menu predominately succeeded, with some failures.

Also, sometimes the spawned image startup is s-l-o-w, so the 'timeout'
inform executes, even though the inspect [A] successfully returns "2".

More mucking around indicates a definite tendency to error more often
when the window is large.

cheers -ben



SessionManagerPatch.cs (4K) Download Attachment