Page 3 of 6

Posted: 09.04.2012, 21:09
by EgonHugeist
elidorio2,

this is strange. I must admit i can't help you any more. :cry:

I changed your thread toppic to clearify the problem more logical.
Let's wait for other Lazarus+PostgreSQL-users who can help and guid you better than me. Contact ism if you doubt. He has mor fpc expierences... Maybe you can help us with futher expiriences.

So we've found and solved a bug with the MSecsToTimeStamp. I small success for Zeos7. 8)

Let's wait for a LCL+PosgreSQL guru. Be patient somtimes it could take some time...

best regards,

EgonHugeist

Posted: 10.04.2012, 00:47
by elidorio2
Hello EgonHugeist,

Please do not leave me, we're getting wool.
Let's try a little more, must be something simple, with postgresql dll.
I know you can, the hardest part you've got.
If we can not resolve this problem, I'll have my Zeos goods leave the project because it must run in win 7 64.
I await your return,

hugs,

Edson

Posted: 10.04.2012, 11:55
by ism
With mysql in 64 bit win 7 program crash with 64 bit libmysql.dll

from trunk too (after correction error DateTime)

Lazarus 0.9.30.4 fpc 2.6.0

Need time and step by step tracing

Maybe problem with data types in 64 bit

Image

Posted: 10.04.2012, 19:12
by EgonHugeist
elidorio2,

it wasn't my intention to say we leave you. But we've all our day to day jobs. Actually im bussy with my private work.

possible issues we've to think about concerning this PG exception:

  1. 1. Is it possible that the pglib.dll 64Bit header has changes and we don't know it?

    2. Do we use old integers instead of pointers in our code? Here i've took a look. First impression: No. But still possible.

    3. A code snipped from PG9 64 pgtypes_interval.h:

    Code: Select all

    typedef struct
    %u7b
    #ifdef HAVE_INT64_TIMESTAMP
    	int64		time;			/* all time units other than months and years */
    #else
    	double		time;			/* all time units other than months and years */
    #endif
    	long		month;			/* months and years, after time for alignment */
    %u7d	interval;
    Which means ism is eventually right.

    4. Where, when, why happens this access violocation?

    5. If the integers are right in the plaindriver definitions than which one (2byte smallint/4byte Integer/ 8byte Int64) is in use for which function? As far as i can see (quick look) uses PostgreSQL only 2 and 4 byte integers. But this could be changed too since 64Bit.

    6. Can we keep the olp PG plaindrivers or do we need a new 64Bit one as new protocol.

    OR is it a setting problem on your computer.
My problem is that i don't have Windows64 and actually i broke with lazarus for coding because the debugger is to slow and instable (personal oppinion -> FPC is a terific thing!! And i like it.) or i use wrong settings which i don't know. Looking for such an issue blindy and no possibility for tests must going wrong. So it would be better to get help from others like ism.

Things which where helpful to know (Please answer):
Result of: SizeOf(Integer); -> 4 or 8 byte (like in XE2 64Bit here we've to use the NativeInt for 32Bit integer)
Can you access PG in Win32 with the updated sources?

ism,

a hint or more a feeling (blindy typing now) concerning MySQL64: open MySQLResultSet.pas. Look for a function InternalGetString(ColumIndex: Integer): String;
Set a breakpoint there. Is it possible that the PULong incrementing is correct but the PULong size has changed and we point to the midle of nowhere?

elidorio2, On this post you can see how complex your problem is, Edson and w'll need some time and other users to find out what's going wrong. I wish i could consider you i can do it in a half hour but again i can't test it by my selves. :(

So be patient, don't overhurry and try to help us to help you.

Best regards,

Michael

Posted: 10.04.2012, 20:04
by ism

Code: Select all

My problem is that i don't have Windows64
Do you know about Virtualbox ? https://www.virtualbox.org/wiki/Downloads

You can get win 7 64 for test http://www.microsoft.com/windows/busine ... mxid=mscom

and install in Virtualbox for test

Posted: 10.04.2012, 21:18
by EgonHugeist
ism,

Wonderfull! Started to download all the stuff.
This could solve some problems!

Thank you.

Posted: 11.04.2012, 04:13
by elidorio2
My God!

The problem is complex!
The error when trying to activate hap open the connection.

Posted: 11.04.2012, 20:17
by EgonHugeist
elidorio2,

good news. :bash: Please update your Revision to 1145. :wink:

It was more an minior issue than thought before. We wanted access the plaindrivers on ZDbcXXXConnetion.Close with several functions. But the Plaindriver isn't assigned if the dll's where not found.

Also i've tested the PG Connection in Win64+Lazarus64+FPC64 Bit everythingis fine (didn't open any tables)if the files: :cop:
libeay32.dll, libiconv-2.dll, libintl-8.dll, libpg.dll, ssleay32.dll are in your !Windows\System32! folder at designtime and/or in your application folder at runtime. :cop:

Can you confirm this :?:

And Bad news: selects don't work. Going on...

Now testing MySQL64. Thank ism for that advise. :prog2:

Best regards,

EgonHugeist

Posted: 11.04.2012, 21:20
by ism
mysql 5.5 64bit win7 64 lazarus 0.9.30.4

zconnection.connected = true

ok

ztable zquery.active=true

access violation

Posted: 11.04.2012, 21:39
by EgonHugeist
Same with PG...

Hmpf..

Posted: 11.04.2012, 22:21
by ism
I try debug in another

Image

Posted: 11.04.2012, 22:24
by ism
in ZDbcMySqlUtils.pas

Posted: 11.04.2012, 22:32
by ism
Image

Posted: 11.04.2012, 22:34
by EgonHugeist
Wasn't that the same behavoir of the wylton thread?

Posted: 11.04.2012, 22:46
by ism
Only step by step debug help

How to create visual diagram objects methods in modules ? There are utilities?