View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0021208 | FPC | FCL | public | 2012-02-01 18:02 | 2012-02-06 10:13 |
Reporter | willians cleyton | Assigned To | Felipe Monteiro de Carvalho | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Fixed in Version | 3.0.0 | ||||
Summary | 0021208: Example androidlcl does not run when you add a DataSource | ||||
Description | I managed to compile the example folder androidlcl - lazarus, install and run the Android emulator with no problems. But when I add a DataSource in the example (image DataSource.JPG) and when I run the Android emulator appears the error described in the attached file adb_logcat.txt. Any idea what might be happening? | ||||
Additional Information | I used the VM available at: http://sourceforge.net/projects/p-tools/files/Lazarus_for_Android_VM_Image/snapshot_30_dez_2011/ | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 20267 | ||||
FPCOldBugId | 0 | ||||
FPCTarget | |||||
Attached Files |
|
related to | 0020726 | resolved | Thomas Schatzl | FPC | Basic support for Android |
has duplicate | 0021207 | resolved | Joost van der Sluis | Lazarus | Example androidlcl does not run when you add a DataSource |
2012-02-01 18:02
|
|
|
DataSource is from FPC, not Lazarus. Maybe someone from FPC has any idea why the DataSource would crash with runtime error 202 in Android? It would be good if someone could test it in any other arm system, maybe it crashes in all ARM CPUs. @cleyton: It would be good if you could try to resolve the addresses of the stacktrace from the error into line numbers. I don't know how to do it, however, and it might be impossible without rebuilding FPC if it crashes in side the FCL. |
|
Datasource is not really OS/arch dependent, though of course its always possible to do an unaligned load. And adding a tdatasource doesn't mean the exception is in the datasource code. Anyway, with such little information and a lazarus specific example, I don't think we can do much with it. |
|
I do not know if it helps, Using any component that has a unit in the USES clause db causes the same error. For example, I added a TDbf and the same error appears. Even without adding any components, adding only db in the USES clause the same error appears. So I think the problem relates to the unit db. |
|
Strange. Unit db does not have any initialization code Maybe related to resources or so? db uses dbconst which contains resourcestrings, or fmtbcd which has a big initialization section. Could you try to use "fmtbcd" and "dbconst", to see which one duplicates the problem? fmtbcd seems to be hardcoded in using extended. Likely candidate. |
|
I retraced the tests. The problem happens only with the UNIT fmtbcd. Is there any idea how to solve this problem? |
|
> It would be good if someone could test it in any other arm system, maybe it crashes in all ARM CPUs. Ran a small program using fmtbcd without any problem on an arm netbook running debian sid (armv5tejl). Compiler 2.6.0-1 from debian sid repository. |
|
@Ludo: Maybe it only crashes in arm libraries. Android applications are libraries, not executables. Could you check that? A simple library with an exported function + fmtbcd in the uses clause, then a program which calls it? Here is fmtbcd: http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/rtl/objpas/fmtbcd.pp?view=markup The initialization doesn't seam to have changed since january 19th 2011 |
|
Putting fmtbcd in a dll reproduces the crash. Traced into the initialization routine and the call to system_fpc_stackcheck is done immediately before any user code is executed (ie, in the code for 'initialization'). |
|
Created a simple library without any uses and it crashes in the same way when the library is compiled with -Ct. Without -Ct there is no problem. I copied fmtbcd.pp to the test lib directory and changed line 46 to {$r+,q+,s-} to turn off stack checking. Recompiled without -Ct and fmtbcd works correctly from a library. Edit: seems to be known problem. See http://free-pascal-general.1045716.n5.nabble.com/Stack-checking-in-dynamic-libraries-td2825832.html. Seems the only solution for the time being is above workaround (turn off stack checking). |
|
I removed s+ from fmtbcd in rev 20267 On the bad side this does not help much until issue 20726 is implemented. |
|
Oh, yes, and thanks a lot ludo =) |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-02-01 18:02 | willians cleyton | New Issue | |
2012-02-01 18:02 | willians cleyton | File Added: LazarusAndroid.zip | |
2012-02-01 18:02 | willians cleyton | Widgetset | => CustomDrawn |
2012-02-03 07:53 | Felipe Monteiro de Carvalho | Project | Lazarus => FPC |
2012-02-03 07:55 | Felipe Monteiro de Carvalho | Note Added: 0056276 | |
2012-02-03 07:56 | Felipe Monteiro de Carvalho | Note Edited: 0056276 | |
2012-02-03 07:56 | Felipe Monteiro de Carvalho | Status | new => acknowledged |
2012-02-03 07:56 | Felipe Monteiro de Carvalho | FPCOldBugId | => 0 |
2012-02-03 07:56 | Felipe Monteiro de Carvalho | Category | Custom Drawn => FCL |
2012-02-03 07:56 | Felipe Monteiro de Carvalho | Product Version | 0.9.30.3 (SVN) => |
2012-02-03 11:21 | Marco van de Voort | Note Added: 0056281 | |
2012-02-03 11:22 | Marco van de Voort | Note Edited: 0056281 | |
2012-02-03 11:53 | willians cleyton | Note Added: 0056286 | |
2012-02-03 12:30 | Marco van de Voort | Note Added: 0056287 | |
2012-02-03 12:30 | Marco van de Voort | Status | acknowledged => assigned |
2012-02-03 12:30 | Marco van de Voort | Assigned To | => Felipe Monteiro de Carvalho |
2012-02-03 12:32 | Marco van de Voort | Note Edited: 0056287 | |
2012-02-03 12:33 | Marco van de Voort | Note Edited: 0056287 | |
2012-02-03 19:15 | willians cleyton | Note Added: 0056293 | |
2012-02-04 08:07 | Ludo Brands | Note Added: 0056311 | |
2012-02-04 08:19 | Felipe Monteiro de Carvalho | Note Added: 0056312 | |
2012-02-04 08:19 | Felipe Monteiro de Carvalho | Note Edited: 0056312 | |
2012-02-04 08:19 | Felipe Monteiro de Carvalho | Relationship added | related to 0020726 |
2012-02-04 09:40 | Ludo Brands | Note Added: 0056313 | |
2012-02-04 10:57 | Ludo Brands | Note Added: 0056316 | |
2012-02-04 10:58 | Ludo Brands | Note Edited: 0056316 | |
2012-02-04 12:01 | Ludo Brands | Note Edited: 0056316 | |
2012-02-06 10:12 | Felipe Monteiro de Carvalho | Fixed in Revision | => 20267 |
2012-02-06 10:12 | Felipe Monteiro de Carvalho | Status | assigned => resolved |
2012-02-06 10:12 | Felipe Monteiro de Carvalho | Fixed in Version | => 2.7.1 |
2012-02-06 10:12 | Felipe Monteiro de Carvalho | Resolution | open => fixed |
2012-02-06 10:12 | Felipe Monteiro de Carvalho | Note Added: 0056564 | |
2012-02-06 10:13 | Felipe Monteiro de Carvalho | Status | resolved => feedback |
2012-02-06 10:13 | Felipe Monteiro de Carvalho | Resolution | fixed => reopened |
2012-02-06 10:13 | Felipe Monteiro de Carvalho | Note Added: 0056565 | |
2012-02-06 10:13 | Felipe Monteiro de Carvalho | Status | feedback => resolved |
2012-02-06 10:13 | Felipe Monteiro de Carvalho | Resolution | reopened => fixed |
2012-05-14 15:46 | Felipe Monteiro de Carvalho | Relationship added | has duplicate 0021207 |