Recent

Author Topic: I get this error since i remove 1.2.2  (Read 12633 times)

MicroTec

  • New Member
  • *
  • Posts: 10
    • PC based Oscilloscopes and data acquisition (DAQ)
Re: I get this error since i remove 1.2.2
« Reply #15 on: September 05, 2014, 06:10:59 pm »
Too bad, it looks like I had to drop using Lazarus for mu project.
Apparently it is not possible to install Lazarus on a Danish Windows 7 32-bit   :(

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: I get this error since i remove 1.2.2
« Reply #16 on: September 05, 2014, 06:26:29 pm »
I would suggest logging a bug in the bug tracker for the unicode filename issue.

As the issue only seems to affect your configuration directory, when you install Lazarus you could choose "Secondary Installation" (I think it's called).  Choosing this will allow you to use a different configuration folder.  Until the bug is fixed, you will need to ensure your configuration folder doesn't contain any unicode characters.  An ugly solution I agree, but should allow you to continue with Lazarus.
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

MicroTec

  • New Member
  • *
  • Posts: 10
    • PC based Oscilloscopes and data acquisition (DAQ)
Re: I get this error since i remove 1.2.2
« Reply #17 on: September 08, 2014, 02:59:02 pm »
I now have made ​​a "Secondary Installation" and selected the path C:\Lazarus_settings for the settings
It does not work, now I get this error message, and then Lazarus terminates  >:(

Have anyone got Lazarus to work on Windows 7 32-bit?

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: I get this error since i remove 1.2.2
« Reply #18 on: September 08, 2014, 03:08:27 pm »
I now have made ​​a "Secondary Installation" and selected the path C:\Lazarus_settings for the settings
It does not work, now I get this error message, and then Lazarus terminates  >:(

Have anyone got Lazarus to work on Windows 7 32-bit?
I understand your frustration.   

I have an installation on Win 7 32bit, no problems.  My locale is Australia though (which means I didn't get any of your earlier unicode issues), and my user is in the administrators group.  I mention that as that error looks like a windows write permission issue.  Does your user have write permissions to that folder? 

I presume you're tried manually creating a file in that folder?  If that worked, what happens when you try running lazarus as administrator? (right click on the shortcut, choose "Run As Administrator")
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: I get this error since i remove 1.2.2
« Reply #19 on: September 08, 2014, 03:28:42 pm »
I now have made ​​a "Secondary Installation" and selected the path C:\Lazarus_settings for the settings
It does not work, now I get this error message, and then Lazarus terminates  >:(

Have anyone got Lazarus to work on Windows 7 32-bit?
Are you sure your user has full permissions on that folder without needing administrator permissions? Perhaps UAC is spoiling things. You could go to the folder, properties, security, and take ownership of it so you have full control permissions on it and its subfolders.

I've got Laz 1.2.4 working just fine on Win 7 64-bit. (As well as Laz trunk+FPC trunk using fpcup)

<edit: hmmm, looks a lot like Mike's post above. Good: at least we think alike ;) >
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: I get this error since i remove 1.2.2
« Reply #20 on: September 08, 2014, 03:42:33 pm »
I would suggest logging a bug in the bug tracker for the unicode filename issue.
Question to other readers: Out of curiosity - has anyone else experienced problems with unicode characters in their lazarus settings path name?

Thinking ahead (not enough information to conclude this yet): If the issue @Microtec is experiencing does turn out to be permission based, I'm wondering if that wasn't the issue all along...
Quote
<edit: hmmm, looks a lot like Mike's post above. Good: at least we think alike ;) >
:)  Well, there's a good value to variety when problem solving, so this isn't always good, but yeah, confirmation is good too :)
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

MicroTec

  • New Member
  • *
  • Posts: 10
    • PC based Oscilloscopes and data acquisition (DAQ)
Re: I get this error since i remove 1.2.2
« Reply #21 on: September 08, 2014, 04:03:58 pm »
I would suggest logging a bug in the bug tracker for the unicode filename issue.
Question to other readers: Out of curiosity - has anyone else experienced problems with unicode characters in their lazarus settings path name?

Thinking ahead (not enough information to conclude this yet): If the issue @Microtec is experiencing does turn out to be permission based, I'm wondering if that wasn't the issue all along...
Quote
<edit: hmmm, looks a lot like Mike's post above. Good: at least we think alike ;) >
:)  Well, there's a good value to variety when problem solving, so this isn't always good, but yeah, confirmation is good too :)

It's my private computer and I have all permission including write access to both the path %userprofile%\AppData\Local\lazarus and C:\Lazarus_settings in my second test (Note: no unicode characters letters in this path).

I also have tried running lazarus as administrator, same result.

Nothing works.

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: I get this error since i remove 1.2.2
« Reply #22 on: September 08, 2014, 04:10:48 pm »
It's my private computer and I have all permission including write access to both the path %userprofile%\AppData\Local\lazarus and C:\Lazarus_settings in my second test (Note: no unicode characters letters in this path).

I also have tried running lazarus as administrator, same result.

Nothing works.
Ummm....  At this stage I'm out of ideas.

I'm away from my Win 7 32bit installation at the moment, so I'm going to create a virtual Win7 32bit PC, set to Danish Locale, and see if I can't reproduce your issue through that.  That'll take some time though...

UPDATE: Oh hang on.  I had issues once with AVG (antivirus) and Lazarus - I had to exclude my Lazarus installation folder though, not my configuration folder...   I honestly can't see it being that, but could you try temporarily disabling your AV.

Also, to assist me with trying to reproduce your issue, could you let me the exact filename of the installer you're trying with?  I'll use the same...
« Last Edit: September 08, 2014, 04:13:17 pm by Mike.Cornflake »
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: I get this error since i remove 1.2.2
« Reply #23 on: September 08, 2014, 04:11:12 pm »
1. Please humour me: start a cmd window and copy a file from somewhere to that directory using the copy command to check, e.g.
Code: [Select]
copy c:\windows\system32\cmd.exe C:\Lazarus_settings\

2. Try starting lazarus on the command line with debug logging enabled, e.g. (adjust paths):
Code: [Select]
lazarus --debug-log=c:\somedirectory\lazdebuglog.txt

And post the output zipped as an attachment.

I know you're more frustrated than we but I'm getting a bit anxious to get it working. It just shouldn't be that hard.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

MicroTec

  • New Member
  • *
  • Posts: 10
    • PC based Oscilloscopes and data acquisition (DAQ)
Re: I get this error since i remove 1.2.2
« Reply #24 on: September 08, 2014, 04:24:35 pm »
1. Please humour me: start a cmd window and copy a file from somewhere to that directory using the copy command to check, e.g.
Code: [Select]
copy c:\windows\system32\cmd.exe C:\Lazarus_settings\

2. Try starting lazarus on the command line with debug logging enabled, e.g. (adjust paths):
Code: [Select]
lazarus --debug-log=c:\somedirectory\lazdebuglog.txt

And post the output zipped as an attachment.

I know you're more frustrated than we but I'm getting a bit anxious to get it working. It just shouldn't be that hard.

1. Copy cmd.exe to C:\Lazarus_settings\ no problems

2. Log file attached

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: I get this error since i remove 1.2.2
« Reply #25 on: September 08, 2014, 04:40:01 pm »
That's just... weird.

I'm assuming there's no C:\Lazarus_settings\environmentoptions.xml at all present, right?

I'd suggest opening a bug, attaching the log and mentioning the test you did with the copy to indicate it's not a permissions problem.

Perhaps Mattias (the Lazarus guru) or another experienced dev will know/can infer what's going on and suggest further steps (not everyone reads this forum).

Thanks,
BigChimp
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: I get this error since i remove 1.2.2
« Reply #26 on: September 08, 2014, 04:52:06 pm »
The only things I can think of that would cause an EFCreateError are: 
*  Permissions (we've ruled that one out). 
*  A locked file already exists (but Lazarus would detect that and wouldn't be attempting to copy a new one over)
*  Not enough file space (trivial issue that I think we can rule out.  Windows itself would be complaining if there was that little filespace)
*  Corruption on the HDD (could you run "chkdsk C:\ /f /x" from the command line?  This will likely require a reboot, and the drive will be scanned during startup)
*  Illegal characters in the filename (nope, nothing wrong with either "C:\lazarus_extra\environmentoptions.xml" or "C:\Lazarus_settings\environmentoptions.xml" in any locale...)
*  Antivirus blocking the file create (Could you try either disabling the AV, or excluding both C:\lazarus_extra\ and C:\Lazarus_settings\ from the AV?)

Only other thing I can think of trying is manually copying environmentoptions.xml from C:\lazarus_extra\ to C:\Lazarus_settings\, then restarting Lazarus.  I don't expect that to solve the issue, but will move Lazarus onto the next file in it's list, and may give us extra information as to what's going wrong...
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: I get this error since i remove 1.2.2
« Reply #27 on: September 09, 2014, 05:22:39 pm »
Tracking the source code that produced the exception:
Code: [Select]
function CopyFile(const SrcFilename, DestFilename: String;
                  Flags: TCopyFileFlags=[cffOverwriteFile]): Boolean;
...
    DestHandle := FileCreateUTF8(DestFileName);
    if (THandle(DestHandle)=feInvalidHandle) then
      raise EFCreateError.createfmt({SFCreateError}'Unable to create file "%s"',[DestFileName]);
...

On older version FileCreateUTF8 used to be:
Code: [Select]
function FileCreateUTF8(Const FileName : string) : THandle;
begin
..
    Result := CreateFileW(PWideChar(UTF8Decode(FileName)), GENERIC_READ or GENERIC_WRITE,
                          0, nil, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
end;

While now:
Code: [Select]
function FileCreateUTF8(Const FileName : string) : THandle;
begin
  Result := _FileCreateUtf8(FileName, fmShareExclusive, 0);
end;

and _FileCreateUtf8 is a variable gets the value FileCreateWide:
Code: [Select]
function FileCreateWide(Const FileName : string; ShareMode: Integer; Rights: Integer) : THandle;
begin
  Result := CreateFileW(PWideChar(UTF8Decode(FileName)), GENERIC_READ or GENERIC_WRITE,
        dword(ShareModes[(ShareMode and $F0) shr 4]), nil, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
end;

That boils down to the value passed in the 3rd parameter:
Older version: 0
Newer version: ShareModes[(fmShareExclusive and $F0) shr 4])
maybe it is 0 as well?

 

TinyPortal © 2005-2018