Re: [fpc-pascal] Sigsegv with refcounting interface

2013-03-10 Thread Joao Morais
Sorry about breaking the thread. On Sun, Mar 10, 2013 at 3:47 PM, Joao Morais wrote: > Anyway I'd like to see some fixes in the rtl, not because of > compatibility but because of performance improvement: not declaring > refcounted parameters such as ansi strings and com interfaces will > lead to

Re: [fpc-pascal] Sigsegv with refcounting interface

2013-03-10 Thread Joao Morais
On Sat, Mar 9, 2013 at 8:33 AM, Jonas Maebe wrote: > > On 09 Mar 2013, at 02:37, Joao Morais wrote: >> >> On Fri, Mar 8, 2013 at 4:09 PM, Flávio Etrusco >> wrote: >>> >>> [...] >>> >> >> You are suggesting that this unlikely coincidente which causes a >> sigsegv should be the programmer's respons

Re: [fpc-pascal] Sigsegv with refcounting interface

2013-03-09 Thread Jonas Maebe
On 09 Mar 2013, at 02:37, Joao Morais wrote: > On Fri, Mar 8, 2013 at 4:09 PM, Flávio Etrusco > wrote: >> >>> procedure addintf(const aintf: IUnknown); >>> (...) >>>addintf(TInterfacedObject.Create); >>> (...) >> >> It's a pity, but I don't know whether it's fixable (or if needs to be >>

Re: [fpc-pascal] Sigsegv with refcounting interface

2013-03-08 Thread Joao Morais
On Fri, Mar 8, 2013 at 4:09 PM, Flávio Etrusco wrote: > >> procedure addintf(const aintf: IUnknown); >> (...) >> addintf(TInterfacedObject.Create); >> (...) > > It's a pity, but I don't know whether it's fixable (or if needs to be > "fixed") in the compiler. Works in Delphi 7 with FastMM4. >

Re: [fpc-pascal] Sigsegv with refcounting interface

2013-03-08 Thread Flávio Etrusco
> > var > vintfl: TInterfaceList; > BTW You should use a IInterfaceList variable > procedure addintf(const aintf: IUnknown); > (...) > addintf(TInterfacedObject.Create); > (...) It's a pity, but I don't know whether it's fixable (or if needs to be "fixed") in the compiler. The TInterfacedO

Re: [fpc-pascal] Sigsegv with refcounting interface

2013-03-07 Thread Joao Morais
On Thu, Mar 7, 2013 at 9:27 AM, José Mejuto wrote: > > Hello, > > AFAIK you are casting a IUnknown to iintf instead requesting the iintf > interface. I think the right procedure should be: > > v1 := vintf[0] as iintf; Hello, thanks for your reply. You are right, changing to a safe typecast, don'

Re: [fpc-pascal] Sigsegv with refcounting interface

2013-03-07 Thread José Mejuto
El 07/03/2013 12:29, Joao Morais escribió: Hello list, what's the problem with "RoundThree" procedure (below)? Here it raises a sigsegv trying to read an internal field. The difference from "RoundTwo" is that I create an implementation of the interface within the first param of tinterfacedlist.ad

[fpc-pascal] Sigsegv with refcounting interface

2013-03-07 Thread Joao Morais
Hello list, what's the problem with "RoundThree" procedure (below)? Here it raises a sigsegv trying to read an internal field. The difference from "RoundTwo" is that I create an implementation of the interface within the first param of tinterfacedlist.add method. Same problem with fpc 2.6.2 and 2.