Recent

Author Topic: Lazarus+FPC application bad crash on WinCE  (Read 107895 times)

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Lazarus+FPC application bad crash on WinCE
« Reply #60 on: March 11, 2010, 05:00:02 pm »
Or some stack gets overwritten, so it returns "execution" to these variable locations

But what would be the top instruction then? MsgWaitFor with all parameters constant doesn't bring any call except for the operating system.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2583
Re: Lazarus+FPC application bad crash on WinCE
« Reply #61 on: March 11, 2010, 05:09:51 pm »
You're right.
Maybe the calling convention of the params of MsgWaitFor got changed, but then you should see this more often.

I'm lost.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

chrgra

  • Jr. Member
  • **
  • Posts: 69
Re: Lazarus+FPC application bad crash on WinCE
« Reply #62 on: March 15, 2010, 10:03:20 pm »
Hello,

I cannot test  Lazarus 0.9.26+FPC 2.2.0 for wince, because the lcl needs a least fpc 2.2.1 (according to the sources)
I also did not manage to test Lazarus 09.24 with FPC 2.2.2.

I'm sorry for that.

What I also did (And it did NOT solve te issue)  Backporting the current winceobj.inc  and interfaces.pp to the version used in 09.24.

Someone got any idea?

Regards Chris Gradussen


chrgra

  • Jr. Member
  • **
  • Posts: 69
Re: Lazarus+FPC application bad crash on WinCE
« Reply #63 on: March 23, 2010, 11:01:54 am »
I want to test old snapshots to see where it went wrong between 09.24 and 09.26.

Can any one give me a link for example to the wiki for howto:
1) download the old snapshots from svn
2) build lazarus from the old snapshots

I always used the prebuild snapshots before.

Regards Chris Gradussen

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Lazarus+FPC application bad crash on WinCE
« Reply #64 on: March 24, 2010, 12:31:46 pm »
I think the best would be if you use subversion instead. The steps are the following:

1> Install tortoise svn and use it to download the latest lazarus using svn checkout:
http://wiki.lazarus.freepascal.org/Getting_Lazarus#Development_versions_from_SVN
and http://wiki.lazarus.freepascal.org/Getting_Lazarus#Using_TortoiseSVN_for_Windows

This would go for example into C:\Programas\lazarussvn

2> Install Lazarus 0.9.24+wince addon to get the FPC 2.2.0 for WinCE compiler, for example into C:\Programas\lazarus26

3> Install Lazarus 0.9.26+wince addon to get the FPC 2.2.2 for WinCE compiler, for example into C:\Programas\lazarus26

4> Change your Lazarus SVN version to a version that you can compile. For example revision 16881 (=0.9.26) to build Lazarus with FPC 2.2.2

You can check revisions of releases here:
http://svn.freepascal.org/cgi-bin/viewvc.cgi/tags/?root=lazarus

There is a command in TOrtoise SVN "Update to Revision" or something

5> Build your IDE, create a batch script in C:\Programas\lazarussvn like this one and run it to build your IDE:

set path=C:\Programas\lazarus26\fpc\2.2.2\bin\i386-win32
make bigide
pause

Change the path to reflect your path and lazarus and fpc versions

6> Open your SVN IDE, from now on you can build just the LCL for each test you make and build it using the dialog Configure Build Lazarus in the IDE. You can configure which FPC to use in the configuration dialogs of this IDE

7> Test revisions between 12750 and 16881 and with different FPC version. I'm not sure in which revisions which FPC works or when FPC 2.2.0 support was removed, need to check this.

This should give you a start =) Latter I can help more, or ask if you have trouble in any of the steps.

chrgra

  • Jr. Member
  • **
  • Posts: 69
Re: Lazarus+FPC application bad crash on WinCE
« Reply #65 on: March 26, 2010, 11:09:08 pm »
Pfoe,

That's a pitty. I think I need some help.

What I can
1) Downloading a svn version from lazarus
2) downloading a fpc 'package' for win32
3) building a lazarus svn with a 'compatible' fpc version

What I can't
1) Building fpc to make the wince part (I can download a package, but that is also for the lazarus part and that is not good to find the buggy change)
2) building fpc from source at all  :o

So please give me the right hints.

Regards Chris



felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Lazarus+FPC application bad crash on WinCE
« Reply #66 on: March 27, 2010, 01:39:04 pm »
Ah ... better skip compiling FPC from source completely for now, what we need is a Lazarus revision between Laz 0.9.24 and 0.9.26 which builds with both FPC 2.2.0 and FPC 2.2.2

With this revision found then we can build it with FPC 2.2.0 and FPC 2.2.2 and if it works with FPC 2.2.0 but not with FPC 2.2.2 we have proved that this is a compiler issue between those 2 exact versions.

Then we can use this revision to test FPC subversion versions, but that's another step, let's first make the first step and latter come to this.

