Recent

Author Topic: Program compiled with lazarus on Windows 10 and linux share  (Read 2059 times)

lublinkermi

  • New Member
  • *
  • Posts: 46
Program compiled with lazarus on Windows 10 and linux share
« on: August 22, 2019, 05:43:04 pm »
I compiled the program under Windows 10 and it works correctly locally, while on the mapped network drive (samba) I get the message: Reference returned from the server. Running as an administrator does not help. The same program works correctly under Windows XP and Windows 7. Interestingly, the program compiled in the earlier Lazarus version works on this network drive.

I tried many things related to permissions but to no avail. The program runs a few times and then doesn't want to ...

Thaddy

  • Hero Member
  • *****
  • Posts: 14221
  • Probably until I exterminate Putin.
Re: Program compiled with lazarus on Windows 10 and linux share
« Reply #1 on: August 22, 2019, 06:03:42 pm »
which versions of FPC and Lazarus?
Specialize a type, not a var.

lublinkermi

  • New Member
  • *
  • Posts: 46
Re: Program compiled with lazarus on Windows 10 and linux share
« Reply #2 on: August 24, 2019, 06:40:44 am »
FPC 2.6.2
Lazarus 1.0.12

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: Program compiled with lazarus on Windows 10 and linux share
« Reply #3 on: August 24, 2019, 07:24:20 am »
I compiled the program under Windows 10 and it works correctly locally, while on the mapped network drive (samba) I get the message: Reference returned from the server. Running as an administrator does not help. The same program works correctly under Windows XP and Windows 7. Interestingly, the program compiled in the earlier Lazarus version works on this network drive.
I tried many things related to permissions but to no avail. The program runs a few times and then doesn't want to ...
which versions of FPC and Lazarus?
FPC 2.6.2
Lazarus 1.0.12
It seems like there is a misconfiguration problem on Linux OS or Samba.
Just for testing purposes (this is not a solution at all), try:
#chmod 777 YourProgram.exe

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Program compiled with lazarus on Windows 10 and linux share
« Reply #4 on: August 24, 2019, 07:27:57 am »
I compiled the program under Windows 10 and it works correctly locally, while on the mapped network drive (samba) I get the message: Reference returned from the server. Running as an administrator does not help. The same program works correctly under Windows XP and Windows 7. Interestingly, the program compiled in the earlier Lazarus version works on this network drive.

I tried many things related to permissions but to no avail. The program runs a few times and then doesn't want to ...

Hmm, don't understand. "The program runs a few times and then doesn't want to ..." - do you mean it does run from the Samba drive a few times then fails. Or do you mean it also fails when the binary is on a local drive ?

FPC 2.6.2, Lazarus 1.0.12 - very old versions indeed. Where on earth did you get them from ?

Have you checked the Samba logs, samba does report on anything its likely to be responsible for. Are there any other required files for the application that also need to be in same place as the executable ?  Can you run other executables from the Samba drive ? 

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

lublinkermi

  • New Member
  • *
  • Posts: 46
Re: Program compiled with lazarus on Windows 10 and linux share
« Reply #5 on: August 25, 2019, 06:55:23 pm »
It runs four or five times and does not work later. You need to restart your computer then working next for or five times.
On Samba  I can delete , modify, create , rename any file.
That there would be no doubt I run executables from the Samba drive

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Program compiled with lazarus on Windows 10 and linux share
« Reply #6 on: August 26, 2019, 10:14:03 am »
It runs four or five times and does not work later. You need to restart your computer then working next for or five times.
Thats crazy !  - some silly suggestions from a non windows user -
Check for memoryleaks, turn heaptrc on in project options - debugging.
From memory, windows has a number of other things it can run out of ....
Use the tool that shows running processes, cannot remember its name to see if something is being left in memory after your app has terminated.
Quote
On Samba  I can delete , modify, create , rename any file.
That there would be no doubt I run executables from the Samba drive
Don't be too sure of that. Some virus (and similar) checking tools prevent apps from starting from places they don't approve of. How about making a "helloWorld" in Lazarus and trying that ?

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

lublinkermi

  • New Member
  • *
  • Posts: 46
Program compiled with lazarus on Windows 10 and linux share
« Reply #7 on: September 07, 2019, 06:41:50 am »
This is very strange behavior of Windows or Lazarus.
A program compiled with a version 1.0.12  sometimes works,  it doesn't work on the latest version.
Compiled on version 0.9.30 works fine!!!

What is going one???

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Program compiled with lazarus on Windows 10 and linux share
« Reply #8 on: September 07, 2019, 11:10:42 am »
I suggest you consider a newer version, not an older version. I think there will be a lot more interest in your problem is you are using a vaguely current version of Lazarus/FPC

Get something current on, rebuild and look for warnings/errors - and then let us know what you find.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Program compiled with lazarus on Windows 10 and linux share
« Reply #9 on: September 07, 2019, 11:24:18 am »
This is very strange behavior of Windows or Lazarus.
A program compiled with a version 1.0.12  sometimes works,  it doesn't work on the latest version.
Compiled on version 0.9.30 works fine!!!

What is going one???
Lazarus became more popular so antivirus recognized some pattern and recognized it as false positive? Remember that Delphi and Lazarus executables are self contained and do not need external dependencies so they are popular with hackers and malware creators.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

jamie

  • Hero Member
  • *****
  • Posts: 6091
Re: Program compiled with lazarus on Windows 10 and linux share
« Reply #10 on: September 07, 2019, 05:14:47 pm »
There were/are issues when transferring to fpc 3.x.x and up from older versions, this is when the UTF8 support kicked in automatically..

 You may need to check the use of your strings.
The only true wisdom is knowing you know nothing

 

TinyPortal © 2005-2018