Page 1 of 1

issue-#31 Opened files damage

Posted: Fri Mar 13, 2015 2:00 am
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.

Re: issue-#31 Opened files damage

Posted: Fri Mar 13, 2015 3:51 am
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.

Re: issue-#31 Opened files damage

Posted: Tue Mar 24, 2015 5:32 am
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.

Re: issue-#31 Opened files damage

Posted: Thu Feb 25, 2016 2:54 am
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;

Re: issue-#31 Opened files damage

Posted: Tue Jul 26, 2016 9:31 am
by Ivan Denisov
This bug appears again today... and I had not many temporary files in the folder now. So it is really strange.

Re: issue-#31 Opened files damage

Posted: Wed Jul 27, 2016 5:29 am
by Josef Templ
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

Posted: Wed Jul 27, 2016 9:26 am
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

Re: issue-#31 Opened files damage

Posted: Wed Aug 03, 2016 1:49 pm
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

Re: issue-#31 Opened files damage

Posted: Thu Aug 04, 2016 6:19 pm
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.