Recent

Author Topic: Can not save any project or source file - access violation.  (Read 14205 times)

kriz_ze_kraut

  • New Member
  • *
  • Posts: 14
Can not save any project or source file - access violation.
« on: November 03, 2014, 09:08:35 pm »
Hello,
I have the following setup:

lazarus ide 1.2.6
fpc 2.6.4
ubuntu 14.04 LTS

Have been trying to get started for two weeks, but no chance: any time I want so save anything, 'access violation'. Sudoing Lazarus doesn't help.

There is a similar topic which is said to be Mint specific. Maybe it isn't?

Thanks in advance - kriz

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Can not save any project or source file - access violation.
« Reply #1 on: November 04, 2014, 09:23:02 am »
Why would you sudo Lazarus?
If you installed via the debs (or any way, really), you should run as a regular user.

Is the directory where you try to save your project writeable for your user?
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

Bart

  • Hero Member
  • *****
  • Posts: 5706
    • Bart en Mariska's Webstek
Re: Can not save any project or source file - access violation.
« Reply #2 on: November 04, 2014, 01:27:27 pm »
What windowmanager are you using (Unity perhaps)?

You can try to run lazarus in gdb an get a backtrace.

Bart

kriz_ze_kraut

  • New Member
  • *
  • Posts: 14
Re: Can not save any project or source file - access violation.
« Reply #3 on: November 05, 2014, 10:34:24 pm »
Hi to both of you, ant thanks a lot!

Unfortunately, I never even get to the point where I can decide which directory to save to: the moment I click 'save as' I get the 'access violation' - with the choice of either not to save or to quit Lazarus.

I'll try to follow Bart's advise and run a gdp back trace. After two weeks exposure to Ubuntu that should be a piece of cake...

For the installation, I followed this link:
http://wiki.lazarus.freepascal.org/Lazarus_release_version_for_Ubuntu
My window manager is Compiz.

Thank you very much for your help!

Kriz

CM630

  • Hero Member
  • *****
  • Posts: 1652
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: Can not save any project or source file - access violation.
« Reply #4 on: November 06, 2014, 10:40:12 am »
Have been trying to get started for two weeks, but no chance: any time I want so save anything, 'access violation'. Sudoing Lazarus doesn't help.
'access violation' does not sound to me like "file permission denied", but rather like "memory access violation". If so, sudo should not help. And as you have described, you cannot even get to the "Save as..." dialogue. Otherwise you could have tried to save on a FAT or NTFS file system (i.e. flash drive), though AFAIK you cannot execute binaries from a non-linux OS.
Did you try to open another (existing) project and see if you can save changes? I can make an empty project for you.
Лазар 4,4 32 bit (sometimes 64 bit); FPC3,2,2

Bart

  • Hero Member
  • *****
  • Posts: 5706
    • Bart en Mariska's Webstek
Re: Can not save any project or source file - access violation.
« Reply #5 on: November 06, 2014, 11:57:07 am »
Does Menu->Project->Open project (which shows a fileOpenDialog) also crash?

Bart

minesadorada

  • Sr. Member
  • ****
  • Posts: 453
  • Retired
Re: Can not save any project or source file - access violation.
« Reply #6 on: November 06, 2014, 12:29:57 pm »
Is this a UTF /Internationalization issue?
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Can not save any project or source file - access violation.
« Reply #7 on: November 06, 2014, 12:39:08 pm »
@minesadorada: who knows? Let's first do some fault finding to find out what the problem is. Running lazarus under the debugger should give a good indication.
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

kriz_ze_kraut

  • New Member
  • *
  • Posts: 14
Re: Can not save any project or source file - access violation.
« Reply #8 on: November 06, 2014, 11:08:35 pm »
Hi to all of you!

Does Menu->Project->Open project (which shows a fileOpenDialog) also crash?
Not immediately - only when I try to save that project afterwards. The moment I click on 'Save As' I get the 'Access  Violation' and thereafter Laz hangs. It's got to be something about my installation, but first I installed ubuntu, and then (following the book) I installed Laz. I reinstalled once, but the results were exactly the same.

The gdb back trace I can only do after the weekend.
The disk filing system, btw., is standard - whatever Ubuntu uses for a first-time installation.

Thanks a lot, and good knight!

kriz

kriz_ze_kraut

  • New Member
  • *
  • Posts: 14
Re: Can not save any project or source file - access violation.
« Reply #9 on: November 07, 2014, 06:34:35 pm »
Hi to everybody!

Finally, I de- and then re-installed, and it works now ('Hello World!'). I assume now that the trouble was due to the first de-installation being incomplete. I purged now everything using 'find', etc.

