[sqlite] Malloc getting segmentation fault in sqlite

2015-12-26 Thread Bart Smissaert
26 December, 2015 12:55 > > To: General Discussion of SQLite Database > > Subject: Re: [sqlite] Malloc getting segmentation fault in sqlite > > > > Not sure, what is instrumented? > > > > RBS > > On 26 Dec 2015 7:52 pm, "Keith Medcalf"

[sqlite] Malloc getting segmentation fault in sqlite

2015-12-26 Thread Bart Smissaert
nglists.sqlite.org] On Behalf Of Bart Smissaert > > Sent: Saturday, 26 December, 2015 12:33 > > To: SQLite mailing list > > Subject: Re: [sqlite] Malloc getting segmentation fault in sqlite > > > > VB6 is the original Visual Basic, unfortunately ditched by MS some years >

[sqlite] Malloc getting segmentation fault in sqlite

2015-12-26 Thread Bart Smissaert
VB6 is the original Visual Basic, unfortunately ditched by MS some years ago and replaced by .Net. Yes, I am sure it is some kind of memory problem, but where (what line) could it possibly occur? All I can think of is this line: sqlite3_result_text lPtr_ObjContext, VarPtr(arrBytes1(0)), lPos - 1,

[sqlite] Malloc getting segmentation fault in sqlite

2015-12-26 Thread Simon Slavin
On 26 Dec 2015, at 5:23pm, Bart Smissaert wrote: >> all is perfectly fine when the SQL statement has only one UDF in it > > Just a correction on this. Have now also seen problems when there is only > one UDF in the SQL statement. > It is not entirely predictable, so sometimes get crash and on o

[sqlite] Malloc getting segmentation fault in sqlite

2015-12-26 Thread Bart Smissaert
> all is perfectly fine when the SQL statement has only one UDF in it Just a correction on this. Have now also seen problems when there is only one UDF in the SQL statement. It is not entirely predictable, so sometimes get crash and on other occasions I don't. RBS On Fri, Dec 25, 2015 at 12:31 P

[sqlite] Malloc getting segmentation fault in sqlite

2015-12-26 Thread Keith Medcalf
rt > Sent: Saturday, 26 December, 2015 12:55 > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Malloc getting segmentation fault in sqlite > > Not sure, what is instrumented? > > RBS > On 26 Dec 2015 7:52 pm, "Keith Medcalf" wrote: > > >

[sqlite] Malloc getting segmentation fault in sqlite

2015-12-26 Thread Keith Medcalf
bject: Re: [sqlite] Malloc getting segmentation fault in sqlite > > VB6 is the original Visual Basic, unfortunately ditched by MS some years > ago and replaced by .Net. > > Yes, I am sure it is some kind of memory problem, but where (what line) > could it possibly occu

[sqlite] Malloc getting segmentation fault in sqlite

2015-12-25 Thread Bart Smissaert
Thanks for that. I do have a simple stdcall dll that sits in between my VB6 ActiveX dll and sqlite3.dll This does nil else than simply things like this: SQLITE3_STDCALL_API int __stdcall sqlite3_stdcall_column_count(sqlite3_stmt* pStmt) { return sqlite3_column_count(pStmt); } So, that takes c

[sqlite] Malloc getting segmentation fault in sqlite

2015-12-25 Thread Bart Smissaert
Thanks for clearing that up. I know all this has very little to do with SQLite, but people using SQLite with VB6 or VBA might be interested in this. What puzzles me that all is perfectly fine when the SQL statement has only one UDF in it, but there is a serious problem when there are two in that sa

[sqlite] Malloc getting segmentation fault in sqlite

2015-12-24 Thread Dan Kennedy
On 12/24/2015 05:02 PM, santosh dasimanth wrote: > Hi All, > I am working on Sqlite in multi threaded environment on ARM v7 platform. > > I am facing problems with malloc() function returning segmentation fault. > The problem is not frequent but out of 100 times am getting this once. > > The backtr

[sqlite] Malloc getting segmentation fault in sqlite

2015-12-24 Thread Bart Smissaert
I have no problems at all with sqlite3_bind, but I understand that the sqlite3_result group of procedures is very similar to sqlite3_bind group. In a UDF procedure (callback procedure in the ActiveX dll) I do things like this: sqlite3_result_text lPtr_ObjContext, VarPtr(arrBytes1(0)), lPos - 1, S

[sqlite] Malloc getting segmentation fault in sqlite

2015-12-24 Thread Simon Slavin
On 24 Dec 2015, at 9:10pm, Bart Smissaert wrote: > Given that I don't use theses it then likely that my problem is to do with > a buffer overwrite? You say you use sqlite3_bind(). See the details about the fifth parameter in A common mistake is t

[sqlite] Malloc getting segmentation fault in sqlite

2015-12-24 Thread Bart Smissaert
OK, thanks I don't use any of 1 to 3, I only use the standard SQLite functions such as sqlite3_open_v2, sqlite3_prepare16_v2, sqlite3_step, sqlite3_bind, sqlite3_column, sqlite3_create_function_v2, sqlite3_finalize, sqlite3_reset, sqlite3_result, sqlite3_value and qlite3_close. So, in that case I d

[sqlite] Malloc getting segmentation fault in sqlite

2015-12-24 Thread Bart Smissaert
I am interested in this as I have bug that I am sure is to do with some sort of memory problem. It only occurs when I run a procedure defined with sqlite3_create_function. This procedure is not in sqlite3.dll but in a VB6 ActiveX dll. I use the unaltered Windows sqlite3.dll. My question is if there

[sqlite] Malloc getting segmentation fault in sqlite

2015-12-24 Thread Richard Hipp
On 12/24/15, Bart Smissaert wrote: > I have no problems at all with sqlite3_bind, but I understand that the > sqlite3_result group of procedures is very similar to sqlite3_bind group. > > In a UDF procedure (callback procedure in the ActiveX dll) I do things like > this: > > sqlite3_result_text lP

[sqlite] Malloc getting segmentation fault in sqlite

2015-12-24 Thread Richard Hipp
On 12/24/15, Bart Smissaert wrote: > My question is if there is ever any need in this situation to run one of > the sqlite3 memory procedures, that is > sqlite3_free, sqlite3_malloc or sqlite3_realloc? > Currently I am not using this anywhere in my VB6 code. > Should I? Cases when you might use s

[sqlite] Malloc getting segmentation fault in sqlite

2015-12-24 Thread santosh dasimanth
Hi All, I am working on Sqlite in multi threaded environment on ARM v7 platform. I am facing problems with malloc() function returning segmentation fault. The problem is not frequent but out of 100 times am getting this once. The backtrace is pasted below. (gdb) bt #0 0x4038eb18 in malloc () fr

[sqlite] Malloc getting segmentation fault in sqlite

2015-12-24 Thread Joe Mistachkin
It's been quite a long while since I used vb6 on a regular basis; however, integrating with native DLLs can be quite tricky for several reasons: 1. It cannot call any native function that does not conform to the "stdcall" calling convention. 2. It has a very Win32-centric way of marshalling

[sqlite] Malloc getting segmentation fault in sqlite

2015-12-24 Thread J Decker
Yes when I free'd memory I shouldn't have and kept a reference to it in other places... or that after freeing I had modified memory. But not from sqlite itself. On Thu, Dec 24, 2015 at 2:02 AM, santosh dasimanth wrote: > Hi All, > I am working on Sqlite in multi threaded environment on ARM v7 pl