[Lazarus] TIpHtmlPanel error when showing html table
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I'm using TIpHtmlPanel to show simple html table. But always it writes this error into terminal: ERROR: [TGtk2WidgetSet.GetSysColor] Bad Value: 32. Valid Range between 0 and 31 $007C0A1D line 5137 of gtk2winapi.inc $006BA7CB line 476 of include/winapi.inc $006C1356 line 2457 of graphics.pp $008416FD line 1527 of gtk2proc.inc $00841989 line 1617 of gtk2proc.inc $00841962 line 1681 of gtk2proc.inc $007BCDFD line 3463 of gtk2winapi.inc $007C7E52 line 191 of gtk2lclintf.inc Finally it shows the table but scrolling is almost impossible. Every time I want to scroll getting the error several times. Do you have any idea what can be wrong, please? Using Lazarus 0.9.30 and fpc 2.4.0 on Ubuntu 10.04. Thank you! Petr -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJN/Je9AAoJEFxZOIHWsemFgqkH/2Hgg3ZLL6aSPhzpgDa1ytGp tgXnqm6VY9smN+3+TNxB1I+NOOnJ3lu2cUCc60hXBhBefP8rLbZaJQNh/L33hV/5 mTMpVGyah7O8ThnBgAKtO3lnpdf80TgiPSkjHwFxrP9iY0sWHf7PvYrUXnG1ddl8 F6hfGdQNDYyiu8cwNTHRWZwzC9HHofgNzpUAAWJq+SQ3OrOdrKKqrVbHaCAr6twU OPvAg6Omlwgj/NJmofHZNjqc1YxQVCdaurMv09czzNxjWZA3d2xZO8sxmb3b4gxo t8Q0mH9SvDwA2qIWX9b787No0L+teZ9ZmdID2duak7UIEE+nrxFqMI0++InQ7eg= =Qm6J -END PGP SIGNATURE- -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] How to get UTC time
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I need to get UTC time from my system. Using Ubuntu 10.04 with fpc 2.4.0. Trying this function: function utc_now : TDateTime; var timeval: TTimeVal; timezone: PTimeZone; a: Double; begin TimeZone := nil; fpGetTimeOfDay (@TimeVal, TimeZone); a := (TimeVal.tv_sec * 1000.0) + (TimeVal.tv_usec / 1000.0); Result := (a / MSecsPerDay) + UnixDateDelta; end; It's working but it returns right time only for the first time. Next calling utc_now() returns the same time as before. Does anybody know what is wrong? Thank you! Petr -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJOLBimAAoJEFxZOIHWsemF27QIAJJbhwMGligZhzA7zuwaFoc8 sJzXlIF5RNnn6Jj4cii5RtFFIe64c+3RM5lXq7mSPOX6t20KtUucG5oCe+lkekIP wQWvvwiVmEXjOazGQAW5JWRy821S5FSYTySFseqW0W6lO0Qby7duUgZMC4zJTsha DM/ZIBbvjVuNs36ckPxsYu2T+h6jqRTcqbfD1XGBnj13Zi8TjbMdOCacfZuAIxZt u8nxvLQStCl0DD7Rtx7MdSb1+Ygir0jU7/PQ/GLqpkt4P6iOAg4mE8kSpe1ZPCGi 6DlGas3cD9KnuDRg81pbslKrb1fPb0IBkj95UUAI+rZQ1F5hHXwwdD+irgz9tL8= =4WAF -END PGP SIGNATURE- -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] RE : blank window
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I have the same problem and bugreport is here: http://bugs.freepascal.org/view.php?id=21129 Every app using threads hangs when starts. Even app with simple thread and one button. If I compile the app under Ubuntu 11.10 and try to run it in 12.04, app freezes like Lazarus itself. I also tried fpc 2.6.0 from sourceforge but the problem remains the same. Petr Dne 26.1.2012 19:39, Henry Vermaak napsal(a): > On 26 January 2012 17:58, Ludo Brands wrote: >>> Further to this, the freepascal gtk2 examples appear to work >>> correctly (at least the ones that build). >>> >> >> There seems to be something seriously wrong with ubuntu precise. >> Just installed it in VM and I'm also getting just white screens >> when starting lazarus. Lazarus starts with lazarus-ide, show the >> logo correctly, says the dir is not OK and then shows all empty >> windows. Have to kill it from a terminal. Thre are a bunch of GTK >> warnings in the console about "Unable to locate theme engine in >> module_path:pixmap" I'm also running lazarus on an ARM netbook >> using debian sid. I checked a few libraries (libc, libgtk2) and >> they are the same version as in precise, bar the 'ubuntu' >> appendix. No theme engine warnings on that one. > > Hmm. All other gtk2 apps I've tried work fine, so I can't blame > precise. I don't get any warnings, though (but then I'm using > lxde, not unity). Thanks for trying this. > > Henry > -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJPIb2bAAoJEFxZOIHWsemFiOMH/iQaS9C7x8QTTTQqjKdzTPPx ZPlaCqO/E10/nNOwiemVk6/YvVfZBVN1RdhWk+67jAppnYXq1AYy7rHYBeAZzZAD YQMtxrjMTbxljn3J/hHBo4S8TEM7Ikd1eyDvS/G/MVTL92eEnJoxcqQSUcgXqU05 lqcMBFRyCia7z+K357SX3e8rLwK/FWvhV0qe1jFt/YvixPo6n8Wm/70f7L8fRaCc KG3Goc0/Imgk58RmwuT05w5LDT5WrNx0Fznfmv5zv5ZAFGf1QqVvfWWSjbZKqFWV M485k4hTXzsLMR8O4spQy5UBPRKZrAcDJrx1l0ZjLDy0UlBQLtauiw+DqFrFkZk= =+b33 -END PGP SIGNATURE- -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Call for testing: Lazarus 0.9.31 debian packages
Dne 31.12.2010 15:44, Vincent Snijders napsal(a): P.S. let's get back on the topic of this thread, did anybody test the debs created by me? VIncent Hello Vincent, I just installed these debs from your link: lazarus-src-0.9.31_0.9.31-0-20101231_all.deb lazarus-doc-0.9.31_0.9.31-0-20101231_all.deb lazarus-ide-gtk2-0.9.31_0.9.31-0-20101231_amd64.deb lazarus-ide-0.9.31_0.9.31-0-20101231_amd64.deb My program was compiled without problems and all looks OK. Petr -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Call for testing: Lazarus 0.9.31 debian packages
Dne 31.12.2010 16:08, Petr Hlozek napsal(a): Dne 31.12.2010 15:44, Vincent Snijders napsal(a): P.S. let's get back on the topic of this thread, did anybody test the debs created by me? Hello Vincent, I just installed then same packages but for 32bit and it seems that your packages doesn't contain lazbuild utility. Petr VIncent Hello Vincent, I just installed these debs from your link: lazarus-src-0.9.31_0.9.31-0-20101231_all.deb lazarus-doc-0.9.31_0.9.31-0-20101231_all.deb lazarus-ide-gtk2-0.9.31_0.9.31-0-20101231_amd64.deb lazarus-ide-0.9.31_0.9.31-0-20101231_amd64.deb My program was compiled without problems and all looks OK. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Status of GDB and Lazarus/FPC debugging threaded apps
I had the same problem and solved it by using DebugLn from lclproc unit. It is uncomfortable but is is working. Or just using a few Writeln and run program from console to see what is happening. Petr Dne 10.1.2011 15:41, Andrew Brunner napsal(a): Debugging under Linux (Ubuntu) is the largest development pain, and has persisted since I started cross platform development with FPC/Lazarus. I was wondering what if anything could be done to get a bug report together and submit something to either GDB or X.org, or identify the source of the problem and resolve it so we can debug without having to restart the desktop manager. Recently, main threaded debugging doesn't crash the gdm but threading still does. If I set a break point for a threaded method, I can step two or three lines down/deep before the desktop manager hangs and I have to open a terminal session with ctrl+alt+F2 and sudo service gdm restart. What would be involved in running the GDM under debugger and seeing where in the world it crashed? Is this too big of a task? I noticed GDB has done some updating w/r/t FPC in the past and was wondering whose responsibility this might fall on. It seems to me like this problem is way beyond the scope of Lazarus or FPC but I hope with some noise we possibly could get some stability while debugging threaded apps. Anyone want to help? -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Testing 0.9.29
Great work Vincent! I just added repo to my xubuntu installion and it is working very well. My project with over 80k lines of code and 67 forms compiled without problem and program is running as expected. Thank you for great work. I thing this release will be the best ever. Petr Dne 16.2.2011 21:01, Vincent Snijders napsal(a): 2011/1/15 Graeme Geldenhuys: When 0.9.30 fixes branch is updated, please give use some time to re-test those changes before a release is made. I think the time is now. For people used to release candidates, consider the current 0.9.29 snapshots to be 0.9.30RC2. Happy testing. With kind regards, Vincent -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Ubuntu 14.04 LTS - Any plans to include 1.0.x on it?
It would be great to have latest 1.0.x, or even 1.2 in Ubuntu 14.04 repository. Yes, I know I can compile my own version but there is another big problem. My app is distributed as source package and Launchpad builds binary version. If the 14.04 won't include latest version, I can't use it :(. I just have to use what is in official repository :(. Happy new year and thank you for all work you do. Petr 2013/12/27 Alexsander Rosa : > make[2]: Entrando no diretório > `/home/alexsander/fontes/ambiente/lazarus/components/lazcontrols' > /bin/rm -f lib/i386-linux/nogui/lazcontrols.ppu > /usr/bin/ppc386 -MObjFPC -Scghi -O1 -g -gl -vewnhi -l -dLCL -dLCLnogui > -Fu../../lcl/units/i386-linux/nogui -Fu../../lcl/units/i386-linux > -Fu../lazutils/lib/i386-linux -Fu../../packager/units/i386-linux -Fu. > -Fu/usr/local/lib/fpc/2.6.2/units/i386-linux/rtl -FE. > -FUlib/i386-linux/nogui -di386 lazcontrols.pas > Hint: Start of reading config file /etc/fpc.cfg > Hint: End of reading config file /etc/fpc.cfg > Free Pascal Compiler version 2.6.2 [2013/02/16] for i386 > Copyright (c) 1993-2012 by Florian Klaempfl and others > Target OS: Linux for i386 > Compiling lazcontrols.pas > Compiling treefilteredit.pas > treefilteredit.pas(28,48) Error: Illegal expression > treefilteredit.pas(28,48) Error: Error in type definition > treefilteredit.pas(28,48) Fatal: Syntax error, ">" expected but "" found > Fatal: Compilation aborted > make[2]: ** [lazcontrols.ppu] Erro 1 > make[2]: Saindo do diretório > `/home/alexsander/fontes/ambiente/lazarus/components/lazcontrols' > make[1]: ** [base] Erro 2 > make[1]: Saindo do diretório > `/home/alexsander/fontes/ambiente/lazarus/components' > make: ** [lazbuild] Erro 2 > > Lazarus source tree is from lazarus-1.0.14-0.tar.gz > > > > > 2013/12/27 Mattias Gaertner >> >> On Thu, 26 Dec 2013 23:54:05 + >> Graeme Geldenhuys wrote: >> >> > On 2013-12-26 17:29, Alexsander Rosa wrote: >> > > Target OS: Linux for i386 >> > > Compiling lazcontrols.pas >> > > Compiling treefilteredit.pas >> > > treefilteredit.pas(28,48) Error: Illegal expression >> > > treefilteredit.pas(28,48) Error: Error in type definition >> > > treefilteredit.pas(28,48) Fatal: Syntax error, ">" expected but "" >> > > found >> > > Fatal: Compilation aborted >> > > make[2]: ** [lazcontrols.ppu] Erro 1 >> > >> > >> > That seems like a fault in LCL - more specifically a component included >> > with LCL. You should file a bug report for that. >> >> treefilteredit.pas is part of package LazControls - a base package of >> the IDE. The IDE compiles on linux 32/64bit ubuntu with corresponding >> fpc 2.6.2. The releases were built there too. I didn't try cross >> compiling 64 to 32bit. >> >> Please post the output before the error, especially the fpc command. >> >> Mattias >> >> -- >> ___ >> Lazarus mailing list >> Lazarus@lists.lazarus.freepascal.org >> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > > > > -- > Atenciosamente, > Alexsander da Rosa > > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- http://HamQTH.com/ok2cqr http://ok2cqr.com http://cqrlog.com http://cqrtest.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Ubuntu 14.04 LTS - Any plans to include 1.0.x on it?
Hi Lukasz, I can create the repository and take care of it, keep it up to date etc. But I don't know how to create src deb packages. Lazarus is big project. It already has debian directory but have no idea what to do to create src.deb packages which will be ready to upload to Launchpad :(. Petr 2014/1/3 Lukasz Sokol : > On 02/01/14 21:42, Juha Manninen wrote: >> On Thu, Jan 2, 2014 at 11:03 PM, Petr Hlozek wrote: >>> It would be great to have latest 1.0.x, or even 1.2 in Ubuntu 14.04 >>> repository. >> >> You must tell that to Ubuntu maintainers. >> We have no way to update their repositories. > > I think he meant to have a PPA archive with the latest-and-greatest stable > versions > in binary form, for system-wide installation straight from servers... > that one can add to apt sources list; > > (to Petr: I think such PPA can be created, almost anywhere not just on Ubuntu > servers, > only someone will need to keep track of it, meaning it'll need a maintainer). > >> >> Juha >> > > -L -- http://HamQTH.com/ok2cqr http://ok2cqr.com http://cqrlog.com http://cqrtest.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Compile works, building DEB package fails
Hello, I'm developing my app in Lazarus for Linux. Now using version 0.9.30 because it's part of Ubuntu 12.04 repositories. I've created makefile for the project (https://github.com/ok2cqr/cqrlog/blob/master/Makefile) and it has been working for long time without any problem. Unfortunately, recent version of Ubuntu and Debian unstable building fails. What is interesting, it happens only when it's building debian package. Ordinary make in project directory works. This is what I get from pbuilder-dist: ... gline2.pas(707,9) Note: Local variable "z" not used gline2.pas(707,11) Note: Local variable "x" not used 800 179.416/188.992 Kb Used 900 179.852/188.992 Kb Used gline2.pas(896,6) Note: Local variable "z" not used Fatal: Can't find unit typ used by spe ERROR: failed compiling of project /tmp/buildd/cqrlog-1.7.0/src/cqrlog.lpi make[1]: *** [cqrlog] Error 2 make[1]: Leaving directory `/tmp/buildd/cqrlog-1.7.0' dh_auto_build: make -j1 returned exit code 2 make: *** [build] Error 2 dpkg-buildpackage: error: debian/rules build gave error exit status 2 E: Failed autobuilding of package I: unmounting /var/cache/pbuilder/ccache filesystem I: unmounting dev/pts filesystem .. The gline.pas is here: https://github.com/ok2cqr/cqrlog/blob/master/src/gline2.pas It works when I use make or compile project directly in Lazarus. Only when I try to build package, compilation fails. I also tried to install dependencies that are in control file and it worked :(. Debian unstable has Lazarus 1.0.10 and fpc-2.6.2-7. Could you help me please? I can't release new version of my app because of this. Thanks a lot! Petr -- http://HamQTH.com/ok2cqr http://ok2cqr.com http://cqrlog.com http://cqrtest.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compile works, building DEB package fails
2014/1/15 Marco van de Voort : > On Wed, Jan 15, 2014 at 10:30:58AM +0100, Petr Hlozek wrote: > >> 800 179.416/188.992 Kb Used >> 900 179.852/188.992 Kb Used >> gline2.pas(896,6) Note: Local variable "z" not used >> Fatal: Can't find unit typ used by spe > > This sounds like you miss FPC package numlib. If and how debian packs it, I > don't know, but I suggest checking the FPC unitpath to see if a directory > numlib is there. > I tried to install to clean system all dependecies from debian control file and it worked when I compile it in Lazarus IDE :(. I thought the problem won't be in dependencies. I'm sorry, I don't know how to check if the package is there, because it happens only in build chroot. I'll find out which fpc package includes the numlib and add it to dependencies. Thank you for your help! -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compile works, building DEB package fails
2014/1/15 Mattias Gaertner : > > >> Petr Hlozek hat am 15. Januar 2014 um 10:30 geschrieben: >> [...] >> I'm developing my app in Lazarus for Linux. Now using version 0.9.30 >> because it's part of Ubuntu 12.04 repositories. > > Hint: The Lazarus 1.0.14 deb package for Ubuntu can be found on sourceforge. > It > is easy to install. Yes, they are but I can't use it to build package in Debian unstable or Ubuntu. I have to use what they heve in their repo. >> gline2.pas(707,9) Note: Local variable "z" not used >> gline2.pas(707,11) Note: Local variable "x" not used >> 800 179.416/188.992 Kb Used >> 900 179.852/188.992 Kb Used >> gline2.pas(896,6) Note: Local variable "z" not used >> Fatal: Can't find unit typ used by spe > > For more verbosity add -vut to your project (lpi). Then run the script again. I'll try, thank you! > What dependencies did you install? > I installed debhelper, lazarus, lcl, fp-utils, fp-units-misc, fp-units-gfx, fp-units-gtk, fp-units-db, libhamlib-dev with apt-get install debhelper lazarus lcl fp-utils fp-units-misc fp-units-gfx fp-units-gtk fp-units-db libhamlib-dev Strange is, that happens only in Debian unstable and Ubuntu 13.10/14.04. Older versions don't have this problem. Thank you for help! Petr -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compile works, building DEB package fails
It works! I added fp-units-math to package dependencies and it works! That's great, I can release new version. Thank you for your help! Petr 2014/1/15 Marco van de Voort : > On Wed, Jan 15, 2014 at 10:30:58AM +0100, Petr Hlozek wrote: > >> 800 179.416/188.992 Kb Used >> 900 179.852/188.992 Kb Used >> gline2.pas(896,6) Note: Local variable "z" not used >> Fatal: Can't find unit typ used by spe > > This sounds like you miss FPC package numlib. If and how debian packs it, I > don't know, but I suggest checking the FPC unitpath to see if a directory > numlib is there. > > It should have approximately the following units. > > det dsl eig eigh1 eigh2 int inv iom ipf > mdt ode omv roo sle spe spl typ > -- http://HamQTH.com/ok2cqr http://ok2cqr.com http://cqrlog.com http://cqrtest.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] SQLTransaction won't start
Hi, I use TMySQL55Connection, TSQLTransaction and TSQLQuery. I always get Transaction is NOT active. here is the code: procedure TForm1.Button1Click(Sender: TObject); var db : TMySQL55Connection; q : TSQLQuery; tr : TSQLTransaction; begin db := TMySQL55Connection.Create(nil); q := TSQLQuery.Create(nil); tr := TSQLTransaction.Create(nil); try try db.DatabaseName := 'test'; db.UserName := 'root'; db.Password := 'passwd'; db.Open; q.DataBase:= db; tr.DataBase := db; q.Transaction := tr; tr.StartTransaction; try if tr.Active then Writeln('Transaction is active') else Writeln('Transaction is NOT active') finally tr.Rollback end except on E: Exception do Writeln(E.Message) end finally q.Close; FreeAndNil(q); FreeAndNil(tr); FreeAndNil(db) end end; or http://pastebin.com/qmCMfKMh Ubuntu 13.10, mysql 5.5, Lazarus 1.0.10, FreePascal 2.6.2-5. The test table is in InnoDB: CREATE TABLE test_table ( id bigint NOT NULL AUTO_INCREMENT PRIMARY KEY, myfield varchar(100) DEFAULT '' ) ENGINE='InnoDB' COLLATE 'utf8_bin'; Could you help me, please? Thanks a lot. Petr -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SQLTransaction won't start
Yes, I did. It's in uses like mysql55conn. Petr 2014-03-14 15:34 GMT+01:00 silvioprog : > 2014-03-14 8:20 GMT-03:00 Petr Hlozek : > >> Hi, >> >> I use TMySQL55Connection, TSQLTransaction and TSQLQuery. I always get >> Transaction is NOT active. >> >> here is the code: >> >> procedure TForm1.Button1Click(Sender: TObject); >> var >> db : TMySQL55Connection; > > > Are you declared the mysql55conn unit on uses clause? > > -- > Silvio Clécio > My public projects - github.com/silvioprog -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SQLTransaction won't start
It's the name of database. My testing database is called "test". I posted the table create command to infom about db engine I use for it. Petr 2014-03-14 17:25 GMT+01:00 Marc Santhoff : > On Fr, 2014-03-14 at 12:20 +0100, Petr Hlozek wrote: >> Hi, >> >> I use TMySQL55Connection, TSQLTransaction and TSQLQuery. I always get >> Transaction is NOT active. >> >> here is the code: >> >> procedure TForm1.Button1Click(Sender: TObject); >> var >> db : TMySQL55Connection; >> q : TSQLQuery; >> tr : TSQLTransaction; >> begin >> db := TMySQL55Connection.Create(nil); >> q := TSQLQuery.Create(nil); >> tr := TSQLTransaction.Create(nil); >> try try >> db.DatabaseName := 'test'; > > Here you ask for table "test". > >> >> CREATE TABLE test_table ( > > And here you create a table named "test_table". > > Change the table name on creation or ask for the correct name could be > it. > >> id bigint NOT NULL AUTO_INCREMENT PRIMARY KEY, >> myfield varchar(100) DEFAULT '' >> ) ENGINE='InnoDB' COLLATE 'utf8_bin'; > > -- > Marc Santhoff > > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- http://HamQTH.com/ok2cqr http://ok2cqr.com http://cqrlog.com http://cqrtest.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SQLTransaction won't start
It won't start even when I execute a query. After q.open the transaction is still not active. I think, it should start after StartTransaction is called, not after first query. Petr 2014-03-14 19:39 GMT+01:00 Marc Santhoff : > On Fr, 2014-03-14 at 18:37 +0100, Petr Hlozek wrote: >> It's the name of database. My testing database is called "test". I >> posted the table create command to infom about db engine I use for it. > > Oops. ;) > > Maybe the TSQLQuery instance hinders the transaction from goping active, > because it's SQL is empty or similar. > > Marc -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SQLTransaction won't start
It's inactive even after I execute a query. If AUTO COMMIT is set to 0 ,the changes are not saved to database. Very bad. Yes, I could use other DB components, but my app already has over 60k lines of code, several threads connected to DB etc. It won't be easy to move to something else :(. Petr 2014-03-14 19:46 GMT+01:00 silvioprog : > 2014-03-14 11:55 GMT-03:00 Petr Hlozek : > >> Yes, I did. It's in uses like mysql55conn. >> >> Petr > > > Hm... Try to set a SQL in your query, after, use the q.Open (the > starttransaction will automaticaly triggered) method, checking if > transaction keeps inactive. > > justa a tip: take a little time to see this nice and slim project: > https://github.com/silvioprog/dopf.. ;) > > -- > Silvio Clécio > My public projects - github.com/silvioprog > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- http://HamQTH.com/ok2cqr http://ok2cqr.com http://cqrlog.com http://cqrtest.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SQLTransaction won't start
I wanted to find out where is the problem and started with breakpoint on db := TMySQL55Connection.Create. It went fine until it reached db.Open line. After I hit F8 on this line, it hangs. Next time it hangs on tr.StartTransaction with this error: The GDB command: "ptype tr.StartTransaction" did not return any result. Very sad :(. It seems I have to try it in virtual machine with latest FPC and Lazarus. It will be interesting but I can't use it. It won't be part of Ubuntu 12.04, it's not in Debian, yet :(. Petr 2014-03-15 7:13 GMT+01:00 silvioprog : > 2014-03-15 3:06 GMT-03:00 Petr Hlozek : > >> It's inactive even after I execute a query. If AUTO COMMIT is set to 0 >> ,the changes are not saved to database. Very bad. > > > Very very bat. > >> >> Yes, I could use other DB components, but my app already has over 60k >> lines of code, several threads connected to DB etc. It won't be easy >> to move to something else :(. > > > Can you test it in latest FPC 2.6.4 (using a virtual machine, sure)? > -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SQLTransaction won't start
Unfortunately this problem is only when I try to run the app in Lazarus and put breakpoit somewhere. When I run it directly in terminal, it always will connect to database, I can run queries, get results but transaction is still not active like it was in the example. 2014-03-15 13:14 GMT+01:00 Marc Santhoff : > On Sa, 2014-03-15 at 07:23 +0100, Petr Hlozek wrote: >> I wanted to find out where is the problem and started with breakpoint >> on db := TMySQL55Connection.Create. It went fine until it reached >> db.Open line. After I hit F8 on this line, it hangs. Next time it >> hangs on tr.StartTransaction with this error: >> >> The GDB command: >> "ptype tr.StartTransaction" >> did not return any result. > > So this looks like your tarnsaction cannot connect to the database burt > you're getting no error message but a hang. > > You could > - check that anything inbetween your program and the database is > actually working. Using another client program may help to narrow down > the target > - turn on logging for mysql temporarily (the log fills up fast) and > check if mysql sees the connection attempt > - instead of stepping over the first erroneous line step into and look > what happens in detail > > HTH, > Marc > -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SQLTransaction won't start
Thank you Michael! It there any way how to find out where was the problem? I'd like to backport the fix to the version I use. Petr 2014-03-16 12:36 GMT+01:00 Michael Van Canneyt : > > > On Sat, 15 Mar 2014, Petr Hlozek wrote: > >> Unfortunately this problem is only when I try to run the app in >> Lazarus and put breakpoit somewhere. When I run it directly in >> terminal, it always will connect to database, I can run queries, get >> results but transaction is still not active like it was in the >> example. > > > Your problem will be solved in 2.6.4 or in trunk. > > I tested your code with 3 versions of fpc: > > home: > ppcx64-2.6.2 tdb > home: >./tdb > Transaction is NOT active > home: >ppcx64-2.6.4 tdb > home: >./tdb > Transaction is active > home: >fpc tdb > home: >./tdb > Transaction is active > > So whatever bug you encountered, it has been fixed meanwhile in FPC. > > So as soon as Lazarus releases a version based on 2.6.4, your program will > work. > I suspect it is a MySQL specific bug. (IIRC there were some issues with > transactions in MySQL) > > Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Packages of Lazarus 1.2 and FPC 2.6.4 for Ubuntu 14.04
Hi, I've created packages for Ubuntu 14.04. https://launchpad.net/~ok2cqr/+archive/lazarus I'll try to keep version the same like in Sid. Petr -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Packages of Lazarus 1.2 and FPC 2.6.4 for Ubuntu 14.04
Because I have to work with version that is in Debian. My app is builded on Launchpad and Debian build system. After Lazarus 1.2.2 appears in Debian, I'll build packages for Ubuntu 14.04 as well. Petr 2014-05-02 8:31 GMT+02:00 leledumbo : >> https://launchpad.net/~ok2cqr/+archive/lazarus > > Why not Lazarus 1.2.2? 1.2.0 with FPC 2.6.4 has a (showstopper) bug with Qt > and Carbon interface. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Packages of Lazarus 1.2 and FPC 2.6.4 for Ubuntu 14.04
Yes, you are right. Could you send me link to a patch, please? I'll add it to debian build process. Thank you! Petr 2014-05-02 14:45 GMT+02:00 Marco van de Voort : > On Fri, May 02, 2014 at 11:30:06AM +0200, Petr Hlozek wrote: >> Because I have to work with version that is in Debian. My app is >> builded on Launchpad and Debian build system. After Lazarus 1.2.2 >> appears in Debian, I'll build packages for Ubuntu 14.04 as well. > > If you could add patches to your buildprocess yourself, you could fix that > bug in 1.2.0 with a > patch. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Lazarus project and git workflow
Hi, if two or more developers work on a project, they sometimes edit the same form. Git can't solve the changes and you have to do it by hand. Even it's better to use the form the other developer and add the changes again by hand. It's impossible to solve the conflict. What do you do when you have this problem? Thank you for you time! Petr -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] App crash at TScreen.GetCustomFormsZOrdered
Hi, I have an Linux app, it has over 76k lines of code, 78 Forms and uses threads. After I close the app, it always crashes in function TScreen.GetCustomFormsZOrdered(Index: Integer): TCustomForm; begin Result := TCustomForm(FCustomFormsZOrdered[Index]); end; The index variable value is something like 42325 or so. I tried to debug and here is what I found out: It goes through all FormCloseQuesry, FormDestroy and DatamoduleDestory, then it goes to TApplication.DoBeforeFinalization and then into TScreen..GetCustomFormsZOrdered where it fails. I spent days trying to find out where could be the problem but didn't find anything. I'm lost. Do you have any idea where could be a problem, please? Thanks a lot! Petr -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] App crash at TScreen.GetCustomFormsZOrdered
Thank you for the help! I added to all autocreated and used form into OnDestroy what you've writen to me, in Project -> Option -> Debugging checked the -gh option, Run -> Ru parameters in Environment tab added HEAPTRC variable. After the crash, the callstack window shows #0 HEAPTRC_TRACEFREEMEMSIZE$POINTER$QWORD$$QWORD at :0 When I click to View source, it jumps to the top of the heaptrc unit. When I run the app from terminal with environment variable set, I got this: An unhandled exception occurred at $0044139A : EAccessViolation : $0044139A $005DDD29 The same like before :( Petr 2014-06-27 11:55 GMT+02:00 Mattias Gaertner : > On Fri, 27 Jun 2014 11:33:53 +0200 > Petr Hlozek wrote: > >> Hi, >> >> I have an Linux app, it has over 76k lines of code, 78 Forms and uses >> threads. >> After I close the app, it always crashes in >> >> function TScreen.GetCustomFormsZOrdered(Index: Integer): TCustomForm; >> begin >> Result := TCustomForm(FCustomFormsZOrdered[Index]); >> end; >> >> The index variable value is something like 42325 or so. >> >> I tried to debug and here is what I found out: >> >> It goes through all FormCloseQuesry, FormDestroy and >> DatamoduleDestory, then it goes to >> TApplication.DoBeforeFinalization and then into >> TScreen..GetCustomFormsZOrdered where it fails. >> I spent days trying to find out where could be the problem but didn't >> find anything. I'm lost. Do you have any idea where could be a >> problem, please? Thanks a lot! > > Maybe some event uses an already freed object. > Set all references to nil, when freeing objects. For example in > TForm1.FormDestroy add Form1:=nil; > > And compile with -gh. > > Then you can run your program with environment variable > HEAPTRC=keepreleased > > > Mattias > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- http://HamQTH.com/ok2cqr http://ok2cqr.com http://cqrlog.com http://cqrtest.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] App crash at TScreen.GetCustomFormsZOrdered
>> I added to all autocreated and used form into OnDestroy what you've >> writen to me, in Project -> Option -> Debugging checked the -gh >> option, Run -> Ru parameters in Environment tab added HEAPTRC >> variable. >> >> After the crash, the callstack window shows >> >> #0 HEAPTRC_TRACEFREEMEMSIZE$POINTER$QWORD$$QWORD at :0 > > This could mean that you double free an object/record. > Make sure all references become nil when an object is freed. I'd like to do that and hopefuly already did but the app is quite big and I'm not sure fo 100%. Is there any way how to find out with any utility? >> When I click to View source, it jumps to the top of the heaptrc unit. > If there are other lines (not #0, but #1, #2, ...) click on them. There is only #1 line with this: #1 ?? at :0 Nothing more. >> When I run the app from terminal with environment variable set, I got this: >> >> An unhandled exception occurred at $0044139A : >> EAccessViolation : >> $0044139A >> $005DDD29 >> >> The same like before :( > > Something destroys your heap. > Have you tried gdb? > > Heaptrc has some more options. I trid also gdb but I'm not so keen with it. When I tried bt after it crashed, I got this: Program received signal SIGSEGV, Segmentation fault. 0x0044139a in HEAPTRC_TRACEFREEMEMSIZE$POINTER$QWORD$$QWORD () (gdb) bt #0 0x0044139a in HEAPTRC_TRACEFREEMEMSIZE$POINTER$QWORD$$QWORD () #1 0x in ?? () (gdb) Petr -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Grey windows in Lazarus IDE with GTK2 in Mint 17 + KDE
I'm not sure that it's KWin problem. This problem have only apps written in Lazarus and Lazarus itself. My app has the same problem :(. Petr > Ok, here it is gtk 2.24.23. > Any known workarounds? I tried changing the GTK theme in KDE but no > effect. > > > Probably a Kwin problem. > A workaround is to open the KDE system settings, Desktop effects, All > effects. On the Focus block uncheck Dialog parent. > > Patrick -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus