Recent

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

kriz_ze_kraut

  • New Member
  • *
  • Posts: 14
Re: Can not save any project or source file - access violation.
« Reply #15 on: November 16, 2014, 12:35:44 pm »
Hi to everyone,
the 'access violation' is indeed a memory access violation, and it happens in the file open dialogs whenever some error is not trapped (such as trying to save or merely opening a directory with no write access rights), and it happens both under Windows and under Linux, and the first messages in forums date back to 2009.
It happens both in the IDE itself and in programs that I wrote and compiled with the IDE.
What can I do to help fixing these bugs?
Kind 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 #16 on: November 16, 2014, 01:46:31 pm »
File open? Not file save? I'm getting confused...

You could provide a gdb trace in a bug report (there may be an existing bug report). (run gdb lazarus, then run, then run Lazarus till you get the AV, then bt to get a backtrace/stacktrace see http://wiki.lazarus.freepascal.org/Creating_a_Backtrace_with_GDB)

If possible, make sure you use the latest stable Laz version (or Lazarus trunk/development version)
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 #17 on: November 19, 2014, 11:03:11 am »
Hi there,

attached is now a gdb trace of laz up to the bug, and also the terminal output. Since it was my first experience with gdb, it may not (yet) include all necessary information, but - hey! - there's no harm in trying!

Best regards - Kriz
« Last Edit: November 19, 2014, 11:12:06 am by kriz_ze_kraut »

stuartbloom

  • New member
  • *
  • Posts: 8
Re: Can not save any project or source file - access violation.
« Reply #18 on: November 26, 2014, 12:26:56 pm »
Hi there,I am having EXACTLY the same issue.  I am running Ubuntu in a Virtual Box; evertying runs OK until I try to open the save dialog.

I have tried creating a gdb log, but when i run "gdb lazarus" I get "lazarus: No such file or directory" as the last line in gdb.

Any assistance would be most gratefully accepted.

Thanks in advance

Stuart

kriz_ze_kraut

  • New Member
  • *
  • Posts: 14
Re: Can not save any project or source file - access violation.
« Reply #19 on: November 26, 2014, 02:07:57 pm »
Hi Stuart,

this is what I did:
the pgm you need to gdb is not lazarus but startlazarus.
To find that, I used:

find / -name startlazarus 2>/dev/null

Once you found it, cd to that directory and then run 'gdb startlazarus'.
I did that and submitted the result, but so far no answer.


But you need not despair completely:
The exception seems to happen whenever you open the dialog in a directory where you don't have write access. If you have created your application UNDER your home directory, the dialog will open in that directory and you are OK. However, if you then try to open parent directories until you have reached your home, then Laz will crash again. Once this exception has happened, Laz is dead and you need to kill and restart it.
I am a newcomer to Linux und dabble just like yourself, but I have reasonable experience with Delphi.
The bug that concerns us here initially put me off Laz completely, but since I  found how to work around it, I have already converted several Delphi programs to Laz  which I am now happily using daily under Ubuntu.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Can not save any project or source file - access violation.
« Reply #20 on: November 27, 2014, 05:46:43 am »
gdb-ing startlazarus won't allow you to get proper backtrace, since the process space is different (startlazarus simply starts lazarus). it's correct to gdb lazarus, just point to the correct location of lazarus binary.

kriz_ze_kraut

  • New Member
  • *
  • Posts: 14
Re: Can not save any project or source file - access violation.
« Reply #21 on: November 27, 2014, 09:05:51 am »
Hi there,

here is now what comes out when I 'gdb lazarus' (instead of 'gdb startlazarus').
I ran laz, then opened 'save as' in my home directory, and bingo - the last three lines of this trace say it all.

This is particularly upsetting because it happens to newbies like myself: the moment you have installed Laz and you have looked at the example projects, when you hit 'save as' you have crashed Laz. (Because in the sample directory you don't have write rights). IMHO it shouldn't be too difficult to fix - especially since the rest of Lazarus seems to be quite a formidable package!

What must I do to submit this as a bug?

Best regards  -- Kriz

chris@chris-linux:/usr/share/lazarus/1.2.6$ ls
components                doceditor        languages     packager
converter                 docs             lazarus       README.txt
COPYING.GPL.txt           examples         lazarus.app   startlazarus
COPYING.LGPL.txt          fpmake_add.inc   lazbuild      startlazarus.app
COPYING.modifiedLGPL.txt  fpmake.pp        lcl           test
COPYING.txt               fpmake_proc.inc  localize.bat  tools
debian                    ide              localize.sh   units
debugger                  images           Makefile
designer                  install          Makefile.fpc
chris@chris-linux:/usr/share/lazarus/1.2.6$ gdb lazarus
GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from lazarus...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/share/lazarus/1.2.6/lazarus
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xb69bdb40 (LWP 11394)]
[New Thread 0xb5fffb40 (LWP 11395)]
TMainIDE.ParseCmdLineOptions:
  PrimaryConfigPath="/home/chris/.lazarus"
  SecondaryConfigPath="/etc/lazarus"
[New Thread 0xb525db40 (LWP 11396)]
[New Thread 0xb48ffb40 (LWP 11397)]
[New Thread 0xb40feb40 (LWP 11398)]
Looking for code tools config file:  "/home/chris/.lazarus/codetoolsoptions.xml"
NOTE: codetools config file not found - using defaults
[Thread 0xb40feb40 (LWP 11398) exited]
NOTE: help options config file not found - using defaults
TLazSourceFileManager.OpenProjectFile select form in designer: Form1:TForm1 TDesigner
[New Thread 0xb40feb40 (LWP 11400)]
[New Thread 0xae592b40 (LWP 11401)]
[New Thread 0xadbffb40 (LWP 11402)]
[New Thread 0xad1ffb40 (LWP 11403)]
[Thread 0xadbffb40 (LWP 11402) exited]
[Thread 0xad1ffb40 (LWP 11403) exited]
[Thread 0xb48ffb40 (LWP 11397) exited]
[Thread 0xb40feb40 (LWP 11400) exited]
[New Thread 0xb40feb40 (LWP 11404)]

Program received signal SIGSEGV, Segmentation fault.
0xb7172926 in ?? () from /usr/lib/i386-linux-gnu/libpixman-1.so.0
(gdb)

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Can not save any project or source file - access violation.
« Reply #22 on: November 27, 2014, 09:18:03 am »
What must I do to submit this as a bug?
Still at (gdb) prompt, type 'bt' to get full backtrace. Make sure your lazarus is compiled with debug info (Tools->Configure Build Lazarus->Profile to Build->Choose Debug IDE), otherwise the backtrace won't be useful enough. Copy and send it to the bugtracker, explaining the problem.

stuartbloom

  • New member
  • *
  • Posts: 8
Re: Can not save any project or source file - access violation.
« Reply #23 on: November 27, 2014, 10:13:54 am »
kriz_ze_kraut

Thank you very much.  Yeah, if I go to open a project in another folder, and then go to save, it work fine.

Now I can get to play :)

Thanks again

Stuart

kriz_ze_kraut

  • New Member
  • *
  • Posts: 14
Re: Can not save any project or source file - access violation.
« Reply #24 on: November 27, 2014, 07:59:32 pm »
Hi to all of you,

thank goodness there's a workaround!  :D

Eventually I DID get Laz recompiled with debug options. However, once I get Laz to crash, there is no output in the terminal window.
If the gdb trace is such an important tool, surely there is somewhere a description on how to produce it?

Kind regards -

Kriz
 

kriz_ze_kraut

  • New Member
  • *
  • Posts: 14
Re: Can not save any project or source file - access violation.
« Reply #25 on: November 27, 2014, 09:08:50 pm »
Hi all,

I got through to the bugtracker, and it is known there:

0025920: OpenDialog crashes with EXTERNAL:SIGSEV and RunError (216)

Priority=minor, which indeed it is once one knows the work-around.

Good night - kriz

 

TinyPortal © 2005-2018