Re: [Lazarus] bad luck

2016-02-03 Thread Marc Santhoff
Hi again,

the crash on CTRL-F9 occurs in the same way as soon as I start lazarus
using the old confguration directory. It's the one active when the error
first happend. The files in ~/.lazarus/ are visibly OK, formally correct
XML most of them.

Lacking time and need I did nothing but moving the configuration out of
the way making anything work but running programs. Compiling works OK
but when started hitting the button with the green arrowhead or typing
F9 there is a debugger error popping up, see attached picture.

Somthing is really fishy in the installation. What can I do now to find
the cause of those errors?

In the end I will erase anything and restore from backup, but I think
searching the cause is a good idea.


On Fr, 2016-01-29 at 21:10 +0100, Marc Santhoff wrote:
> Hi,
> 
> I really had some bad luck today. When starting Lazarus it worked
> normally first. Then I created a new unit, saved it having an
> appropriate name, typed in a class definition without any fields or
> methods and Hit CTRL-F9. That was the moment when my computer freezed
> for a while, say 30 seconds, and rebooted.
> 
> Afterwards Lazarus' configuration was hosed, the open projects .lpi was
> unreadable, .lpi.bak, .lpr and .lpr.bak were zero length. The file
> system had a lot of errors.
> 
> I think the crash could be triggered by the fact that I have a  new,
> freshly cleaned and compiled Lazarus 1.4.4 and fpc 3.0.0 because I had
> to upgrade the compiler lastly for some reason. The projects object
> files may be new or old, but some other dependencies will relatively
> sure be old files from fpc 2.6.4.
> 
> OK, shit happens, but I wished there would be less destruciton in work
> files. It is possible to care for keeping files, I know since I had to
> program a system prone to spontaneous reboots to keep files under any
> circumstances and in the end it worked.
> 
> I had sth. similar once when running the debugger quite often and having
> to stop in the middle of the program for a source change. That made my
> computer fail similarly, destroying files.
> 
> Where in Lazarus sources are the spots handling file opening and saving
> when hitting CTRL-F9? Or do I need to look at the compiler, too?
> 
> And, maybe someone having enough knowledge can explain a bit aournd
> these spot?
> 
> TIA,
> Marc
> 

-- 
Marc Santhoff 
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] bad luck

2016-01-29 Thread Mark Morgan Lloyd

Marc Santhoff wrote:

Good /God/ man, is that all? I opened this expecting to find that a 
member of the community was in real trouble (frankly, the sort of thing 
I was almost in over the last week).


It's enough. Costs me hour of frustrating work recreating anything,
doing nothing fruitful. Moreover I'm sitting on a time bomb, because I
really do not know, what other files may have been damaged. Last time
this happened I had some failures in other software that was detected
weeks(!) after the incident.


I'm currently using an elderly Toughbook, because something else in my 
workroom took the power out sufficiently viciously that the lights 
flickered 300m away and I've been too busy to go around everything with 
a PAT tester to find the culprit. And that's been the least of the 
problems over the last few days... curiously, some of them have been 
caused by my strident insistence that colleagues should exploit our 
central servers (which have RAID etc.) rather than relying on the aging 
hardware and OSes under their desks.



So, what know? Taken seriously I have to restore the complete system and
data from backup.

Seems I deserved some trouble because I'm not running development tools
on a dedicated machine or inside a virtual environment...

What OS are you running, and how much privilege had you given yourself? 


FreeBSD 9, simple user having sudo privilges but nothing run as root or
by sudo. The session was the same as ever - besides Lazarus.

Frankly, I think the suggestion that Lazarus /might/ have caused a 
system crash is more serious than the discovery that a system crash 
probably corrupted files.


You're right. That's why I told the story as introduction.

What I asked for is help locating and understanding Lazarus' file
handling. Some standard errors like unneccessarily holding files open
when not in use can be avoided easily.


Yes, that's a good point although there's also issues about whether the 
underlying OS, computer and attached peripherals really are syncing data 
as reliably as expected. The bottom line- of which I was reminded 
regularly during my unhappy time running OS/2- is that an OS will 
attempt to preserve the integrity of its filesystems but makes no 
guarantee about individual files, and that there's no way of determining 
that a file's been sacrificed. It's interesting to speculate on whether 
something like Lazarus could benefit from storing projects onto a 
transaction-aware database server rather than as individual files.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] bad luck

