Trap 25 on start

Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: Trap 25 on start

Post by Ivan Denisov »

As reported by Mathieu Westerweele this problem also took place.

I suggested to add

Code: Select all

prt = NIL
just after selecting current printer in Documents.StdDocument.SetView.

Code: Select all

		IF Printers.dir # NIL THEN prt := Printers.dir.Current() ELSE prt := NIL END;
		prt = NIL;   (*  <-----------  *) 
		IF prt # NIL THEN
			prt.SetOrientation(FALSE);
This helped.

So eliminating printer from calculation of document size and margins is solving current issue for this case.
There should be more correct calculations for size and margins of document for this rare printer configuration.
However this is difficult to do without ability of reproducing this in my PC.
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: Trap 25 on start

Post by Josef Templ »

maybe using assertions in SetPage is too restrictive.
Falling back to a useful default may be the alternative.

In any case, I would like to know where the strange settings come from.
All we need for finding that out is a user that is willing to help us diagnose the problem.

- Josef
Post Reply