* * *

Recent Posts

Pages: [1] 2 3 ... 10
1
General / Re: Strange big size only of Linux x64 executable
« Last post by avra on Today at 10:04:46 am »
You can probably delete the external debugger file and it might still debug, but I have to test that. (And I did not do that yet: today no lin64 for me.) Try deleting external info and run the binary under gdb directly.
Neither do I have access to Lin64 at the moment. However I have cross compiled with debug info this time but without external debug file. Here are the results:

ExecutableSmartLink + InternDebugInfo      SmartLink + ExternDebugInfo      SmartLink + Strip
ct2laz-i386-win32.exe42562932589715 (1668133)2583040
ct2laz-i386-linux51778242704524 (2475036)2700208
ct2laz-x86_64-win64.exe     67835203551763 (3233312)3540992
ct2laz-x86_64-linux114060966378600 (5030304)3616816

It looks like when debug info is built into executable, all platforms have expected size (DbgExeSize roughly equals ExeSize plus ExtDbgInfoSize). So the only strange thing left is big unexpected size of Lin64 executable when there is external debug file.
2
General / Re: Thread Safety?
« Last post by ASerge on Today at 10:01:40 am »
I think that not only I, but also many other people would be grateful to you if you would lay out the minimum demo-project here.  :)
I took an empty project, added ProgressBar and Timer. Formed events OnCreate, OnDestroy and Timer.OnTimer. Source code is provided earlier.
3
General / Re: Synapes v40 .Timeout misbehaving
« Last post by rvk on Today at 09:48:45 am »
Sorry, I spoke too soon. What is said above still holds but the connect timeout was discussed on the Synapse list in 2012 and the non-blockingmode (which is mentioned above) was implemented in revision #160.

You also need to set the HTTPSender.Sock.ConnectionTimeout which handles the Connect timeout in non-blockingmode after which the socket is switched back to blocking mode.

Example:
Code: Pascal  [Select]
  1. const
  2.   URL = '10.255.255.1'; // <-- this is always non response
  3. var
  4.   HTTPSender: THTTPSend;
  5.   HTTPGetResult: boolean;
  6.   Tm: TDateTime;
  7. begin
  8.   HTTPSender := THTTPSend.Create;
  9.   try
  10.     HTTPSender.Timeout := 1 * 1000;
  11.     HTTPSender.Sock.ConnectionTimeout := 1 * 1000;
  12.     Tm := Now;
  13.     HTTPGetResult := HTTPSender.HTTPMethod('GET', URL);
  14.     Tm := Now - Tm;
  15.     ShowMessage(Format('%d: done in %.3f seconds', [HTTPSender.ResultCode, Tm * 24 * 60 * 60]));
  16.   finally
  17.     HTTPSender.Free;
  18.   end;
  19. end;
4
General / Re: Synapes v40 .Timeout misbehaving
« Last post by rvk on Today at 09:37:21 am »
I take it you are talking about non-responsive sites and not for normal sites?

Anyway, your problem is not the TimeOut during communications (which you can tweak with TimeOut) but with the "Connect Timeout". Synapse says this about it:

Quote
These timeouts are not for Connect. Connect timeout is hardcoded in your socket provider. This timeout is for sending or receiving datas and your socket provider must know it.
and
Quote
How To Change Connect Timeout

Synapse library using sockets in blocking mode. But blocking call of Connect not have any timeout. Timeout for Connect is hardcoded in communication stack of your operating system.

:!: Any timeout property in Synapse cannot define timeout for connecting of TCP channel. It is not a bug, it depending on design of used socket API.

Exists two possible workarounds:

Call Connect in non-blocking mode. (ugly…)
Raise helper thread and after timeout try to close socket handler from this thread. (it is ugly too…)
http://www.ararat.cz/synapse/doku.php/public:howto:connecttimeout

So it seems the only way to do this is to implement some threading.
5
General / Problem with sorting string (filepaths)
« Last post by TomTom on Today at 09:32:14 am »
Hi :)
I need to sort filepaths (aquired using FindAllFiles) in StringGrid/StringList and I don't know where to start.
I'm working on a program that deals almost all the time (99.99%) with files (files with leading zeros) in specific folder structure
For example:
Code: Pascal  [Select]
  1. C:\35\123\0\0\1.1\1\ <-- files here
  2. C:\35\123\0\0\1.1\2\ <-- files here
  3. C:\35\123\0\0\1.1\3\ <-- files here
  4. etc.
  5.  
Digits in folder names can change. I put those file paths in StringGrid and they sort like this
Code: Pascal  [Select]
  1. C:\35\123\0\0\1.1\1\ <-- files here
  2. C:\35\123\0\0\1.1\10\ <-- files here
  3. C:\35\123\0\0\1.1\11\ <-- files here
  4. C:\35\123\0\0\1.1\2\ <-- files here
  5. C:\35\123\0\0\1.1\3\ <-- files here
  6. C:\35\123\0\0\1.1\4\ <-- files here
  7. C:\35\123\0\0\1.1\5\ <-- files here
  8. C:\35\123\0\0\1.1\6\ <-- files here
  9. C:\35\123\0\0\1.1\7\ <-- files here
  10. C:\35\123\0\0\1.1\8\ <-- files here
  11. C:\35\123\0\0\1.1\9\ <-- files here
  12. etc.
  13.  
My question is. How can I sort them  this way:
Code: Pascal  [Select]
  1. C:\35\123\0\0\1.1\1\ <-- files here
  2. C:\35\123\0\0\1.1\2\ <-- files here
  3. C:\35\123\0\0\1.1\3\ <-- files here
  4. C:\35\123\0\0\1.1\4\ <-- files here
  5. C:\35\123\0\0\1.1\5\ <-- files here
  6. C:\35\123\0\0\1.1\6\ <-- files here
  7. C:\35\123\0\0\1.1\7\ <-- files here
  8. C:\35\123\0\0\1.1\8\ <-- files here
  9. C:\35\123\0\0\1.1\9\ <-- files here
  10. C:\35\123\0\0\1.1\10\ <-- files here
  11. C:\35\123\0\0\1.1\11\ <-- files here
  12. etc.
  13.  

6
General / Re: Strange big size only of Linux x64 executable
« Last post by Thaddy on Today at 09:31:48 am »
It is a bug: even if external debug info is specified, the binary still contains all or some of the debug info too. So the debug info is at least partially stored twice. You can probably delete the external debugger file and it might still debug, but I have to test that. (And I did not do that yet: today no lin64 for me.) Try deleting external info and run the binary under gdb directly.
7
General / Re: Strange big size only of Linux x64 executable
« Last post by avra on Today at 09:16:10 am »
Hey,  it's Avra...not ASerge.... :P (just kidding...  :-X :D :D )
I prefer funny Thaddy over grumpy Thaddy any time  8) :-X

Here are the results of the test on Laz 1.8.1 + FPC 3.0.5 cross compiler (brackets show size of external dbg file):

ExecutableSmartLink + ExternDebugInfo      SmartLink + Strip
ct2laz-i386-win32.exe2589715 (1668133)2583040
ct2laz-i386-linux2704524 (2475036)2700208
ct2laz-x86_64-win64.exe     3551763 (3233312)3540992
ct2laz-x86_64-linux6378600 (5030304)3616816

It looks like Thaddy was on the right track and size of Lin64 debug info is to blame. All other platforms have size difference od less then 1% between stripped executables and executables with external debug info. Only Lin64 breaks this proportion (3616816 vs 6378600). Like some part of debug info ended up into Lin64 executable although it should go to external dbg file.

Is this a bug or some Lin64 specific thing?

I have attached elfreader outputs for Lin32 and Lin64 executables (with external dbf file) if someone can take a look.
8
General / Re: App on high res monitors - Linux/Wine problems
« Last post by dieselfan on Today at 08:56:05 am »
If you want to increase the overall size of forms and fonts to help visually impaired people you should adjust the corresponding settings of the OS, not of your application. In Windows you can find the corresponding settings in the control panel of the screen, set font size to "large fonts". Laz 1.8 will scale all controls according to this magnification factor automatically. This works on Windows and Linux. If this does not work in Wine then this is a problem of Wine, not of Lazarus.
Which is why I recommend the equivalent of doing it through wine. See attached pic
9
Third party / Re: Fpcupdeluxe
« Last post by DonAlfredo on Today at 08:47:38 am »
@af0815
You need to adjust the path of your patch !
Fpcupdeluxe patches from the fpc source directory.

Code: Pascal  [Select]
  1. --- fcl-report/src/fpreport.pp  (revision 38293)
  2. +++ fcl-report/src/fpreport.pp  (working copy)
  3.  
must be
Code: Pascal  [Select]
  1. --- packages/fcl-report/src/fpreport.pp (revision 38293)
  2. +++ packages/fcl-report/src/fpreport.pp (working copy)
10
Third party / Re: I need some more advanced message box?
« Last post by taazz on Today at 08:41:57 am »
try syntaskdialog https://github.com/synopse/mORMot/blob/master/SynTaskDialog.pas I have no idea what is the coverage rate for your requirements but it is more advanced than the default lcl dialogs.
Pages: [1] 2 3 ... 10

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus