Re: [Lazarus] Loading OpenGL error
Aradeonas wrote: > Hi, > > I have a new Laptop and with new Windows 10 and tried my old working > demos and I tried it with Last Lazarus Trunk 1.7 and FPC 3.1.1 and just > tried to run it and its happen : > > A dynamic link library (DLL) initialization routine failed > > It is because OpenGL loading error and I dont have clue how to solve it. > I already update all drivers and windows but nothing. > Any one know how can I solve this or faced it before? > > And I tried it with Lazarus 1 and FPC 2.6.2 and it works good and it > seems OpenGL units changed but I dont know what changes break it. > Are you sure it's in the OpenGL units initialization? Can you test the Lazarus examples/openglcontrol/ demo, and see does it crash too? Base FPC units are part of FPC (trunk/packages/opengl/src/), they are outside the Lazarus "OpenGL component" package. In Castle Game Engine we're using FPC OpenGL units on many platforms, including Windows 10, and we often test with latest FPC from trunk. And everything seems to work cool. Also, the FPC OpenGL units did not have any "critical" change since a long time, so I doubt something broke there. And since you already tested that reverting old Lazarus version doesn't help, it does indicate the problem is somewhere else... Regards, Michalis -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] searching the net
I'd like to programmatically query intenet for a number of keys, say "key1 key2 key3" and get the number of hits. Any browser will do. How do I do this ? Thank you Peppe -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Tool to convert a multiline text to a pascal string constant
Marco van de Voort wrote: > On Wed, Feb 03, 2016 at 07:07:46AM +0100, Michalis Kamburelis wrote: >> >> As part of PasDoc project we have developed simple file_to_pascal_string >> utility for this purpose. Just get >> http://svn.code.sf.net/p/pasdoc/code/trunk/source/tools/file_to_pascal_string.dpr >> and compile it. > > Kind of redundant if two such tools come with FPC (data2inc and bin2obj) > Hm, I admit I simply didn't know about them long time ago, when creating file_to_pascal_xxx utilities in PasDoc:) Looking at them now: 1. They both have quite longer code than our simple file_to_pascal_string.dpr / file_to_pascal_data.dpr... In particular data2inc wants to do much more (being able to process a special file format like data2inc.exm). Although it can do the simple thing when invoked with -b option. But bin2obj is cool, almost exactly what we need, and could replace file_to_pascal_string and file_to_pascal_data indeed. 2. However, neither of them produces a string with line endings expressed as LineEnding constant (so it's OS-specific when output). And we actually like that:) Both bin2obj and data2inc encode the text to a series of characters, and newlines are expressed by explicit chars (like #10 when input has Unix line endings). But that's a minor thing indeed. If we would know about bin2obj back then, we would probably use it:) Thanks! Michalis -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus application crash. Is PostMessage thread safe?
Il 10/02/2016 21:13, Giuliano Colla ha scritto: I don't believe that there's an easy way to protect Application.ProcessMessages from recursion unless someone is willing to debug and patch Glib (which is used not only by Qt, but also from GTK, if I'm not wrong). A snippet from gmain.c: #if 0 /* If recursing, finish up current dispatch, before starting over */ if (context->pending_dispatches) { if (dispatch) g_main_dispatch (context, _time); UNLOCK_CONTEXT (context); return TRUE; } #endif It would appear that they realized the dispatch recursion problems but where unable to find a clean solution! This code appears both in glib-2.28.8 (the one coming with CentOs 6, which I've been using) and in the current version i.e. glib-2.47.5. My feeling is that it's been left there as a reminder that the matter is still pending. I'm afraid we must live with it. Giuliano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] 5dpo components last update
Hi, The last update for the 5dpo components: http://wiki.lazarus.freepascal.org/5dpo#About can be found here: https://sourceforge.net/p/sdpo-cl/mercurial/ci/default/tree/ or https://sourceforge.net/projects/sdpo-cl/files/latest/download The most important changes are: - TSdpoSerial tested and working on the Raspberry Pi 2. - TSdpoFreenect can read the RGB and depth images from the original Xbox Kinect. It works in Linux and uses the OpenKinect driver. - TDMatrix now supports element access like an array: A[r, c] := B[r, c] + 1.0; An example: uses dynmatrix; ... function DoSomething(A, B: TDMatrix): TDMatrix; begin A := Meye(4); // 4 x 4 Identity matrix B := MZeros(4, 4); // 4 x 4 zeros matrix A := 2 * A + B; A[1, 2] := B[2, 2] + 3.0; result := A; end; Regards, Paulo Costa -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] TControl.AssignTo() and TCustomAction relationship
Hi, Why does TControl.AssignTo() have a special case for TCustomAction? TCustomAction.AssignTo() already does property assignments, so what is the reason for the special code in TControl.AssignTo? Here is the code in question: procedure TControl.AssignTo(Dest: TPersistent); begin if Dest is TCustomAction then with TCustomAction(Dest) do begin Enabled := Self.Enabled; Hint := Self.Hint; Caption := Self.Caption; Visible := Self.Visible; OnExecute := Self.OnClick; HelpContext := Self.HelpContext; HelpKeyword := Self.HelpKeyword; HelpType := Self.HelpType; end else inherited AssignTo(Dest); end; Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to set defines for a project? Lazarus crashes...
On Tue, 9 Feb 2016 15:21:30 -0500 Dmitry Boyarintsevwrote: > On Mon, Feb 8, 2016 at 6:22 PM, Mattias Gaertner > wrote: >[...] > Is it true to say that there are only 2 ways in IDE to set defines. > 1) Project Options/Custom Options > 2) Project Options/Additions and Overrides (+ Custom Option) 3) Packages have their own custom options and can add custom options to the project. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] RFC : "Resolved View"
Hi, I've been thinking about a recent problem posed by Anthony Walter on the fpc-pascal mailing list: the abundant use of include files and IFDEFS and the ensuing lack of 'overview'. So I asked myself: what if we somehow "invert" the problem ? How hard would it be to create a 'resolved view' of a unit in the IDE ? By this I mean a view of a unit as the compiler will see it: - Correct include files included - IFDefs properly resolved. The IDE groks include files and can already syntax highlight conditional code, so the necessary mechanisms surely are in place. This view can be read-only for all I care, can optionally have gutter markers for 'special' locations (where includes occur or IFDEFS were observed). Maybe gutter colors/folds to indicate includes, etc. How this view is to be entered is also up for discussion. Just running an idea up the flagpole... If it's pure balderdash, feel free to say so. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] 5dpo components last update
On 11-Feb-16 21:48, Michael Van Canneyt wrote: The most important changes are: - TSdpoSerial tested and working on the Raspberry Pi 2. Question: can these components be used to work with the pi's camera ? I have not tested yet (is in my to do list) but the UVC component should work if the camera V4L driver does what is expected. In the beginning, a V4L driver didn't exist. Then, there was a user space driver and now, I have read that a proper kernel driver exits. As soon as I can test it, I'll let you know. Regards, Paulo Costa -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] 5dpo components last update
On Thu, 11 Feb 2016, Paulo Costa wrote: On 11-Feb-16 21:48, Michael Van Canneyt wrote: The most important changes are: - TSdpoSerial tested and working on the Raspberry Pi 2. Question: can these components be used to work with the pi's camera ? I have not tested yet (is in my to do list) but the UVC component should work if the camera V4L driver does what is expected. In the beginning, a V4L driver didn't exist. Then, there was a user space driver and now, I have read that a proper kernel driver exits. As soon as I can test it, I'll let you know. Great, I am eagerly awaiting the result of your tests ! Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Loading OpenGL error
> Are you sure it's in the OpenGL units initialization? Yes. > Can you test the Lazarus examples/openglcontrol/ demo, and see does it crash too? Yes. > we're using FPC OpenGL units on many platforms, including Windows 10, and we often test with latest FPC from trunk. And everything seems to work cool. And me too but in this Laptop its different and only with FPC 3 and above. > FPC OpenGL units did not have any "critical" change since a long time, so I doubt something broke there. But something break it for some computers. > And since you already tested that reverting old Lazarus version > doesn't help, it does indicate the problem is somewhere else... > Old FPC (2.6.4) with Lazarus 1 works OK. I tried to replace old Lazarus and FPC OpenGl components with new one and clean and recompile but problem is still there. Can any one help me to debug this? Regards, Ara -- http://www.fastmail.com - The professional email service -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Loading OpenGL error
> I tried to replace old Lazarus and FPC OpenGl components with new one > and clean and recompile but problem is still there. It seemed taht it not used new FPC OpenGL package units because they are precompiled so I tried and delete compiled opengl units from units folder but not Lazarus says it cant find gl unit but gl.pp exists but not compiled and I tried to recompile Lazarus or cleanup but it wont compile FPC files. What should I do? Regards, Ara -- http://www.fastmail.com - IMAP accessible web-mail -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] 5dpo components last update
On Thu, 11 Feb 2016, Paulo Costa wrote: Hi, The last update for the 5dpo components: http://wiki.lazarus.freepascal.org/5dpo#About can be found here: https://sourceforge.net/p/sdpo-cl/mercurial/ci/default/tree/ or https://sourceforge.net/projects/sdpo-cl/files/latest/download The most important changes are: - TSdpoSerial tested and working on the Raspberry Pi 2. Question: can these components be used to work with the pi's camera ? Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] RFC : "Resolved View"
On 11/02/2016 23:54, Michael Van Canneyt wrote: By this I mean a view of a unit as the compiler will see it: - Correct include files included This has been long on the list. But still no in the doing. Ignoring: - any high/low-light or other markup to indicate the fact that the text comes from a different file - probably also ignoring line numbering this should actually be relatively easy. There are already "views" wrapped around the textbuffer. All that it needs is to wrap another view around it, that combines 2 real textbuffers. This could even be editable. Except it needs to prevent joining lines accross file bound. There is work on the IDE side (outside SynEdit) to ensure it knows the file is open. Could be resolved by pretending it is open in its own editor (which is simply hidden) - IFDefs properly resolved. lowlight exists. Actual hiding is more work, because it needs to shift x positions in some line. Probably needs big changes. Though readonly may be doable. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Library dependency problem. Help please!
Hi All! I am having a strange library dependency problem. It started yesterday afternoon in a set of code very far from where I was working at the time. I have tried everything I can think of (including creating a new dummy project, and rebuilding and renaming both libraries, one file at a time). The problem appears to be associated with a generic type definition. When I remove the specialization for that generic and comment out the dependent code, the problem goes away (of course the program no longer works, but at least it compiles). I have two packages: AppLibrary which contains application-specific units that will be used in several related projects, and; CommonLibrary which contains general-purpose units that I have used for years (some go back to Delphi 2). AppLibrary requires CommonLibrary. The generic type definition is in the common library, the specialization is in the app library. CommonLibrary compiles successfully. AppLibrary (original version and all copies I have made for debugging this issue) fails to compile if it has a particular specialize clause in the interfaces section of any of its units (most of which have been working for the past month). I have tried all of the units one at a time and any one with this specialize clause included fails compilation the exact same way: During compilation a dialog box appears with the caption "File Not Found". The directory it is looking for is the original path from the original app from yesterday. The path is associated with the AppLibrary and the persistslist2.pas file is in the directory associated with the CommonLibrary. /home/pi/Module14Code/Common/persistslist2.pas The path exists but the file does not (the file is in the appropriate directory for the library). I tried creating a totally new project and as I said above, new libraries in a new directory tree. When I try to compile the AppLibrary I still get the error with the old path. I tried renaming the persistslist2 unit to persitslist3 (which only exists in the test version of the CommonLibrary). The same error occurs but now it wants the old path with the new file: /home/pi/Module14Code/Common/persistslist3.pas I have tried greping for the path and it only appears in files associated with the pre-problem application. Is it possible that something associated with the compiler's configuration file(s) is remembering the old stuff? This error has persisted through multiple reboots. I am using Raspbian Jessie with Lazarus 1.7 (no changes here since early January). It worked properly using Lazarus 1.4.2 before then. I have rebuilt Lazarus in an attempt to fix the problem, but it made no noticable change. One thing that would be useful is if the "File Not Found" dialog would reference the offending file and perhaps the source of the text of the path. I wasted a lot of time removing units from AppLibrary one-at-a-time before I could identify the failing ones. Any help will be greatly appreciated. Thanks, Don Ziesig -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Tool to convert a multiline text to a pascal string constant
On Thu, 11 Feb 2016, Michalis Kamburelis wrote: Marco van de Voort wrote: On Wed, Feb 03, 2016 at 07:07:46AM +0100, Michalis Kamburelis wrote: As part of PasDoc project we have developed simple file_to_pascal_string utility for this purpose. Just get http://svn.code.sf.net/p/pasdoc/code/trunk/source/tools/file_to_pascal_string.dpr and compile it. Kind of redundant if two such tools come with FPC (data2inc and bin2obj) Hm, I admit I simply didn't know about them long time ago, when creating file_to_pascal_xxx utilities in PasDoc:) Looking at them now: 1. They both have quite longer code than our simple file_to_pascal_string.dpr / file_to_pascal_data.dpr... In particular data2inc wants to do much more (being able to process a special file format like data2inc.exm). Although it can do the simple thing when invoked with -b option. But bin2obj is cool, almost exactly what we need, and could replace file_to_pascal_string and file_to_pascal_data indeed. As the author of bin2obj, I thank you for these words :-) 2. However, neither of them produces a string with line endings expressed as LineEnding constant (so it's OS-specific when output). And we actually like that:) Both bin2obj and data2inc encode the text to a series of characters, and newlines are expressed by explicit chars (like #10 when input has Unix line endings). But that's a minor thing indeed. If we would know about bin2obj back then, we would probably use it:) Patches certainly accepted. I use bin2obj in production today still... Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus