Q_Liberator malaise

Anything QL Software or Programming Related.
User avatar
BSJR
Trump Card
Posts: 223
Joined: Sun Oct 18, 2015 12:53 pm
Location: Amsterdam
Contact:

Re: Q_Liberator malaise

Post by BSJR »

Artificer wrote: Wed Jul 02, 2025 9:18 pm ...
SQRview remains a standalone. No error messages this time. Everything seems fine until an attempt to load a file causes it to lock up, interestingly SQRview does not have runtimes incorporated.

At the moment the Q604F runtimes are a major, major improvement.

Cheers and thanks
'
"So far this issue has been concentrating on QLib's "illegal" use of address bits. But as SQRview keeps falling over here, I wonder if other factors might be considered, apart from my programming skills.
One major component of SQRview is the DBAS engine for easier navigation through a picture directory. None of the other test subjects use this. Cold there be something similar at play here?
Does it lock up te same way with any file type?

SQRview has a config item to ignore DBAS so I wonder if a test with this item Off would make a difference.
Without reconfiguring, SQRview can also be started with "%D%" on the command line to toggle this On/Off.
Another test object could be SuQcess, where DBAS can not be ignored.

BSJR


Martin_Head
Aurora
Posts: 981
Joined: Tue Dec 17, 2013 1:17 pm

Re: Q_Liberator malaise

Post by Martin_Head »

Artificer wrote: Wed Jul 02, 2025 9:18 pm
qtrans was OK but slightly odd, in that it browses files, directories and execs files via FI2 but when asked to view a
file via its own internal viewer it hung up, otherwise it was OK.
Can you try this copy of QTrans.

It's not a fix. But it's a recompile, from a decompile of QTrans. With some debug messages added around the viewing of a file with the internal viewer. It will mess the screen up a bit, but it's only meant to see how far the program gets before it hangs in the Q60 with the cache on.

Test it first in QPC2 or the Q60 with the cache off, so you know what to expect to see. You can use the Q604F runtimes in QPC2.

I have included some screen shots of what to expect in QPC2.

Each message is followed by a PAUSE -1, so you need to hit a key to continue.

Hopefully it will help to point in the direction of the problem.
Attachments
Image2.png
Image4.png
Image5.png
qtran_debug.zip
(48 KiB) Downloaded 6 times


User avatar
Artificer
Trump Card
Posts: 162
Joined: Fri Nov 24, 2017 8:43 am

Re: Q_Liberator malaise

Post by Artificer »

BSJR wrote:
Another test object could be SuQcess, where DBAS can not be ignored.
Thanks for reminding me about SuQcess, all 3 versions of this that I have work perfectly with copyback on indicating that the DBAS file is not an issue with
SRQview. SuQcess is a lovely program with it's GD2 window.

Hello Martin,

I have screen shotted debug Qtrans. There are 3 .jpgs in the zip file.
Image 1 is debug_qtrans "raw" showing where it hangs while trying to display a text file in it's internal viewer.
Images 2 & 3 are debug_qtrans QEXECed showing that when helped by QEXEC it can pass through the point at which when "raw" it hangs
and display the same file as in image 1.

I look forward to hearing your findings from the code.
QTRNSDB.ZIP
(172.51 KiB) Downloaded 8 times
Cheers


User avatar
RalfR
QL Wafer Drive
Posts: 1206
Joined: Fri Jun 15, 2018 8:58 pm

Re: Q_Liberator malaise

Post by RalfR »

I thank everyone who takes the trouble to do this!


7000 4E75
Martin_Head
Aurora
Posts: 981
Joined: Tue Dec 17, 2013 1:17 pm

Re: Q_Liberator malaise

Post by Martin_Head »

If I can find some time tomorrow, I will see if I can narrow it down further with another debug program.

So everything looks OK until after line 18232, and before line 18362

Is QEXEC Wolfgang's 'turn off the cache' program?


User avatar
Artificer
Trump Card
Posts: 162
Joined: Fri Nov 24, 2017 8:43 am

Re: Q_Liberator malaise