2016-01-29 Thread Marc Santhoff
On Fr, 2016-01-29 at 21:21 +, Mark Morgan Lloyd wrote: 
> Marc Santhoff wrote:
> > Hi,
> > 
> > I really had some bad luck today. When starting Lazarus it worked
> > normally first. Then I created a new unit, saved it having an
> > appropriate name, typed in a class definition without any fields or
> > methods and Hit CTRL-F9. That was the moment when my computer freezed
> > for a while, say 30 seconds, and rebooted.
> > 
> > Afterwards Lazarus' configuration was hosed, the open projects .lpi was
> > unreadable, .lpi.bak, .lpr and .lpr.bak were zero length. The file
> > system had a lot of errors.
> 
> Good /God/ man, is that all? I opened this expecting to find that a 
> member of the community was in real trouble (frankly, the sort of thing 
> I was almost in over the last week).

It's enough. Costs me hour of frustrating work recreating anything,
doing nothing fruitful. Moreover I'm sitting on a time bomb, because I
really do not know, what other files may have been damaged. Last time
this happened I had some failures in other software that was detected
weeks(!) after the incident.

So, what know? Taken seriously I have to restore the complete system and
data from backup.

Seems I deserved some trouble because I'm not running development tools
on a dedicated machine or inside a virtual environment...

> What OS are you running, and how much privilege had you given yourself? 

FreeBSD 9, simple user having sudo privilges but nothing run as root or
by sudo. The session was the same as ever - besides Lazarus.

> Frankly, I think the suggestion that Lazarus /might/ have caused a 
> system crash is more serious than the discovery that a system crash 
> probably corrupted files.

You're right. That's why I told the story as introduction.

What I asked for is help locating and understanding Lazarus' file
handling. Some standard errors like unneccessarily holding files open
when not in use can be avoided easily.

-- 
Marc Santhoff 



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] bad luck

2016-01-29 Thread Mattias Gaertner
On Fri, 29 Jan 2016 22:54:00 +0100
Marc Santhoff  wrote:

>[...]
> What I asked for is help locating and understanding Lazarus' file
> handling. Some standard errors like unneccessarily holding files open
> when not in use can be avoided easily.

The IDE does not hold files open.

There was a bug some days ago, that could cause the backup to erase the
file even when the file is not written, resulting in an empty file.

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] bad luck

2016-01-29 Thread Marc Santhoff
Hi,

I really had some bad luck today. When starting Lazarus it worked
normally first. Then I created a new unit, saved it having an
appropriate name, typed in a class definition without any fields or
methods and Hit CTRL-F9. That was the moment when my computer freezed
for a while, say 30 seconds, and rebooted.

Afterwards Lazarus' configuration was hosed, the open projects .lpi was
unreadable, .lpi.bak, .lpr and .lpr.bak were zero length. The file
system had a lot of errors.

I think the crash could be triggered by the fact that I have a  new,
freshly cleaned and compiled Lazarus 1.4.4 and fpc 3.0.0 because I had
to upgrade the compiler lastly for some reason. The projects object
files may be new or old, but some other dependencies will relatively
sure be old files from fpc 2.6.4.

OK, shit happens, but I wished there would be less destruciton in work
files. It is possible to care for keeping files, I know since I had to
program a system prone to spontaneous reboots to keep files under any
circumstances and in the end it worked.

I had sth. similar once when running the debugger quite often and having
to stop in the middle of the program for a source change. That made my
computer fail similarly, destroying files.

Where in Lazarus sources are the spots handling file opening and saving
when hitting CTRL-F9? Or do I need to look at the compiler, too?

And, maybe someone having enough knowledge can explain a bit aournd
these spot?

TIA,
Marc

-- 
Marc Santhoff 


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] bad luck

2016-01-29 Thread Mark Morgan Lloyd

Marc Santhoff wrote:

Hi,

I really had some bad luck today. When starting Lazarus it worked
normally first. Then I created a new unit, saved it having an
appropriate name, typed in a class definition without any fields or
methods and Hit CTRL-F9. That was the moment when my computer freezed
for a while, say 30 seconds, and rebooted.

Afterwards Lazarus' configuration was hosed, the open projects .lpi was
unreadable, .lpi.bak, .lpr and .lpr.bak were zero length. The file
system had a lot of errors.


Good /God/ man, is that all? I opened this expecting to find that a 
member of the community was in real trouble (frankly, the sort of thing 
I was almost in over the last week).


What OS are you running, and how much privilege had you given yourself? 
Frankly, I think the suggestion that Lazarus /might/ have caused a 
system crash is more serious than the discovery that a system crash 
probably corrupted files.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus