[Pharo-project] Understanding Athens
I was doing the AthensTutorial and there is something I dont understand so I created a stackoverflow question. Can be found here -> http://stackoverflow.com/questions/16034694/in-athenstutorial-where-canvas-c... AthensTutorial does not work on Ubuntu 12.10 amd64 since it requires cairo32bit and ubuntu comes with 64bit libs of cairo should i file that as a bug ? I have not found a way to install cairo32 bit in my ubuntu yet.
Did you try installing the latest pharo vm? Doru On Tue, Apr 16, 2013 at 12:30 PM, dimitris chloupis <thekilon@yahoo.co.uk>wrote:
I was doing the AthensTutorial and there is something I dont understand so I created a stackoverflow question.
Can be found here -> http://stackoverflow.com/questions/16034694/in-athenstutorial-where-canvas-c...
AthensTutorial does not work on Ubuntu 12.10 amd64 since it requires cairo32bit and ubuntu comes with 64bit libs of cairo should i file that as a bug ? I have not found a way to install cairo32 bit in my ubuntu yet.
-- www.tudorgirba.com "Every thing has its own flow"
Doru , I am using Pharo 2.0 from the main website , also it does not matter because cairo libraries are looked outside the pharo folder. If you open system browser and go to the CairoLibraryLoader>>getLibraryPath (class side) you will see it tries to find cairo libs in '/usr/lib/libcairo.so' . On the other hand there are cairo libs included for the windows version inside the pharo folder. Its kinda wierd that they are not included for macos and linux. Pavel , you mid sharing how you installed 32 bit cairo, because I googled it and I could not find anything on the subject. Thanks. Oh and if anyone can answer my stackoverflow questions i will be more than grateful. I am prepared to contribute to Athens as much as I can and even port mophic to it BUT i need first to understrand what is going on. I have read Cairo documentation and now all i need is to decypher athens so be prepared for a bombarment of questions. -- View this message in context: http://forum.world.st/Understanding-Athens-tp4681820p4681847.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On 16 April 2013 13:23, kilon <thekilon@yahoo.co.uk> wrote:
Doru , I am using Pharo 2.0 from the main website , also it does not matter because cairo libraries are looked outside the pharo folder.
If you open system browser and go to the CairoLibraryLoader>>getLibraryPath (class side) you will see it tries to find cairo libs in '/usr/lib/libcairo.so' . On the other hand there are cairo libs included for the windows version inside the pharo folder. Its kinda wierd that they are not included for macos and linux.
For mac and windows we bundle VM together with cairo library. For linux, since they have a standardized way of installing third-party libs, you're on your own. Yes, it would be nice if we can get a precise instructions how to install 32-bit libs so other people can use them.
Pavel , you mid sharing how you installed 32 bit cairo, because I googled it and I could not find anything on the subject. Thanks.
Oh and if anyone can answer my stackoverflow questions i will be more than grateful. I am prepared to contribute to Athens as much as I can and even port mophic to it BUT i need first to understrand what is going on.
Sure, I will check and try to answer them.
I have read Cairo documentation and now all i need is to decypher athens so be prepared for a bombarment of questions.
You're welcome.
-- View this message in context: http://forum.world.st/Understanding-Athens-tp4681820p4681847.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
-- Best regards, Igor Stasenko.
P.S. i also asked Damien to look for the ways how we can tell system that installation depends on cairo-32 bit package (for ppa distro). On 16 April 2013 13:35, Igor Stasenko <siguctua@gmail.com> wrote:
On 16 April 2013 13:23, kilon <thekilon@yahoo.co.uk> wrote:
Doru , I am using Pharo 2.0 from the main website , also it does not matter because cairo libraries are looked outside the pharo folder.
If you open system browser and go to the CairoLibraryLoader>>getLibraryPath (class side) you will see it tries to find cairo libs in '/usr/lib/libcairo.so' . On the other hand there are cairo libs included for the windows version inside the pharo folder. Its kinda wierd that they are not included for macos and linux.
For mac and windows we bundle VM together with cairo library. For linux, since they have a standardized way of installing third-party libs, you're on your own.
Yes, it would be nice if we can get a precise instructions how to install 32-bit libs so other people can use them.
Pavel , you mid sharing how you installed 32 bit cairo, because I googled it and I could not find anything on the subject. Thanks.
Oh and if anyone can answer my stackoverflow questions i will be more than grateful. I am prepared to contribute to Athens as much as I can and even port mophic to it BUT i need first to understrand what is going on.
Sure, I will check and try to answer them.
I have read Cairo documentation and now all i need is to decypher athens so be prepared for a bombarment of questions.
You're welcome.
-- View this message in context: http://forum.world.st/Understanding-Athens-tp4681820p4681847.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
-- Best regards, Igor Stasenko.
-- Best regards, Igor Stasenko.
If you go for ppa you have two options. Compile everything when building the package or just packaging binaries. So have to set either Build-Depends: libcairo2-dev or/and Depends: libcairo2 in the debian/control file. The architecture you build your stuff for is i386. With the modern multi-arch support you can install e.g. a i386 version in an amd64 environment. Much better than to force a 64bit shell for a 32bit executable. Norbert Am 16.04.2013 um 13:40 schrieb Igor Stasenko <siguctua@gmail.com>:
P.S. i also asked Damien to look for the ways how we can tell system that installation depends on cairo-32 bit package (for ppa distro).
On 16 April 2013 13:35, Igor Stasenko <siguctua@gmail.com> wrote:
On 16 April 2013 13:23, kilon <thekilon@yahoo.co.uk> wrote:
Doru , I am using Pharo 2.0 from the main website , also it does not matter because cairo libraries are looked outside the pharo folder.
If you open system browser and go to the CairoLibraryLoader>>getLibraryPath (class side) you will see it tries to find cairo libs in '/usr/lib/libcairo.so' . On the other hand there are cairo libs included for the windows version inside the pharo folder. Its kinda wierd that they are not included for macos and linux.
For mac and windows we bundle VM together with cairo library. For linux, since they have a standardized way of installing third-party libs, you're on your own.
Yes, it would be nice if we can get a precise instructions how to install 32-bit libs so other people can use them.
Pavel , you mid sharing how you installed 32 bit cairo, because I googled it and I could not find anything on the subject. Thanks.
Oh and if anyone can answer my stackoverflow questions i will be more than grateful. I am prepared to contribute to Athens as much as I can and even port mophic to it BUT i need first to understrand what is going on.
Sure, I will check and try to answer them.
I have read Cairo documentation and now all i need is to decypher athens so be prepared for a bombarment of questions.
You're welcome.
-- View this message in context: http://forum.world.st/Understanding-Athens-tp4681820p4681847.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
-- Best regards, Igor Stasenko.
-- Best regards, Igor Stasenko.
On Tue, Apr 16, 2013 at 1:23 PM, kilon <thekilon@yahoo.co.uk> wrote:
Doru , I am using Pharo 2.0 from the main website , also it does not matter because cairo libraries are looked outside the pharo folder.
If you open system browser and go to the CairoLibraryLoader>>getLibraryPath (class side) you will see it tries to find cairo libs in '/usr/lib/libcairo.so' . On the other hand there are cairo libs included for the windows version inside the pharo folder. Its kinda wierd that they are not included for macos and linux.
Pavel , you mid sharing how you installed 32 bit cairo, because I googled it and I could not find anything on the subject. Thanks.
for Fedora it is: $ yum install cairo.i686 PharoVM itself needs several i686 libraries, this loads next about 30 of them. I had to change the library path in CairoLibraryLoader class>>#getLibraryPath to /usr/lib/libcairo.so.2
Oh and if anyone can answer my stackoverflow questions i will be more than grateful. I am prepared to contribute to Athens as much as I can and even port mophic to it BUT i need first to understrand what is going on. I have read Cairo documentation and now all i need is to decypher athens so be prepared for a bombarment of questions.
-- View this message in context: http://forum.world.st/Understanding-Athens-tp4681820p4681847.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Thank you Igor for the clarification. Suffice to say I was never a fan of relying to third parties for dependancies because it ends up in scenarios like this one. Similar reason why I am not a big fan of installing libraries to common paths, though I also understand the need for it. My vote goes into including all the dependant libraries in pharo folder for linux and macos as well. Pavel thanks for the install instructions but I am afraid they dont work for my Ubuntu 12.10 amd64 apt-get install yum was sucessful but as soon as i do sudo yum install cairo.i686 the system replies ---------------------------------------------------- Setting up Install Process No package cairo.i686 available. Nothing to do -------------------------------------------------- Should I assume it works for Fedora but its not available for Ubuntu ? -- View this message in context: http://forum.world.st/Understanding-Athens-tp4681820p4681870.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On Tue, Apr 16, 2013 at 2:20 PM, kilon <thekilon@yahoo.co.uk> wrote:
Should I assume it works for Fedora but its not available for Ubuntu ?
yum is not meant to be used on Ubuntu system. For Ubuntu, just do: $ sudo apt-get install libcairo2:i386 -- Damien Cassou http://damiencassou.seasidehosting.st "Success is the ability to go from one failure to another without losing enthusiasm." Winston Churchill
with the help of Damien via irc I have solved the problem with AthenTutorial, the lib is installed in /usr/lib/i386-linux-gnu/libcairo.so.2 I changed the getLibraryPath to point to the right directory and the tutorial now works fine, Damien also answered my canvas question a huge thank you to Damien :) Thanks all of you for the help too -- View this message in context: http://forum.world.st/Understanding-Athens-tp4681820p4681885.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On 16 April 2013 14:44, kilon <thekilon@yahoo.co.uk> wrote:
with the help of Damien via irc I have solved the problem with AthenTutorial, the lib is installed in /usr/lib/i386-linux-gnu/libcairo.so.2
I changed the getLibraryPath to point to the right directory and the tutorial now works fine,
Damien also answered my canvas question a huge thank you to Damien :) Thanks all of you for the help too
i will collect these bits, so Athens will report an error if library not found at one of those locations, and also give instructions how to install it.
-- View this message in context: http://forum.world.st/Understanding-Athens-tp4681820p4681885.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
-- Best regards, Igor Stasenko.
I am adding this method for CairoLibraryLoader class in Athens: cantFindCairoOnLinux " Cog VM is a 32-bit process, and therefore won't link with 64-bit libraries on 64-bit OS. In case if you have problems with cairo library on linux system, try following: Installing 32-bit version of Cairo library. for Fedora it is: $ yum install cairo.i686 for Ubuntu: $ sudo apt-get install libcairo2:i386 " now i need details about library locations and path to it. On 16 April 2013 14:23, Damien Cassou <damien.cassou@gmail.com> wrote:
On Tue, Apr 16, 2013 at 2:20 PM, kilon <thekilon@yahoo.co.uk> wrote:
Should I assume it works for Fedora but its not available for Ubuntu ?
yum is not meant to be used on Ubuntu system. For Ubuntu, just do:
$ sudo apt-get install libcairo2:i386
-- Damien Cassou http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without losing enthusiasm." Winston Churchill
-- Best regards, Igor Stasenko.
As I said the library is located at '/usr/lib/i386-linux-gnu/libcairo.so.2' I changed it in getLibraryPath in CairoLibraryLoader and it seems to work fine now at least AthensTutorial works fine. -- View this message in context: http://forum.world.st/Understanding-Athens-tp4681820p4681890.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Ok new problem for the AthenTutorial Everything seems to work fine till Step 29 in step 30 it throws a messageNotUnderstood for LogicalFont>>glyphRenderOn glyphRendererOn: anAthensBalloonSurface ^ self realFont glyphRendererOn: anAthensBalloonSurface full stack can be found here -> http://pastebin.com/C8itjM2a <http://pastebin.com/C8itjM2a> -- View this message in context: http://forum.world.st/Understanding-Athens-tp4681820p4681894.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On 16 April 2013 15:16, kilon <thekilon@yahoo.co.uk> wrote:
Ok new problem for the AthenTutorial
Everything seems to work fine till Step 29
in step 30 it throws a messageNotUnderstood for
LogicalFont>>glyphRenderOn
glyphRendererOn: anAthensBalloonSurface ^ self realFont glyphRendererOn: anAthensBalloonSurface
full stack can be found here -> http://pastebin.com/C8itjM2a <http://pastebin.com/C8itjM2a>
enable freetype in image settings and try again
-- View this message in context: http://forum.world.st/Understanding-Athens-tp4681820p4681894.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
-- Best regards, Igor Stasenko.
Oh Oh not only enabling Freetype does not solve the problem but even saving and quiting and restarting the image the problem remains. So I disabled and renabled Freetype again and save and quit and opened pharo again and this time pharo closes, everytime i try to reopen pharo it closes immediately .... how I disable freetype without being able to open my image ? -- View this message in context: http://forum.world.st/Understanding-Athens-tp4681820p4681905.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
here is the segmentation fault for anyone who cares reading long reports http://pastebin.com/UG6HgHDD <http://pastebin.com/UG6HgHDD> -- View this message in context: http://forum.world.st/Understanding-Athens-tp4681820p4681906.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On 16 April 2013 15:39, kilon <thekilon@yahoo.co.uk> wrote:
here is the segmentation fault for anyone who cares reading long reports
yeah, this is because you restarted an image.. the handle to cairo surface from previous session is no longer valid => crash boom. Usually the code to manage surfaces should be session aware. (which of course not done for tutorial ;) -- Best regards, Igor Stasenko.
On 16 April 2013 15:36, kilon <thekilon@yahoo.co.uk> wrote:
Oh Oh
not only enabling Freetype does not solve the problem but even saving and quiting and restarting the image the problem remains.
So I disabled and renabled Freetype again and save and quit and opened pharo again and this time pharo closes, everytime i try to reopen pharo it closes immediately .... how I disable freetype without being able to open my image ?
You should recreate surface if you restarted an image (step2) I updated notes in tutorial: ================= step2 "Step 2: Creating a surface. Protocol: <SurfaceClass> extent: x@y will create a surface using specific class. All surfaces is conformant to AthensSurface protocol. Example: " surface := AthensCairoSurface extent: self extent asIntegerPoint. "IMPORTANT NOTE: the surface which we will create at this step will be used in later steps. This means that if you resize the window (changing the view size), you may need to recreate surface. Also, since surface uses external resources, quitting an image and restarting it, will also require to create a new surface, because the one from previous session will be no longer accessible. " =========== step30 "Step 30: drawing text. Please note that this step requires Freetype enabled. Check if you enabled it in settings.
From world menu, go System->Settings And then look for Appearance -> Use freetype in settings browser.
" -- Best regards, Igor Stasenko.
Thats awesome but I cant open my pharo image anymore , I dont mind starting from a new image and reinstalling everything but I was wondering if there is a way to recover all that or am I screwed ? :) -- View this message in context: http://forum.world.st/Understanding-Athens-tp4681820p4681909.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
2013/4/16 kilon <thekilon@yahoo.co.uk>
Thats awesome but I cant open my pharo image anymore , I dont mind starting from a new image and reinstalling everything but I was wondering if there is a way to recover all that or am I screwed ? :)
I already have this problem I open it with CogVM without native boost and kill the morph which use Athens and save the image. Reopen it with your Native Boost VM and it's ok! (I'm not sure that's the best solution but it's work :)
Tristan
-- View this message in context: http://forum.world.st/Understanding-Athens-tp4681820p4681909.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On 16 April 2013 15:52, Tristan Bourgois <tristan.bourgois@gmail.com> wrote:
2013/4/16 kilon <thekilon@yahoo.co.uk>
Thats awesome but I cant open my pharo image anymore , I dont mind starting from a new image and reinstalling everything but I was wondering if there is a way to recover all that or am I screwed ? :)
I already have this problem I open it with CogVM without native boost and kill the morph which use Athens and save the image. Reopen it with your Native Boost VM and it's ok! (I'm not sure that's the best solution but it's work :)
Best solution is to check the session before attempting to access invalid resources :)
Tristan
-- View this message in context: http://forum.world.st/Understanding-Athens-tp4681820p4681909.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
-- Best regards, Igor Stasenko.
start it with a stackvm, then close the offending window and save, then restart with a regular vm :) Esteban On Apr 16, 2013, at 3:47 PM, kilon <thekilon@yahoo.co.uk> wrote:
Thats awesome but I cant open my pharo image anymore , I dont mind starting from a new image and reinstalling everything but I was wondering if there is a way to recover all that or am I screwed ? :)
-- View this message in context: http://forum.world.st/Understanding-Athens-tp4681820p4681909.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On 16 April 2013 15:47, kilon <thekilon@yahoo.co.uk> wrote:
Thats awesome but I cant open my pharo image anymore , I dont mind starting from a new image and reinstalling everything but I was wondering if there is a way to recover all that or am I screwed ? :)
You have a talent at screwing things up :) But your feedback is invaluable, which helping to spot details , which obvious to me but not for a newcomer. Yeah, concerning screwed image: in such cases i usually run it with VM which does not includes NativeBoost, then it fails with error.. and you can close morphs/debugger save image and can continue work with Cog VM.. it is , of course not always works, because it depends how badly things screwed up. :)
-- View this message in context: http://forum.world.st/Understanding-Athens-tp4681820p4681909.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
-- Best regards, Igor Stasenko.
Le 16/04/2013 16:12, Igor Stasenko a écrit :
On 16 April 2013 15:47, kilon <thekilon@yahoo.co.uk> wrote:
Thats awesome but I cant open my pharo image anymore , I dont mind starting from a new image and reinstalling everything but I was wondering if there is a way to recover all that or am I screwed ? :)
You have a talent at screwing things up :) But your feedback is invaluable, which helping to spot details , which obvious to me but not for a newcomer.
Yeah, concerning screwed image: in such cases i usually run it with VM which does not includes NativeBoost, then it fails with error.. and you can close morphs/debugger save image and can continue work with Cog VM.. it is , of course not always works, because it depends how badly things screwed up. :)
Igor, could you add code to start the session without gui, run a bit of smalltalk code to destroy the dangling surfaces and save again ? It would probably save the day a few times :) Thierry
-- View this message in context: http://forum.world.st/Understanding-Athens-tp4681820p4681909.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
-- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
On 16 April 2013 16:27, Goubier Thierry <thierry.goubier@cea.fr> wrote:
Le 16/04/2013 16:12, Igor Stasenko a écrit :
On 16 April 2013 15:47, kilon <thekilon@yahoo.co.uk> wrote:
Thats awesome but I cant open my pharo image anymore , I dont mind starting from a new image and reinstalling everything but I was wondering if there is a way to recover all that or am I screwed ? :)
You have a talent at screwing things up :) But your feedback is invaluable, which helping to spot details , which obvious to me but not for a newcomer.
Yeah, concerning screwed image: in such cases i usually run it with VM which does not includes NativeBoost, then it fails with error.. and you can close morphs/debugger save image and can continue work with Cog VM.. it is , of course not always works, because it depends how badly things screwed up. :)
Igor, could you add code to start the session without gui, run a bit of smalltalk code to destroy the dangling surfaces and save again ?
It would probably save the day a few times :)
yes, i am already thinking on it. The thing which i want to do is to put a session check in #drawDuring: method, to check if surface is still valid. And if its not, then shoot the caller :) If you have a better/more general idea how/where to do it, feel free to suggest.
Thierry
-- Best regards, Igor Stasenko.
Le 16/04/2013 16:29, Igor Stasenko a écrit :
On 16 April 2013 16:27, Goubier Thierry <thierry.goubier@cea.fr> wrote:
Le 16/04/2013 16:12, Igor Stasenko a écrit :
On 16 April 2013 15:47, kilon <thekilon@yahoo.co.uk> wrote:
Thats awesome but I cant open my pharo image anymore , I dont mind starting from a new image and reinstalling everything but I was wondering if there is a way to recover all that or am I screwed ? :)
You have a talent at screwing things up :) But your feedback is invaluable, which helping to spot details , which obvious to me but not for a newcomer.
Yeah, concerning screwed image: in such cases i usually run it with VM which does not includes NativeBoost, then it fails with error.. and you can close morphs/debugger save image and can continue work with Cog VM.. it is , of course not always works, because it depends how badly things screwed up. :)
Igor, could you add code to start the session without gui, run a bit of smalltalk code to destroy the dangling surfaces and save again ?
It would probably save the day a few times :)
yes, i am already thinking on it.
The thing which i want to do is to put a session check in #drawDuring: method, to check if surface is still valid. And if its not, then shoot the caller :)
We don't have a framework for handling external resources tracking across sessions, wher you can specify a reopen/destroy policy ? How are servers doing it? They have to close connections on session close and reopen them at start, no? Why not using the same code for Athens and recreate the surface on session start or fail (without segfault). Ah yes, shooting the caller is fine if we restart on a system without the ability to create the surface... What do you think of throwing an exception? Thierry -- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
On 16 April 2013 16:39, Goubier Thierry <thierry.goubier@cea.fr> wrote:
Le 16/04/2013 16:29, Igor Stasenko a écrit :
On 16 April 2013 16:27, Goubier Thierry <thierry.goubier@cea.fr> wrote:
Le 16/04/2013 16:12, Igor Stasenko a écrit :
On 16 April 2013 15:47, kilon <thekilon@yahoo.co.uk> wrote:
Thats awesome but I cant open my pharo image anymore , I dont mind starting from a new image and reinstalling everything but I was wondering if there is a way to recover all that or am I screwed ? :)
You have a talent at screwing things up :) But your feedback is invaluable, which helping to spot details , which obvious to me but not for a newcomer.
Yeah, concerning screwed image: in such cases i usually run it with VM which does not includes NativeBoost, then it fails with error.. and you can close morphs/debugger save image and can continue work with Cog VM.. it is , of course not always works, because it depends how badly things screwed up. :)
Igor, could you add code to start the session without gui, run a bit of smalltalk code to destroy the dangling surfaces and save again ?
It would probably save the day a few times :)
yes, i am already thinking on it.
The thing which i want to do is to put a session check in #drawDuring: method, to check if surface is still valid. And if its not, then shoot the caller :)
We don't have a framework for handling external resources tracking across sessions, wher you can specify a reopen/destroy policy ?
Well, NativeBoost has some bits for supporting session-aware code. The problem is that management of external resources almost always specific to what you using... During my development of NB i identified some general patterns, which then shaped into implementation of concrete service classes. We're planning to move some parts of it out of NB to Kernel. But that is the road to walk.
How are servers doing it? They have to close connections on session close and reopen them at start, no? Why not using the same code for Athens and recreate the surface on session start or fail (without segfault).
Well, the question is always at which level you should do it. How you can avoid checking every single external resource handle every time you trying to use it, and instead introduce check at higher levels (at root entry to your model) because checking costs resources. But because different frameworks employing different models, it is hard to find one, which is so general and fits all.
Ah yes, shooting the caller is fine if we restart on a system without the ability to create the surface... What do you think of throwing an exception?
That's what i going to do for the starting. But Athens surface is really low level. And introducing some auto-management will be a mistake. The code which should recreate surface upon image restart should be in user's code, because we cannot predict how new session is different comparing to previous one.. User may decide to choose different backend in new session, reload some files from disk etc...
Thierry
-- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
-- Best regards, Igor Stasenko.
Igor Stasenko wrote:
On 16 April 2013 16:27, Goubier Thierry <thierry.goubier@cea.fr> wrote:
Le 16/04/2013 16:12, Igor Stasenko a écrit :
On 16 April 2013 15:47, kilon <thekilon@yahoo.co.uk> wrote:
Thats awesome but I cant open my pharo image anymore , I dont mind starting from a new image and reinstalling everything but I was wondering if there is a way to recover all that or am I screwed ? :)
You have a talent at screwing things up :) But your feedback is invaluable, which helping to spot details , which obvious to me but not for a newcomer.
Yeah, concerning screwed image: in such cases i usually run it with VM which does not includes NativeBoost, then it fails with error.. and you can close morphs/debugger save image and can continue work with Cog VM.. it is , of course not always works, because it depends how badly things screwed up. :)
Igor, could you add code to start the session without gui, run a bit of smalltalk code to destroy the dangling surfaces and save again ?
It would probably save the day a few times :)
yes, i am already thinking on it.
The thing which i want to do is to put a session check in #drawDuring: method, to check if surface is still valid. And if its not, then shoot the caller :)
If you have a better/more general idea how/where to do it, feel free to suggest.
Thierry
An idea for more general recovery options.... Using the Pharo command-line processing, have some "recovery" commands that execute and quit before any UI processing is started. For example... * list/close open windows * list/close running processes * list/revert recent method changes cheers -ben
Ok resumed learning of Athens, did look through and experimented with the steps of the tutorial , I think I understand the basics now. Started from a fresh image reinstalled everything and no longer save my image with Athens Tutorial open so there is no segfault.But the error remains. LogicalFont>>glyphRenderOn glyphRendererOn: anAthensBalloonSurface ^ self realFont glyphRendererOn: anAthensBalloonSurface full stack can be found here -> http:// http://pastebin.com/C8itjM2a <http:// http://pastebin.com/C8itjM2a> freetype is enabled in settings , my ears are open for suggestions :) -- View this message in context: http://forum.world.st/Understanding-Athens-tp4681820p4682265.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On Apr 18, 2013, at 11:24 AM, kilon wrote:
Ok resumed learning of Athens, did look through and experimented with the steps of the tutorial , I think I understand the basics now.
Started from a fresh image reinstalled everything and no longer save my image with Athens Tutorial open so there is no segfault.But the error remains.
LogicalFont>>glyphRenderOn
glyphRendererOn: anAthensBalloonSurface ^ self realFont glyphRendererOn: anAthensBalloonSurface
full stack can be found here -> http:// http://pastebin.com/C8itjM2a <http:// http://pastebin.com/C8itjM2a>
freetype is enabled in settings , my ears are open for suggestions :)
-- View this message in context: http://forum.world.st/Understanding-Athens-tp4681820p4682265.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Well, the message is sent to a StrikeFont (the legacy bitmap font, sorta hard to provide a vector-based renderer for), so I guess somewhere, you need to ensure he font used by AthensViewMorph is a LogicalFont whose realFont is an actual TrueTypeFont. Cheers, Henry
On 18 April 2013 11:52, Henrik Johansen <henrik.s.johansen@veloxit.no> wrote:
On Apr 18, 2013, at 11:24 AM, kilon wrote:
Ok resumed learning of Athens, did look through and experimented with the steps of the tutorial , I think I understand the basics now.
Started from a fresh image reinstalled everything and no longer save my image with Athens Tutorial open so there is no segfault.But the error remains.
LogicalFont>>glyphRenderOn
glyphRendererOn: anAthensBalloonSurface ^ self realFont glyphRendererOn: anAthensBalloonSurface
full stack can be found here -> http:// http://pastebin.com/C8itjM2a <http:// http://pastebin.com/C8itjM2a>
freetype is enabled in settings , my ears are open for suggestions :)
-- View this message in context: http://forum.world.st/Understanding-Athens-tp4681820p4682265.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Well, the message is sent to a StrikeFont (the legacy bitmap font, sorta hard to provide a vector-based renderer for), so I guess somewhere, you need to ensure he font used by AthensViewMorph is a LogicalFont whose realFont is an actual TrueTypeFont.
Yes. Athens using freetype fonts. LogicalFont-s work in a way that if it can find a corresponding freetype font, it will use it, otherwise it will fallback to one which comes with image (strike font). If you want to avoid pitfalls with LogicalFont logic, use direct FreeTypeFont instances (but don't ask me where how to obtain them ;) ).
Cheers, Henry
-- Best regards, Igor Stasenko.
On Apr 18, 2013, at 12:17 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 18 April 2013 11:52, Henrik Johansen <henrik.s.johansen@veloxit.no> wrote:
On Apr 18, 2013, at 11:24 AM, kilon wrote:
Ok resumed learning of Athens, did look through and experimented with the steps of the tutorial , I think I understand the basics now.
Started from a fresh image reinstalled everything and no longer save my image with Athens Tutorial open so there is no segfault.But the error remains.
LogicalFont>>glyphRenderOn
glyphRendererOn: anAthensBalloonSurface ^ self realFont glyphRendererOn: anAthensBalloonSurface
full stack can be found here -> http:// http://pastebin.com/C8itjM2a <http:// http://pastebin.com/C8itjM2a>
freetype is enabled in settings , my ears are open for suggestions :)
-- View this message in context: http://forum.world.st/Understanding-Athens-tp4681820p4682265.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Well, the message is sent to a StrikeFont (the legacy bitmap font, sorta hard to provide a vector-based renderer for), so I guess somewhere, you need to ensure he font used by AthensViewMorph is a LogicalFont whose realFont is an actual TrueTypeFont.
Yes. Athens using freetype fonts. LogicalFont-s work in a way that if it can find a corresponding freetype font, it will use it, otherwise it will fallback to one which comes with image (strike font).
If you want to avoid pitfalls with LogicalFont logic, use direct FreeTypeFont instances (but don't ask me where how to obtain them ;) ).
We should really clean up Fonts⦠Marcus
On 18 April 2013 12:45, Marcus Denker <marcus.denker@inria.fr> wrote:
On Apr 18, 2013, at 12:17 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 18 April 2013 11:52, Henrik Johansen <henrik.s.johansen@veloxit.no> wrote:
On Apr 18, 2013, at 11:24 AM, kilon wrote:
Ok resumed learning of Athens, did look through and experimented with the steps of the tutorial , I think I understand the basics now.
Started from a fresh image reinstalled everything and no longer save my image with Athens Tutorial open so there is no segfault.But the error remains.
LogicalFont>>glyphRenderOn
glyphRendererOn: anAthensBalloonSurface ^ self realFont glyphRendererOn: anAthensBalloonSurface
full stack can be found here -> http:// http://pastebin.com/C8itjM2a <http:// http://pastebin.com/C8itjM2a>
freetype is enabled in settings , my ears are open for suggestions :)
-- View this message in context: http://forum.world.st/Understanding-Athens-tp4681820p4682265.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Well, the message is sent to a StrikeFont (the legacy bitmap font, sorta hard to provide a vector-based renderer for), so I guess somewhere, you need to ensure he font used by AthensViewMorph is a LogicalFont whose realFont is an actual TrueTypeFont.
Yes. Athens using freetype fonts. LogicalFont-s work in a way that if it can find a corresponding freetype font, it will use it, otherwise it will fallback to one which comes with image (strike font).
If you want to avoid pitfalls with LogicalFont logic, use direct FreeTypeFont instances (but don't ask me where how to obtain them ;) ).
We should really clean up Fontsâ¦
yeah, one of the idea is to put 300kb truetype font into image and say goodbye to strike fonts which take like 1.5Mb
Marcus
-- Best regards, Igor Stasenko.
Ben Coman wrote
An idea for more general recovery options.... Using the Pharo command-line processing, have some "recovery" commands that execute and quit before any UI processing is started. For example... * list/close open windows * list/close running processes * list/revert recent method changes
This sounds really cool. I think it would have to be done at the vm level though. IIRC by the time Cami's stuff is run, the UI has already come up... ----- Cheers, Sean -- View this message in context: http://forum.world.st/Understanding-Athens-tp4681820p4682292.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
To my 64bit Fedora I had to install 32bit Cairo and related libraries too (but then Athens worked). Cheers, -- Pavel On Tue, Apr 16, 2013 at 12:30 PM, dimitris chloupis <thekilon@yahoo.co.uk>wrote:
I was doing the AthensTutorial and there is something I dont understand so I created a stackoverflow question.
Can be found here -> http://stackoverflow.com/questions/16034694/in-athenstutorial-where-canvas-c...
AthensTutorial does not work on Ubuntu 12.10 amd64 since it requires cairo32bit and ubuntu comes with 64bit libs of cairo should i file that as a bug ? I have not found a way to install cairo32 bit in my ubuntu yet.
participants (14)
-
Ben Coman -
Damien Cassou -
dimitris chloupis -
Esteban Lorenzano -
Goubier Thierry -
Henrik Johansen -
Igor Stasenko -
kilon -
Marcus Denker -
Norbert Hartl -
Pavel Krivanek -
Sean P. DeNigris -
Tristan Bourgois -
Tudor Girba