I'm having trouble calling a Mac Foundation function via FFI. It appears to
be the plugin for the Mac 4.2.5
VM. There was a discussion at
http://forum.world.st/FFI-to-call-Mac-Carbon-functions-td3507842.html
The meat of it is:
After I put a link to the Foundation lib in the VM's Resources
folder, I compiled:
CarbonFunctions class>>NSMakeRectWithX: xFloat y: yFloat w:
widthFloat h: hFloat
<apicall: void* 'NSMakeRect' (float float float float)
module: 'Foundation'>
^self externalCallFailed
DoIt:
CarbonFunctions
NSMakeRectWithX: 0.0
y: 0.0
w: 100.0
h: 100.0.
Error: Unable to find function address
Other relevant info:
* I am able to call libc functions
Thanks.
Sean
--
View this message in context: http://forum.world.st/FFI-Problem-with-Mac-4-2-5-VM-tp3541069p3541069.html
Sent from the Squeak VM mailing list archive at Nabble.com.
Igor Stasenko uploaded a new version of CMakeVMMaker to project VM Maker:
http://www.squeaksource.com/VMMaker/CMakeVMMaker-IgorStasenko.105.mcz
==================== Summary ====================
Name: CMakeVMMaker-IgorStasenko.105
Author: IgorStasenko
Time: 20 May 2011, 7:30:36 pm
UUID: f3afeebc-8807-4d18-9be2-682516bba31d
Ancestors: CMakeVMMaker-IgorStasenko.104
- cherry-pick from StasenkoIgor.104 (mistaken with autor name)
Hi Esteban:
I have some trouble here with the Mac VM on the command-line.
Using 5.7.4.1 like this:
/Applications/Squeak\ 5.7.4.1.app/Contents/MacOS/Squeak Pharo-1.2.image
results in a file dialog popping up instead of the image. And even worse, when I chose cancel the VM freezes.
The behavior on 5.8b12 is identical, but the Cog VM does not freeze on cancel.
Using absolute paths (also ~/tmp/pharo/Pharo-1.2.image is ok) works.
Ok, so far, that was already my problem yesterday.
Really new today is my next issue, headless operation:
/Applications/Squeak\ 5.7.4.1.app/Contents/MacOS/Squeak -headless ~/tmp/pharo/Pharo-1.2.image
Without -headless it works just fine, with -headless, it pops up a file dialog again.
Is that know, or are there any work-arounds/newer VMs I should use?
Thanks
Stefan
--
Stefan Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
http://soft.vub.ac.be/~smarr
Phone: +32 2 629 2974
Fax: +32 2 629 3525
Mariano Martínez Peck uploaded a new version of CMakeVMMaker to project VM Maker:
http://www.squeaksource.com/VMMaker/CMakeVMMaker-MarianoMartinezPeck.98.mcz
==================== Summary ====================
Name: CMakeVMMaker-MarianoMartinezPeck.98
Author: MarianoMartinezPeck
Time: 24 April 2011, 3:36:42 pm
UUID: 9ef4a7be-69b4-4e26-b233-6d2e10d5ae98
Ancestors: CMakeVMMaker-MarianoMartinezPeck.97
Improve a little bit more all the class comments
Mariano Martínez Peck uploaded a new version of CMakeVMMaker to project VM Maker:
http://www.squeaksource.com/VMMaker/CMakeVMMaker-MarianoMartinezPeck.101.mcz
==================== Summary ====================
Name: CMakeVMMaker-MarianoMartinezPeck.101
Author: MarianoMartinezPeck
Time: 26 April 2011, 9:05:56 pm
UUID: dbd0f91c-8ff6-450a-9b93-7af3d3aa7dcd
Ancestors: CMakeVMMaker-MarianoMartinezPeck.100
Finally fix the problem with asserts:
For release confs:
a) turn debugging off (-DDEBUGVM=0)
b) suppress assertions (-DNDEBUG)
For debugging debug confs:
a) turn all debugging on (-DDEBUGVM=1)
b) enable assertions (omit defining -DNDEBUG)
Mariano Martínez Peck uploaded a new version of CMakeVMMaker to project VM Maker:
http://www.squeaksource.com/VMMaker/CMakeVMMaker-MarianoMartinezPeck.100.mcz
==================== Summary ====================
Name: CMakeVMMaker-MarianoMartinezPeck.100
Author: MarianoMartinezPeck
Time: 26 April 2011, 8:43:31 pm
UUID: 394701c5-bcc1-4f28-a1ee-c7b7aa5b140b
Ancestors: CMakeVMMaker-MarianoMartinezPeck.99
Removed -fomit-frame-pointer from Mac targets
Mariano Martínez Peck uploaded a new version of CMakeVMMaker to project VM Maker:
http://www.squeaksource.com/VMMaker/CMakeVMMaker-MarianoMartinezPeck.99.mcz
==================== Summary ====================
Name: CMakeVMMaker-MarianoMartinezPeck.99
Author: MarianoMartinezPeck
Time: 25 April 2011, 11:59:27 pm
UUID: 8d128d7d-fdc5-44b2-a023-a31f70e308d9
Ancestors: CMakeVMMaker-MarianoMartinezPeck.98
remove again -fomit-frame-pointer from debug confs
Hi,
Is there a possibility to have any sort of answer on this topic?
It looks to me like this bug is critical given that it prevents us to work with images larger than some 200M.
Cheers,
Tudor
On 16 May 2011, at 11:06, Tudor Girba wrote:
> Hi Igor,
>
> Thanks a lot for looking into this. For us (around Moose), this is a critical issue because we play with our models in memory and regularly have images of several hundred megabytes. While most of us work on Mac without a problem, some other people work on Windows and this is a bottleneck.
>
> Unfortunately, I do not have enough know-how to dive into the VM, but I would be gladly help in any way I can.
>
> Cheers,
> Doru
>
>
> On 16 May 2011, at 10:50, Igor Stasenko wrote:
>
>> On 10 May 2011 09:34, Tudor Girba <tudor.girba(a)gmail.com> wrote:
>>> Hi,
>>>
>>> I am back with some more input on the matter. We played with it, and found that basically any image that goes beyond something like 200MB limit (or maybe it's the number of objects), will not open on Windows.
>>>
>>> I would need some help on this. Has nobody else hit this wall, or is it that I am doing something wrong?
>>>
>>> One scenario that we used to reproduce the problem looks like this:
>>> 1. Take a Moose image:
>>> http://hudson.moosetechnology.org/job/moose-latest-dev/lastSuccessfulBuild/…
>>> 2. Run:
>>> 1 to: 3 do: [ :i | MooseScripts createModelForConfigurationOfMoose ]
>>> This will basically create some 850000 objects and will get the image to some 400+MB
>>> 3. Save and quit the image
>>> 4. Reopen it
>>>
>>> A ready-made image with the result of this can be found here:
>>> http://dl.dropbox.com/u/18323746/Tmp/moose-case-study-windows-problem.zip
>>>
>>> This works well on Mac, but on Windows when you reopen the image, you get the out of memory message.
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>
>> I using latest VMs built by cmake on windows, and everytime i run this image,
>> it opens a 'Space is low' dialog and then image not reacting on anything.
>> VM not crashing however and responds to windows events.. But because
>> UI process is broken
>> an image simply not reacts to anything.
>>
>>
>> I think that the problem is that this dialog are shown at early image
>> startup time,
>> before everything is properly initialized, and because of that UI
>> stalls somewhere.
>>
>>
>> Next things which i tried is to increase a virtual memory limit in
>> sqWin32Alloc.h
>>
>> #ifndef MAX_VIRTUAL_MEMORY
>> #define MAX_VIRTUAL_MEMORY 512*1024*1024
>> #endif
>>
>> first i raised it to 768 Mbytes.. same behavior.
>> then i raised it to 1Gb and again same behavior..
>>
>> So, either this constant is overridden somewhere or it actually
>> doesn't affecting the low-space detection mechanism as i would expect.
>> Any suggestions?
>>
>>
>> I will continue looking , what happens on VM side,
>> but in addition to that, i think we should do something on image side as well:
>> - a low space watcher should not pop up before passing image startup,
>> because if preempted process is UI process (and in 99.99% cases it is),
>> then it means that low space watcher blocks UI process and as a consequence,
>> your image stops handling events.
>>
>>
>> Also, i thinking about different approach for signaling a low space condition.
>> Instead of signaling a low space semaphore, what VM could do is to
>> fail an allocation primitive
>> and set the error code to "low memory warning"
>> then a primitive failure code could actually throw an exception, which
>> then could be handled as usual...
>> so you could write a code, like:
>>
>> [ self allocateSomethingReallyHuge ] on: LowMemoryWarning do: [:err |
>> self shouldWeReallyCare ifFalse: [ self tellVMThatItsOk. err resume ]
>> ifTrue: [ err pass ]
>> ]
>>
>> Because by preempting a currently active process, which "possibly"
>> causing a memory problems is not a solution,
>> as you can see, if it happens during startup phase, then you it just
>> stucks and image hangs.
>> But if we could use exceptions, we could just ignore this warning (or
>> do something else) during image startup,
>> instead of blocking UI process , showing a useless popup message and
>> letting image hang like that.
>>
>> --
>> Best regards,
>> Igor Stasenko AKA sig.
>
> --
> www.tudorgirba.com
>
> "If you interrupt the barber while he is cutting your hair,
> you will end up with a messy haircut."
>
--
www.tudorgirba.com
"Obvious things are difficult to teach."
>But I guess that should crash.
Try to debug using a #halt:
(FooClass >> #foo) halt valueWithReceiver: inst arguments: #()
This will crash the debugger with an bounds error.
Now put an additionall "self halt" into #foo as the first line
foo
self halt.
Transcript show: var5 asString.
You will now notice that the debugger works and you can step
through. There it jumps from #withArgs:executeMethod:
(which is implemented in primitive 188) directly into #foo.
You will end up in #foo with inst as receiver and the debugger
shows that it was called on AnotherClass but found in FooClass.
see the top line of the stack:
AnotherClass(FooClass)>>foo
But AnotherClass is not a subclass of FooClass so there are more
side effects.
So I guess primitive 188 does not do any checking and
later a random value is returned depending on what is in memory.
But I can only guess...
Bye
T.
--
NEU: FreePhone - kostenlos mobil telefonieren und surfen!
Jetzt informieren: http://www.gmx.net/de/go/freephone
The 10th International Conference on Creating,
Connecting and Collaborating through Computing (C5 2012)
18-20 January 2012
Playa Vista, CA USA
http://www.cm.is.ritsumei.ac.jp/c5-12/
Hosted by the USC Institute for Creative Technologies
http://www.ict.usc.edu
Computers, networks, and other forms of technology are pervasive in our
information-based society. Unfortunately, most users of this technology use
it for passive consumption of information and entertainment. To evolve into a
true knowledge society it is critical that we transform computer-based human
activities to engage users in the active process of creating, connecting, and
collaborating together.
The C5 conference is for anyone interested in the use of computers as tools to
develop and enable user-oriented creation, connection, and collaboration
processes. Researchers, developers, educators and users come together at C5
to present new and ongoing work and to discuss future directions for creative
computing and multimedia environments. We welcome the submission of
theoretical and technical papers, practitioner/experience reports, and papers
that bridge the gap between theory and practice or that encourage inter- and
cross-disciplinary study.
=== Keynote Speakers ===
"Helping Everyone Create with Computing"
Dr. Mark Guzdial
Georgia Institute of Technology
"C2P3: Creating and Controlling Personalisation
and Privacy in Pervasive Digital Ecosystems"
Dr. Judy Kay
University of Sydney
=== Topics ===
C5 invites submissions of full papers in (but not limited to) the following
areas:
- Technology-enhanced human-computer and human-human interaction
and collaboration
- Virtual worlds and immersive environments
- Educational environments for classroom, field work and online/distance
learning
- New technologies for literature, music and the visual arts
- Technologies for collaborative and self-empowered learning
- Multimedia authoring environments
- Gaming/entertainment platforms, virtual characters, and software
infrastructure
- Social networks and social networking
- Novel programming paradigms and languages for implementors
- Scripting or visual paradigms and languages for end-users
- Creating and maintaining online communities
- Tools for creating/managing online services/environments
- Distributed and collaborative working
- Social and cultural implications of new technologies
Papers should be submitted electronically in PDF format via EasyChair at:
https://www.easychair.org/conferences/?conf=c512
Submissions must be written in English (the official language of the
conference) and must not exceed eight (8) pages. They should use the IEEE
10-point two-column format, templates for which are available at:
http://www.computer.org/portal/web/cscps/home
=== Proceedings ===
A preliminary version of the proceedings will be distributed during the
conference. The formal version of the proceedings will be published by the
Conference Publishing Services (CPS) and sent to authors after the conference.
For each accepted paper, at least one of the authors needs to attend the
conference and deliver the presentation; otherwise the paper will not be
included in the formal proceedings.
=== Dates ===
Submission of papers: October 7, 2011
Author notification: November 18, 2011
Camera-ready copy: December 16, 2011
Conference: January 18-20, 2012
http://people.ict.usc.edu/~lane/C5/C5-12-CFP.pdf