Recent

Author Topic: LAMW App Crashes on Start up  (Read 16101 times)

CC

  • Full Member
  • ***
  • Posts: 149
Re: LAMW App Crashes on Start up
« Reply #15 on: September 19, 2017, 02:50:56 pm »
One more thing:

I need both LAMW and mORMot. The problem is that mORMot requires  up to date FPC and  the FPC in Laz4Android is rather old.
I have installed Lazarus and FPC from trunk with  fpcupdeluxe, which is an other option to set up cross compilation easily.

Is there a way this path could work? Currently the compilation fails. 

Fatal: Cannot find system used by controls. Make sure all ppu files of a package are in its output directory. ppu in wrong directory=C:\fpcupdeluxe\fpc\units\arm-android\rtl\system.ppu..

The meaning of the error message is not quite clear to me, because  system.ppu does exists in C:\fpcupdeluxe\fpc\units\arm-android\rtl.


I assume compiler options may have something to do with it.

-Xd
-CfSOFT
-CpARMV6 / -CpARMV7A (tried both with clean up and build)
-XParm-linux-androideabi-
-FDC:\Android\ndk\\toolchains\arm-linux-androideabi-4.9\prebuilt\windows\bin

It would be great to have a solution to use LAMW with up to date FPC. :)
« Last Edit: September 19, 2017, 04:21:15 pm by CC »

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1738
Re: LAMW App Crashes on Start up
« Reply #16 on: September 19, 2017, 03:28:36 pm »
You're right: the mORMot does not run (yet) with Laz4Android.

And the demo-projects  of LAMW are not suitable for the arm-cross-compiler that comes with fpcupdeluxe.
At the moment, I am looking into this. Fpcupdeluxe must be able to work with LAMW ! So stay tuned.

CC

  • Full Member
  • ***
  • Posts: 149
Re: LAMW App Crashes on Start up
« Reply #17 on: September 19, 2017, 04:20:26 pm »
DonAlfredo,

great news, thanks!

CC

  • Full Member
  • ***
  • Posts: 149
Re: LAMW App Crashes on Start up
« Reply #18 on: September 20, 2017, 10:58:26 am »
jmpessoa

There is a mORMot demo app, so I assume at one point mORMot did work with LAMW and Laz4Android.  I could check out  that version to do some tests. Can you remember the approximate  date of the version you used with the demo app?
« Last Edit: September 20, 2017, 12:13:01 pm by CC »

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1738
Re: LAMW App Crashes on Start up
« Reply #19 on: September 20, 2017, 12:41:47 pm »
The mORMot demo app was made by me. And it worked very well when it was made.
However, it definitely stopped working with recent versions of LAMW, FPC and Lazarus that are installed by fpcupdeluxe (eg the cross-compiler installed by fpcupdeluxe !

Current status:

I have the app working again (setup with fpcupdeluxe).
But any app I make (with or without mORMot) crashes as soon as the layout of the visual components is changed ! The same app (without mORMot) works 100% when compiled with Laz4Android.

This is a strange error. Trying to solve.

CC

  • Full Member
  • ***
  • Posts: 149
Re: LAMW App Crashes on Start up
« Reply #20 on: September 20, 2017, 01:41:20 pm »
DonAlfredo

You are quick. :)

Which repo  has your latest fixes for FPC/Lazarus/mORMot/Possibly LAMW?

« Last Edit: September 20, 2017, 02:54:00 pm by CC »

CC

  • Full Member
  • ***
  • Posts: 149
Re: LAMW App Crashes on Start up
« Reply #21 on: September 20, 2017, 04:07:53 pm »
I have tried quite a few revisions from the mORMot  git repo with Laz4Android.  It was possible to create the apk  from some of them, but they all crashed when the SqlModel was created. Maybe it is not working with the current version of  LAMW at all.

jmpessoa

  • Hero Member
  • *****
  • Posts: 2296
Re: LAMW App Crashes on Start up
« Reply #22 on: September 21, 2017, 12:48:33 am »

Quote
Maybe it is not working with the current version of  LAMW at all...

No,  the question can be:  how [and what] fpc cross-compile you  need
to target " mORMot" ...
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

CC

  • Full Member
  • ***
  • Posts: 149
Re: LAMW App Crashes on Start up
« Reply #23 on: September 21, 2017, 11:02:07 am »
Thanks for the clarification.

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1738
Re: LAMW App Crashes on Start up
« Reply #24 on: September 21, 2017, 05:56:22 pm »
Good news !

The link contains the LAMW mORMot-sample that works with latest fpcupdeluxe and latest LAMW.
(at least on my system)

A working debug-apk is included to show you how it should work !
The database will be created in the Android Download-directory for easy inspection.

https://drive.google.com/file/d/0B96fg3TpL5RDMjZoZUlra1p3S0E/view?usp=sharing

Please note that the mORMot only works with ARMV7 "hardfloat" VFPV3.
This version is, by coincidence, also installed by fpcupdeluxe ... ;-)
« Last Edit: September 21, 2017, 06:32:45 pm by DonAlfredo »

CC

  • Full Member
  • ***
  • Posts: 149
Re: LAMW App Crashes on Start up
« Reply #25 on: September 21, 2017, 08:41:16 pm »
Wow, we are so lucky to have you here. The work you did on mORMot to make it crossplatform is amazing. :)

The APK seems to be  working. Which repos should I check out with fpcupdeluxe ?

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1738
Re: LAMW App Crashes on Start up
« Reply #26 on: September 21, 2017, 09:05:05 pm »
Just normal FPC/Lazarus trunk.
Speedbutton left-below.

CC

  • Full Member
  • ***
  • Posts: 149
Re: LAMW App Crashes on Start up
« Reply #27 on: September 22, 2017, 12:47:37 am »
The development environment is up and running now.

It is possible to compile your test project :), but building the apk   fails.

Panic: C:\A\Projects\DEMO\AppmORMotDemo1\build.xml:12: Cannot find C:\tools\ant\build.xml imported from C:\A\Projects\DEMO\AppmORMotDemo1\build.xml

Maybe a path issue? It seems as if "C:\tools\" was somehow hard-coded. (It is installed to a different directory.)

Creating an empty LAMW project works perfectly now.
« Last Edit: September 22, 2017, 01:03:45 am by CC »

jmpessoa

  • Hero Member
  • *****
  • Posts: 2296
Re: LAMW App Crashes on Start up
« Reply #28 on: September 22, 2017, 01:05:52 am »

Hi CC,

Go to folder "lazarus\config" and  check  "JNIAndroidProject.ini"
for "PathToAntBin=......."

Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

CC

  • Full Member
  • ***
  • Posts: 149
Re: LAMW App Crashes on Start up
« Reply #29 on: September 22, 2017, 01:12:45 am »
It has the real path to ant.

The problem does not occur with any other projects started from scratch, only with DonAlfredo's new mORMot  app.

 

TinyPortal © 2005-2018