issue-#31 Opened files damage
-
- Posts: 1700
- Joined: Tue Sep 17, 2013 12:21 am
- Location: Russia
issue-#31 Opened files damage
I am starting intensively use the master version in development with Wine 1.6.2 on Ubuntu 14.04 and after some time (approx once an hour) opened file damaging and do not allow to save any files on working directory. The damage can by thorough the all document or only Unicode strings.
- Attachments
-
- damage.png (7.34 KiB) Viewed 19758 times
-
- Posts: 1700
- Joined: Tue Sep 17, 2013 12:21 am
- Location: Russia
Re: issue-#31 Opened files damage
I found that possibly this is because I am using modified HostPorts for Cairo drawing and did not recompiled it... there are small changes in the code.
Now I fixed this and will monitor the bug during the day.
Now I fixed this and will monitor the bug during the day.
-
- Posts: 1700
- Joined: Tue Sep 17, 2013 12:21 am
- Location: Russia
Re: issue-#31 Opened files damage
This was not related with Cairo Ports, after recompiling the problem was appearing again. I cleaned temporary folder in Wine with many ODC temporary files and this helps. The hypothesis is that the numbers of temporary files have collision. I do not know how to test this now, so I will study this question later. Anyway this bug exists.
-
- Posts: 1700
- Joined: Tue Sep 17, 2013 12:21 am
- Location: Russia
Re: issue-#31 Opened files damage
The problem can be with HostFiles... I will just put it here for not forget.
HostFiles
HostFiles
Code: Select all
PROCEDURE GetTempFileName (IN path: FullName; OUT name: FullName; num: INTEGER);
VAR i: INTEGER; str: ARRAY 16 OF CHAR;
BEGIN
str := tempName; i := 7;
WHILE i > 2 DO
str[i] := CHR(num MOD 10 + ORD("0")); DEC(i); num := num DIV 10
END;
Append(path, str, "", 8, name)
END GetTempFileName;
PROCEDURE CreateFile (f: File; VAR res: INTEGER);
VAR num, n: INTEGER;
BEGIN
IF f.name = "" THEN
num := WinApi.GetTickCount(); n := 200;
REPEAT
GetTempFileName(f.loc.path, f.name, num); INC(num); DEC(n);
OpenFile(create, f.name, f.ref, res)
UNTIL (res # fileExistsErr) & (res # alreadyExistsErr) & (res # paramErr) OR (n = 0)
ELSE
OpenFile(f.state, f.name, f.ref, res)
END
END CreateFile;
-
- Posts: 1700
- Joined: Tue Sep 17, 2013 12:21 am
- Location: Russia
Re: issue-#31 Opened files damage
This bug appears again today... and I had not many temporary files in the folder now. So it is really strange.
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: issue-#31 Opened files damage
Are you using an NFS filesystem or any other 'special' file system instead of a file system for the local disc?
Re: issue-#31 Opened files damage
In my opinion it has noting to do with Ubuntu, temporary files or the files system ext4, ntfs or fat.
I had similar problems in the past on Ubuntu and on Windows when I mixed up modules that are compiled with different version of BlackBox.
The best way is to delete all code and sym files (both - one of them is not enough) and recompile everything.
- Helmut
I had similar problems in the past on Ubuntu and on Windows when I mixed up modules that are compiled with different version of BlackBox.
The best way is to delete all code and sym files (both - one of them is not enough) and recompile everything.
- Helmut
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: issue-#31 Opened files damage
What is the correct form of the file supposed to look like?Ivan Denisov wrote:This bug appears again today... and I had not many temporary files in the folder now. So it is really strange.
Are you using a lot of cyrillic characters in the text?
Some parts of the text still look correct, some parts look strange.
Is it possible that the ASCII part of the text is preserved and only the extended
Unicode part causes the problems?
Or is everything messed up?
- Josef
-
- Posts: 1700
- Joined: Tue Sep 17, 2013 12:21 am
- Location: Russia
Re: issue-#31 Opened files damage
Everything was messed up.Josef Templ wrote:Some parts of the text still look correct, some parts look strange.
Is it possible that the ASCII part of the text is preserved and only the extended
Unicode part causes the problems?
Or is everything messed up?
For example there is the end of the module.
Code: Select all
...
BEGIN
fontMess := Fonts.dir.This("Verdana", 10 * Ports.point, {}, Fonts.normal);
fontWarn := Fonts.dir.This("Verdana", 14 * Ports.point, {}, Fonts.normal)
CLOSE
IF (ЛюмиЛогика.активноеСоединение # NIL) & (ЛюмиЛогика.активноеСоединение.измеритель # NIL) THEN
РазобернутьОтображение(ЛюмиЛогика.активноеСоединение.измеритель)
END
END ЛюмиЛицо.