Page 27 of 32
Re: Q_Liberator malaise
Posted: Fri Jul 04, 2025 11:17 am
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
Re: Q_Liberator malaise
Posted: Sun Jul 06, 2025 4:44 pm
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.
Re: Q_Liberator malaise
Posted: Mon Jul 07, 2025 5:05 pm
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.
Cheers
Re: Q_Liberator malaise
Posted: Mon Jul 07, 2025 6:27 pm
by RalfR
I thank everyone who takes the trouble to do this!
Re: Q_Liberator malaise
Posted: Tue Jul 08, 2025 5:17 pm
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?
Re: Q_Liberator malaise
Posted: Tue Jul 08, 2025 5:48 pm
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
Re: Q_Liberator malaise
Posted: Tue Jul 08, 2025 9:44 pm
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
Re: Q_Liberator malaise
Posted: Tue Jul 08, 2025 10:13 pm
by Artificer
The code in the procedures called in line 18340 Top_Of_File : Scroll_Bar might also be useful to look at.
Re: Q_Liberator malaise
Posted: Tue Jul 08, 2025 11:15 pm
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
Re: Q_Liberator malaise
Posted: Wed Jul 09, 2025 10:48 am
by Martin_Head
Here's another QTrans debug.
I have added some more messages between lines 18232 and 18362 to see how far it gets.
I suspect the problem may be in procFun 13990, as that displays the file. Which does not happen.
And there are some FOR loops in there.
Code: Select all
18232 PRINT "at 18232 window drawn": PAUSE -1 : REMark OK to here
18240 Q_ERR_ON "open_in" : OPEN_IN #3,called$
18242 PRINT "DB2 at 18242 channel opened": PAUSE -1
18250 var0668 = Q_ERR : Q_ERR_OFF "open_in"
18252 PRINT "DB2 at 18252 var0668 = ";var0668 : PAUSE -1
18260 IF (var0668 < 0) THEN procFun6900 var0668 : RETurn var0668 : END IF
18270 :
18280 fl = FLEN (#3)
18282 PRINT "DB2 at 18282 file length is ";fl : PAUSE -1
18290 :
18300 :
18302 PRINT "DB2 at 18302 about to MWINDOW #2,1 : WM_PAPER #2,";HEX ("0217")!!!"WM_INK #2,";HEX ("0218") : PAUSE -1
18310 MWINDOW #2,1 : WM_PAPER #2,HEX ("0217") : WM_INK #2,HEX ("0218") : CLS #2
18320 DIM lines$(var06F0%,var06F8%)
18330 DIM line_ptr(var06F0%) : line_ptr(0) = 0
18332 PRINT "DB2 at 18332 arrays DIMed, calling procFun13990": PAUSE -1
18340 procFun13990
18342 PRINT "DB2 at 18342 calling procFun13820": PAUSE -1
18345 procFun13820
18350 :
18360 :
18362 PRINT "at 18362 starting loop": PAUSE -1 : REMark Not OK here
Code: Select all
13990 DEFine PROCedure procFun13990
14000 LOCal a , b , var0758
14010 WM_INK #2,HEX ("0218")
14012 PRINT "DB2 in procFun13990, var06F0% = ";var06F0%
14014 PRINT "DB2 at 14014 FOR a = 0 TO (var06F0% - 1) var06F0% = ";var06F0% : PAUSE -1
14020 FOR a = 0 TO (var06F0% - 1)
14030 BGET #3\line_ptr(a)
14032 PRINT "DB2 at 14032 FOR b = line_ptr(a) TO (fl - 1) ";line_ptr(a)!!!(fl - 1) : PAUSE -1
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 :
14100 line_ptr((a + 1)) = FPOS (#3)
14110 GO TO 14170
14120 END IF
14130 NEXT b
14140 :
14150 line_ptr((a + 1)) = fl
14160 END FOR b
14170 AT #2,a,0 : PRINT #2,lines$(a);
14172 PRINT "DB2 at 14172 end of line reached" :PAUSE -1
14180 IF (FPOS (#3) >= fl) THEN
14190 FOR var0758 = (a + 1) TO (var06F0% - 1) : line_ptr((var0758 + 1)) = fl : END FOR var0758
14200 EXIT a
14210 END IF
14220 END FOR a
14222 PRINT "DB2 at 14222 exiting procFun" :PAUSE -1
14230 :
14240 :
14250 END DEFine procFun13990