Crash at startup with sqlite project

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Crash at startup with sqlite project

Felipe Monteiro de Carvalho
Hello,

I have a simple project with sqlite 3. It's running on Windows with
FPC 2.2.0 and svn Lazarus, and my DLL is version is 3_5_7 downloaded
from official sqlite website.

It crashes at startup at sqlite3ds.pas at:

procedure TSqlite3Dataset.InternalInitFieldDefs;
....
  sqlite3_step(vm);   // Here

With the message:

ntdll!RtlEnumerateGenericTableLikeADirectory

And this stack trace:

#0 ntdll!RtlEnumerateGenericTableLikeADirectory at :0
#1 sqlite3_mutex_enter at :0
#2 sqlite3_step at :0
#3 TSQLITE3DATASET__INTERNALINITFIELDDEFS at sqlite3ds.pas:115
#4 TCUSTOMSQLITEDATASET__INTERNALOPEN at customsqliteds.pas:845
#5 $CUSTOMSQLITEDS$_Ld21 at :0
#6 $DBCOMPONENTS$_Ld6 at :0
#7 $CUSTOMSQLITEDS$_Ld24 at :0
#8 ?? at :0
#9 TDATASET__CREATE((^TCOMPONENT) 0x7c9140bb, (POINTER) 0x1673b0) at
dataset.inc:25
#10 TCOMPONENTSDATABASE__CREATE((POINTER) 0x580774,
(TCOMPONENTSDATABASE) 0x8dae8) at dbcomponents.pas:43
#11 DBCOMPONENTS_init at dbcomponents.pas:92
#12 fpc_initializeunits at system.inc:668
#13 ?? at :0
#14 ?? at :0

The project sources can be download from sourceforge:

http://sourceforge.net/projects/turbocircuit

The strange part is that Lazarus runs fine with the sqlite package
installed and the same dll and also that I had already worked with
this project with all the same variables (except maybe sligtly
different sqlite3 version) on another windows xp machine and it all
worked fine.

Any ideas?

thanks,
--
Felipe Monteiro de Carvalho
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Crash at startup with sqlite project

denisgolovan
On Wed, Apr 02, 2008 at 08:31:01AM -0300, Felipe Monteiro de Carvalho wrote:

> Hello,
>
> I have a simple project with sqlite 3. It's running on Windows with
> FPC 2.2.0 and svn Lazarus, and my DLL is version is 3_5_7 downloaded
> from official sqlite website.
>
> It crashes at startup at sqlite3ds.pas at:
>
> procedure TSqlite3Dataset.InternalInitFieldDefs;
> ....
>   sqlite3_step(vm);   // Here
>
 
  Try using FPC svn. Several changes were commited recently.

--
Best regards,
Denis Golovan aka MageSlayer
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Crash at startup with sqlite project

Luiz Americo Pereira Camara-2
In reply to this post by Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote:
> Hello,
>
> I have a simple project with sqlite 3. It's running on Windows with
> FPC 2.2.0 and svn Lazarus, and my DLL is version is 3_5_7 downloaded
> from official sqlite website.
>
> It crashes at startup at sqlite3ds.pas at:
>
>  

> The strange part is that Lazarus runs fine with the sqlite package
> installed and the same dll and also that I had already worked with
> this project with all the same variables (except maybe sligtly
> different sqlite3 version) on another windows xp machine and it all
> worked fine.
>
> Any ideas?
>  

The db filename is hardcoded.

See
http://www.geocities.com/camara_luiz/docs/dataset/dataset-tutorial-01.html 
to know how to setup a db file dinamically

Luiz
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Crash at startup with sqlite project

Felipe Monteiro de Carvalho
On Wed, Apr 2, 2008 at 7:46 PM, Luiz Americo Pereira Camara
<[hidden email]> wrote:
>  See
> http://www.geocities.com/camara_luiz/docs/dataset/dataset-tutorial-01.html
> to know how to setup a db file dinamically

Thanks, that was indeed true, and the filename was hardcoded, but I
fixed it and the error persists ... The dataset starts not Actived
anyway, and the code to activate it isn't called in the startup.

I think I was using a more recent Free Pascal on the other computer
... I'll try with 2.2.1

--
Felipe Monteiro de Carvalho
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Crash at startup with sqlite project

Luiz Americo Pereira Camara-2
Felipe Monteiro de Carvalho wrote:

> On Wed, Apr 2, 2008 at 7:46 PM, Luiz Americo Pereira Camara
> <[hidden email]> wrote:
>  
>>  See
>> http://www.geocities.com/camara_luiz/docs/dataset/dataset-tutorial-01.html
>> to know how to setup a db file dinamically
>>    
>
> Thanks, that was indeed true, and the filename was hardcoded, but I
> fixed it and the error persists ... The dataset starts not Actived
> anyway, and the code to activate it isn't called in the startup.
>
> I think I was using a more recent Free Pascal on the other computer
> ... I'll try with 2.2.1
>  

Here works fine both with fpc 2.2.0 and with a newer sqlitedataset
version after dinamically setting the filename.

PS: With more recent versions of sqlitedataset you get meaningful error
messages.

Luiz
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal