[fpc-pascal] Mozilla XPCOM
Michael Van Canneyt
michael at freepascal.org
Thu Jun 3 08:55:47 CEST 2010
Hi,
Are you cooperating with Phil on this ?
When I was debugging it (linux 64 bit) , the whole application stopped on a
floating point error somewhere in mozilla's Javascript engine; I never got
around to debugging that.
Have you seen this error too, or does the .GetServiceByContractID stop
already before this ?
Michael.
On Thu, 3 Jun 2010, José Mejuto wrote:
> Hello FPC-Pascal,
>
> I'm trying to make the Gecko engine port compile in Ubuntu. It
> currently works in Win32 without problems, but in Ubuntu I had found a
> strange problem that could be related to fpc or not.
>
> Mozilla XPCOM is more or less based in COM interfaces, so in simple
> words, the code loads the libxpcom.so file, get some function pointers
> from it and call a function that returns an interface and later this
> interface is used to create a new interface. Example:
>
> var
> ServiceManager: nsIServiceManager;
> WindowWatcher: nsIWindowWatcher;
> begin
> xpcomfuncGetServicemanager(ServiceManager);
> ServiceManager.GetServiceByContractID('@mozilla/...;1',nsIWindowWatcher,WindowWatcher);
> end;
>
> Everything seems to work up to this point, where something strange
> happends, I get the ServiceManager interface and it looks fine, up to
> where gdb let me see (non nil) and when calling
> .GetServiceByContractID execution stops, but it stops "clean", no
> SIGSGV, no exception, nothing. My first idea was that the function due
> some kind of error calls halt or any processor instruction that
> cancels execution, but when compiled with heaptrc I get the heaptrc
> dump, which should not happend if the stop were abnormal.
>
> All interfaces are safecall and I'm using up to date fpc 2.5.1.
>
> Does anybody have a remote idea of what could be happening ? Any idea
> about how to debug the reason of the sudden stop ? Maybe COM style
> interfaces can not be used in Linux ?
>
> If anybody wants to try it in the own computer I can upload the
> current version to the Lazarus CCR "gecko port", the current one does
> not compile in Linux, only win32.
>
> --
> Best regards,
> José
>
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
More information about the fpc-pascal
mailing list