Recent

Author Topic: TAutoObjectFactory.Create causes A/V under Win64  (Read 33138 times)

Paul Ishenin

  • Sr. Member
  • ****
  • Posts: 274
Re: TAutoObjectFactory.Create causes A/V under Win64
« Reply #30 on: March 13, 2010, 10:26:16 am »
I think the problem is that you did not update fpcres tool. I needs to be recomiled and replaced too.

jagorath

  • New Member
  • *
  • Posts: 34
Re: TAutoObjectFactory.Create causes A/V under Win64
« Reply #31 on: March 13, 2010, 06:28:29 pm »
Yes, that could be.  I use "make clean all" in the fpc folder, "make cycle" in the compiler folder and "make install" in the fpc folder again when recompiling, what do I have to do to update fpcres?
« Last Edit: March 13, 2010, 06:30:03 pm by jagorath »

Paul Ishenin

  • Sr. Member
  • ****
  • Posts: 274
Re: TAutoObjectFactory.Create causes A/V under Win64
« Reply #32 on: March 14, 2010, 01:14:34 am »
Seems you already do too much :)

make clean all - already compile everything, so make cycle is not required. If you on windows then make install requires some arguments to install properly.

Look at fpcres in your bin folder. Is it uptodate (have the same time as compiler)? If not then look at fpc\utils\fpcres\ - you need to build that utility and replace one from the bin folder.

jagorath

  • New Member
  • *
  • Posts: 34
Re: TAutoObjectFactory.Create causes A/V under Win64
« Reply #33 on: March 15, 2010, 06:06:39 pm »
fpcres seems to be up to date.  I've noticed that I have to manually add gorc.exe to the compiler bin folder, otherwise the compilation fails.  Do I have to configure Lazarus to use fpcres.exe instead of gorc.exe?  How is this done?

Paul Ishenin

  • Sr. Member
  • ****
  • Posts: 274
Re: TAutoObjectFactory.Create causes A/V under Win64
« Reply #34 on: March 16, 2010, 12:57:16 am »
No. Compiler decies itself whether to use fpcres or gorc. It needs gorc only to compile .rc files. {$R} for other types of resources (lfm/dfm/xfm and tlb now) uses fpcres.

jagorath

  • New Member
  • *
  • Posts: 34
Re: TAutoObjectFactory.Create causes A/V under Win64
« Reply #35 on: March 16, 2010, 09:38:47 pm »
Ok Paul, here's the deal.  When I originally checked out the fpc sources I made an fpc folder then individually checked out the utils, compiler, rtl etc folders within the fpc folder.  When I did an update I updated the fpc folder, thinking that the subfolders would be updated too.  They aren't. 

I've updated them all now and recompiled and the autotest I submitted is able to link it in and register properly.  My project links it in but isn't able to register, not sure why yet.

Paul Ishenin

  • Sr. Member
  • ****
  • Posts: 274
Re: TAutoObjectFactory.Create causes A/V under Win64
« Reply #36 on: March 16, 2010, 10:40:34 pm »
Thanks for testing. Hope you will find an answer.

Paul Ishenin

  • Sr. Member
  • ****
  • Posts: 274
Re: TAutoObjectFactory.Create causes A/V under Win64
« Reply #37 on: March 17, 2010, 02:01:44 am »
Btw, not able to register. You mean by regsvr32? If so then I succesfully registered your library by "regsvr32 autotest.dll" on windows xp 32bit.

jagorath

  • New Member
  • *
  • Posts: 34
Re: TAutoObjectFactory.Create causes A/V under Win64
« Reply #38 on: March 17, 2010, 02:54:16 am »
Yes, tregsvr32.  I got it to work with the autotest.dll too, just not my project although it works when you use {.$R *.res *.rc} method.   Probably some thing wrong with my code, I'll let you know if I find out anything.  Thanks again for the help and patience.

Paul Ishenin

  • Sr. Member
  • ****
  • Posts: 274
Re: TAutoObjectFactory.Create causes A/V under Win64
« Reply #39 on: March 17, 2010, 01:51:24 pm »
actually {.$R} does not do anything because of the point in the beginning. Anyway, I'm ready to research if this is tbl linking problem and you upload your test to the tracker.

Btw, since today fpc also supports {$VARPROPSETTER ON} which was used in your test. I suppose you have properties with setters which have var arguments or delphi inserts that directive by default?

jagorath

  • New Member
  • *
  • Posts: 34
Re: TAutoObjectFactory.Create causes A/V under Win64
« Reply #40 on: March 22, 2010, 08:39:02 am »
I will try to update fpc tomorrow, see if the VARPROPSETTER support changes anything.  I would upload a project including the problem tlb but it's sensitive info, my boss might get mad  :)

The VARPROPSETTER flag is automatically inserted by Delphi.

I was just using the dot in {.$R TLB} to allow it to be easily commented & uncommented for testing.

Paul Ishenin

  • Sr. Member
  • ****
  • Posts: 274
Re: TAutoObjectFactory.Create causes A/V under Win64
« Reply #41 on: March 22, 2010, 01:20:01 pm »
If this is sensitive info then send it to paul.ishenin at gmail dot com. I will not spread it. VARPROPSETTER is needed if you are using something like:

function GetMyProp: SomeType;
procedure SetMyProp(var Value: SomeType);
property MyProp: SomeType read GetMyProp write SetMyProp;

jagorath

  • New Member
  • *
  • Posts: 34
Re: TAutoObjectFactory.Create causes A/V under Win64
« Reply #42 on: March 24, 2010, 10:42:22 pm »
No need - it works now. 

It didn't make any sense anyway that once it was linked in via {$R *.tlb} it couldn't register it but when you used {$R 'libresources.res' 'libresources.rc'} it would register.  I must have had paths or something messed up.

Case closed!

 

TinyPortal © 2005-2018