issue-#31 Opened files damage

Issues whose status has been set to 'Dormant'
Post Reply
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

issue-#31 Opened files damage

Post by Ivan Denisov »

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
damage.png (7.34 KiB) Viewed 13335 times
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#31 Opened files damage

Post by Ivan Denisov »

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.
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#31 Opened files damage

Post by Ivan Denisov »

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.
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#31 Opened files damage

Post by Ivan Denisov »

The problem can be with HostFiles... I will just put it here for not forget.
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;
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#31 Opened files damage

Post by Ivan Denisov »

This bug appears again today... and I had not many temporary files in the folder now. So it is really strange.
Attachments
2016-07-26.png
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#31 Opened files damage

Post by Josef Templ »

Are you using an NFS filesystem or any other 'special' file system instead of a file system for the local disc?
Zinn
Posts: 476
Joined: Tue Mar 25, 2014 5:56 pm
Location: Frankfurt am Main
Contact:

Re: issue-#31 Opened files damage

Post by Zinn »

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
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#31 Opened files damage

Post by Josef Templ »

Ivan Denisov wrote:This bug appears again today... and I had not many temporary files in the folder now. So it is really strange.
What is the correct form of the file supposed to look like?
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
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#31 Opened files damage

Post by Ivan Denisov »

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?
Everything was 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 ЛюмиЛицо.
On the screen shot you can see, that this variables fontMess and fontWarn skipped to the beginning.
Post Reply