Post by Artificer »

Is QEXEC Wolfgang's 'turn off the cache' program?
Yes it is Wolfgang's solution that on the fly allows copyback incompatible programs to run in writethrough.
It looks like the problem might be between lines,
18232 and 18362.

Cheers


User avatar
dilwyn
Mr QL
Posts: 3130
Joined: Wed Dec 01, 2010 10:39 pm

Re: Q_Liberator malaise

Post by dilwyn »

Assuming we're talking of v2.09, the code between those lines is as follows, in case it gives any clues:

Code: Select all

18240   Q_ERR_ON 'open_in' : OPEN_IN #3,called$
18250   fer = Q_ERR : Q_ERR_OFF 'open_in'
18260   IF fer < 0 THEN An_Error fer : RETurn fer : REMark oops
18270   :
18280   fl = FLEN(#3) : REMark file length
18290   :
18300   REMark draw first screenful
18310   MWINDOW #2,1 : WM_PAPER #2,HEX('0217') : WM_INK #2,HEX('0218') : CLS #2 : REMark app window 1
18320   DIM lines$(lines%,max_width%)
18330   DIM line_ptr(lines%) : line_ptr(0) = 0 : REMark start of file
18340   Top_Of_File : Scroll_Bar
18350   REMark upward scrolling possible if line_ptr(0) > 0
18360   REMark downward scrolling possible if line_ptr(lines%) < fl


User avatar
Artificer
Trump Card
Posts: 162
Joined: Fri Nov 24, 2017 8:43 am

Re: Q_Liberator malaise

Post by Artificer »

The code in the procedures called in line 18340 Top_Of_File : Scroll_Bar might also be useful to look at.


User avatar
dilwyn
Mr QL
Posts: 3130
Joined: Wed Dec 01, 2010 10:39 pm

Re: Q_Liberator malaise

Post by dilwyn »

Here you go:

Code: Select all

13820 DEFine PROCedure Scroll_Bar
13830   REMark must use #2
13840   IF line_ptr(0) = 0 AND line_ptr(lines%) >= fl THEN
13850     sbht% = 10*lines% : sby% = 0 : REMark all of file shown
13860   ELSE
13870     IF line_ptr(lines%) >= fl THEN
13880       sbht% = 10 : sby% = 10*lines%-10 : REMark end of file
13890     ELSE
13900       sbht% = 10 : sby% = (line_ptr(0)/fl)*(10*lines%-10)
13910     END IF
13920   END IF
13930   IF sbht% <> old_sbht% OR sby% <> old_sby% THEN
13940     MWINDOW #2,2 : CLS #2 : BLOCK #2,12,sbht%,0,sby%,2
13950     old_sbht% = sbht% : old_sby% = sby%
13960   END IF
13970 END DEFine Scroll_Bar
13980 :
13990 DEFine PROCedure Top_Of_File
14000   LOCal a,b,c
14010   WM_INK #2,HEX('0218')
14020   FOR a = 0 TO lines%-1
14030     BGET #3\line_ptr(a)
14040     FOR b = line_ptr(a) TO fl-1
14050       BGET #3,byte%
14060       IF NOT (byte% = 10) THEN
14070         lines$(a) = lines$(a)&CHR$(byte%)
14080       ELSE
14090         REMark linefeed at end of line, next line starts after it
14100         line_ptr(a+1) = FPOS(#3) : REMark next line starts here
14110         EXIT b
14120       END IF
14130     NEXT b
14140       REMark file did not end with linefeed
14150       line_ptr(a+1) = fl : REMark end of file
14160     END FOR b
14170     AT #2,a,0 : PRINT #2,lines$(a);
14180     IF FPOS(#3) >= fl THEN
14190       FOR c = a+1 TO lines%-1 : line_ptr(c+1) = fl
14200       EXIT a
14210     END IF
14220   END FOR a
14230   REMark upward scrolling possible if line_ptr(0) > 0
14240   REMark downward scrolling possible if line_ptr(lines%) < fl
14250 END DEFine Top_Of_File


Post Reply