For the installation, I followed the procedure on this link:

http://wiki.lazarus.freepascal.org/Install_on_Ubuntu_from_.deb_files

It seems that I still haven't understood the Wiki to an extend where I can locate the appropriate HowTo for exactly the current version.

In any case, I am impressed by the readiness of you folks to help an absolute newbie!

Kind regards - kriz

kriz_ze_kraut

  • New Member
  • *
  • Posts: 14
Re: Can not save any project or source file - access violation.
« Reply #10 on: November 11, 2014, 05:04:01 pm »
Hi everybody,
it's working now and the bug is back: whenever the 'save as' dialogue opens with even the slightest problem (such as: the file to save exists already, etc.), then the response is always 'Access Violation'. Sometimes the system hangs then and has to be terminated, but most of the time I can proceed.

Nevertheless, I have converted some 1500 lines of Delphi code so far and it is doing something. Not yet the real thing, but that will follow during the next couple of days, I am sure. Thank you all!

If someone wants an error dump or some such thing on the above problem, I'd be very happy to provide!

Best regards - Kriz

kriz_ze_kraut

  • New Member
  • *
  • Posts: 14
Re: Can not save any project or source file - access violation.
« Reply #11 on: November 11, 2014, 05:08:24 pm »
Hi everybody,
it's working now and the bug is back: whenever the 'save as' dialogue opens with even the slightest problem (such as: the file to save exists already, etc.), then the response is always 'Access Violation'. Sometimes the system hangs then and has to be terminated, but most of the time I can proceed.

Nevertheless, I have converted some 1500 lines of Delphi code and it is doing something. Not yet the real thing, but that will follow during the next couple of days, I am sure. Thank you all!

If someone wants an error dump or some such thing on the above problem, I'd be very happy to provide!

Best regards - Kriz

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Can not save any project or source file - access violation.
« Reply #12 on: November 11, 2014, 05:45:37 pm »
Sorry to hear you're still having problems; glad you're persevering!

As Bart suggested earlier, a gdb backtrace/stacktrace would be nice as it may give an idea where the problem is.

BTW: you can set up a completely separate FPC+Lazarus trunk (development version) install if you want to, e.g. using the fpcup [1] tool (see wiki, note: I'm one of the authors).
As all fixes go into trunk, it may be that the bug is solved for you...

[1]
http://wiki.lazarus.freepascal.org/fpcup
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

kriz_ze_kraut

  • New Member
  • *
  • Posts: 14
Re: Can not save any project or source file - access violation.
« Reply #13 on: November 12, 2014, 10:47:50 pm »
Maybe I have something better than a gdb trace: it now also happens in my own source code, the moment I open an opendialog. The message looks like this:

Project taxes raised exception class 'External: SIGSEGV'. At address B7173926.

I have traced it to this function in 'commondialog.inc'. It happens inside the '      Application.HandleMessage'; 
Code is at the bottom of this message.

An earlier contributor had suggested, that the problem might be between my filing system and Lazarus.
Ubuntu says ext3/ext4, but then, I also have an external 2T drive mounted. Ubuntu doesn't say anything about that guy's filing system, but I believe it is NTFS, since it has been hooked to a Windows machine before. I am going to disconnect that drive and see what happens.

After that, it will be gdb resp. fpcup...

Thanks a lot for your advice.  :)

And good night - kriz

function TCommonDialog.DoExecute : boolean;
var
  CanClose: boolean;
begin
  FCanCloseCalled := False;
  if Assigned(FOnShow) then
    FOnShow(Self);
  TWSCommonDialogClass(WidgetSetClass).ShowModal(Self);
  // can close was called from widgetset loop
  if not FCanCloseCalled then
  begin
    repeat
      if (FUserChoice <> mrNone) and (Handle<>0) then
      begin
        CanClose := True;
        DoCanClose(CanClose);
        if not CanClose then
          FUserChoice:=mrNone;
      end;
      if FUserChoice <> mrNone then
        break;
      { win32 widgetset dialogs use their own message loop,
        so only FUserChoice may have been set already }
      Application.HandleMessage;
    until false;
  end;
  Result := (FUserChoice = mrOk);
end;
     

kriz_ze_kraut

  • New Member
  • *
  • Posts: 14
Re: Can not save any project or source file - access violation.
« Reply #14 on: November 13, 2014, 08:57:10 am »
Hi everybody,

removing a USB-drive and a stick on another server and then rebooting did not help.
So it happens within the repeat loop of the code snippet that I posted last.

Kind regards - Kriz

 

TinyPortal © 2005-2018