chrgra

  • Jr. Member
  • **
  • Posts: 69
Re: Lazarus+FPC application bad crash on WinCE
« Reply #67 on: April 29, 2010, 07:05:42 pm »
Hello,

Today I had finally time to install the latest lazarus with fpgui so I could compile some example applications.

This because I think fpgui does not make use of the lcl.

Starting application on my  mobile (with hardware keyboard!!!!). Enabling network and..... application will crash.

Conclusion fpc 2.2.0 for wince is the latest 'stable' release for wince, but fpgui and kolce will not work with it.

I think it has to deal with te buildin keyboard..., but of course I'm not sure of it.

It's a pitty, but I don't have the skills to dig deeper with this issue :'(

Regards Chris Gradussen

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Lazarus+FPC application bad crash on WinCE
« Reply #68 on: April 30, 2010, 10:34:16 am »
Hello,

Could you also test the latest trunk Lazarus with Free Pascal 2.2.4? You can get this FPC version it by installing Lazarus 0.9.28.2 I think.

I have added support for FPC 2.2.4 in the latest Lazarus trunk, I am also checking the possibility of adding support for FPC 2.2.2 and FPC 2.2.0. That should let us test the same code base with various FPC versions so that we are 100% where the problem is and then we can try to find out what broke this.

thanks,

chrgra

  • Jr. Member
  • **
  • Posts: 69
Re: Lazarus+FPC application bad crash on WinCE
« Reply #69 on: April 30, 2010, 06:00:23 pm »
Felipe,

I first installed 0.9.28.2 and the wince part.
Then I installed trunk 0.9.29-25075 (of course te fpc of 0.9.28.2 will  be used aka version 2.2.4)

i tried to build a new project.

Then I got the error  message: "The project uses the new FPC resources, which requires at least fpc 2.4"

any hint?

Regards Chris

Zaher

  • Hero Member
  • *****
  • Posts: 680
    • parmaja.org
Re: Lazarus+FPC application bad crash on WinCE
« Reply #70 on: April 30, 2010, 06:31:55 pm »
As i know, the trunk of Lazarus not work with fpc 2.2 it is need 2.4

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Lazarus+FPC application bad crash on WinCE
« Reply #71 on: May 01, 2010, 10:14:54 am »
Then I got the error  message: "The project uses the new FPC resources, which requires at least fpc 2.4" any hint?

You can choose if you want to use new FPC resources or not. To use FPC 2.2.x you can't use them. Go to the menu:

Project --> Project Options --> Miscelaneous

Choose the options "LRS Include Files"

I think it doesn't fix the source code. You need to remove the {$R MyForm.lfm} and add in the end:

initialization
  {$I MyForm.lrs}
end.

And try again.

As i know, the trunk of Lazarus not work with fpc 2.2 it is need 2.4

I added support for FPC 2.2.4 some days again, but only for Windows CE.
« Last Edit: May 01, 2010, 10:16:37 am by felipemdc »

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Lazarus+FPC application bad crash on WinCE
« Reply #72 on: May 01, 2010, 10:48:41 am »
Now I added support to FPC 2.2.2 and FPC 2.2.0 too. The best would be if you take tomorrows snapshot code base, which has this newer modifications and then test it against:

* FPC 2.2.4 (from Lazarus 0.9.28.2)
* FPC 2.2.2 (from Lazarus 0.9.26.2)
* FPC 2.2.0 (from Lazarus 0.9.24)

This way the exact same code base would be used and we can start checking which modification caused the problem.

chrgra

  • Jr. Member
  • **
  • Posts: 69
Re: Lazarus+FPC application bad crash on WinCE
« Reply #73 on: May 02, 2010, 10:01:04 pm »
Hi,

I managed to compile a simple form in snapshot 0.9.29-25120 with fpc 2.20, 2.2.2 and 2.41. The other versions of fpc are not of interest because 2.2.0 works ok and 2.2.2 not.

2 remarks from me
1) not activating/deactivating  wirelss causes the crash. But physical connect/disconnect to a wireless network.
2) i believe only pda's /phones with extra hardware (for example a hardware keyboard) are dealing with this issue.

When using older versions of fpc. I get the following annoying error message time after time when changinge/adding something into the designer.

Error reading Form1.LCLVersion: Unknown property: "LCLVersion".

For me the workaround is :
1) Show the lfm source as text
2) Remove het line with  LCLVersion
3) Save the lfm

Do you have a better have a workaround for this?

Regards Chris Gradussen

Zaher

  • Hero Member
  • *****
  • Posts: 680
    • parmaja.org
Re: Lazarus+FPC application bad crash on WinCE
« Reply #74 on: May 03, 2010, 04:39:53 am »
What you mean "But physical connect/disconnect to a wireless network"

 

TinyPortal © 2005-2018