QPAC2, GWASS, SMSQ or QD - eRant!

Anything QL Software or Programming Related.
Post Reply
User avatar
NormanDunbar
Forum Moderator
Posts: 2273
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

QPAC2, GWASS, SMSQ or QD - eRant!

Post by NormanDunbar »

Weird stuff happening today with either QPAC2 or QD, the latest version as supplied kindly by Marcel recently. (Mine says version B.05 in the F1 Help page)

Create a new assembly file in QD.
Save it.
Repeat loop
Edit the file, and re-save it ( overwrite when prompted).
Assemble file, it works, no more errors!
Execute file - discover another bug.
End Repeat loop

At some point, I have closed QD and re-opened it from QPAC2 (Do the file then Execute to open it in QD) - because the weirdness happens.

The assembler, GWASS, seems to notice that the file has changed as it assembles with no, or at least, fewer errors, after saving.
Executing the newly assembled file, from the SuperBASIC command line, sometimes works, but sometimes throws up bugs that were previously fixed.
Looking back at the source in QD, it has changed! Previous changes have been undone.

Tonight I had a bug where I was copying a value to D0 for safety, then calling a subroutine that corrupted D0 - so much for safety. So I changed it to D2 and it worked fine for a few iterations, but then, it started failing again. On running it through QMON, I was seeing D0 instead of D2 - WTF? Looking back in QD, the code was incorrect and sure enough, D2 was no longer being used. "How strange!" I thought. (I didn't, it was more like "What the Fork!")

This wasn't just on one line, the register was used on about 5 or 6 lines, and each one had reverted back.

This is not the first time I've had this problem but I'm having difficulties tying it down to anything specific - other than normal use of the QL (QPC v4.05.10 on Linux, under Wine). It only seems to happen with assembly files - but that's maybe because that's about all I do these days on the QL!

Anybody else seen any weirdness like this? It's driving me absolutely bonkers. I feel how Dilwyn usually does when his PC is playing up! ;)


Rant over.


Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
User avatar
Artificer
Over Heated PSU
Posts: 126
Joined: Fri Nov 24, 2017 8:43 am

Re: QPAC2, GWASS, SMSQ or QD - eRant!

Post by Artificer »

I have seen something similar with QD, sms/e and the Q68 with Sbasic files.

I have always assumed it was most likely due to forgetfulness on my part to properly save the program I have been working on, but sometimes I have wondered if it was because I was using the same file name and saving over the existing file on the disk and this was not actually happening properly.

So as a precaution now when I have completed a major change in some bit of code I save a copy of the file under a new name as well as the original name which seems to ensure that work is not lost.

But the bottom line is probably that I have not saved my files when I thought I had.

Cheers


User avatar
NormanDunbar
Forum Moderator
Posts: 2273
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: QPAC2, GWASS, SMSQ or QD - eRant!

Post by NormanDunbar »

I think we are both on the same hymn sheet here!

I know, definitely and for a fact (contrary to what my wife may say from time to time ;) ) that I am definitely saving the file as I "CTRL+V" to save text file, then 'O' to select the Overwrite option. The file is then overwritten. If I assemble it, I get the correct new code as either the error count goes down (or, ahem, up!) or no bugs are found and the code works differently when executed.

It is later when I make some other, unrelated changes in a different area (I think) that the original changes revert. It's weird indeed, and extremely frustrating. I have also taken to deleting the source file from the QPAC2 Files menu before saving it from QD - just to be sure I'm always writing the newest version.

My mind is thinking that it's seemingly saving an older version of the file for some reason, maybe I have too much memory assigned to QPC at startup? Who knows. (32MB but I have run it with more.)


Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
swensont
Forum Moderator
Posts: 252
Joined: Tue Dec 06, 2011 3:30 am
Location: SF Bay Area
Contact:

Re: QPAC2, GWASS, SMSQ or QD - eRant!

Post by swensont »

Norm,

It's sounding like QD is reverting to an older version of the file. Have you checked the file on disk and compared it with what is in QD? You can also try a different editor and see if the behavior changes. I don't think there is a way to do a checksum withing QD to verify that no changes were made.

Tim Swenson


stevepoole
Super Gold Card
Posts: 714
Joined: Mon Nov 24, 2014 2:03 pm

Re: QPAC2, GWASS, SMSQ or QD - eRant!

Post by stevepoole »

Hi,

Are you sure that the default device has not been changed during the programming session ?

In which case you may be accessing different file versions...

Steve Poole.


User avatar
NormanDunbar
Forum Moderator
Posts: 2273
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: QPAC2, GWASS, SMSQ or QD - eRant!

Post by NormanDunbar »

Hi Tim, Steve,

i am positive that the default has not changed. I load the file into QD from the QPAC2 Files menu, with a "do" then selecting "execute". I only have one copy of the file on disc, in win1_source_whatever. The mind boggling thing is, I save the changes, overwriting the existing file, and assemble, it works or at least, reduces the error count, so I know that the file was overwritten.

At some point though, it reverts in QD. When I run the code in QMON2, it is different from what I see in the editor. Weird. Obviously, this is after the source code reverts.

Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Derek_Stewart
Font of All Knowledge
Posts: 3957
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: QPAC2, GWASS, SMSQ or QD - eRant!

Post by Derek_Stewart »

Hi Norm,

I usually use Fileinfo2 to select the assembley file and edit the file in QD, which seems similiar to you.

Once I make a change in the programme file, I save the file and start either Qmac or Gwass with a hotkey and enter the file name and assemble.

If assembley was sucessful I usually run the programme to see if there is any runtime errors, or trace it with QMON2. But I guess this is what you do as well.

I tried editing an assembley file using the above method to produce an exrcutable file. Changed some patrs of the programme and saved the assembley file.

I have tried this on QPC2 SMSQ/3.34, under Linux/Wine and Windows 7. QD B.05, did not change anything back, so I can not reproduce the errors you speak of.

I will have a look at GWASL on a Q68, to see if there is an issue there.


Regards,

Derek
User avatar
NormanDunbar
Forum Moderator
Posts: 2273
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: QPAC2, GWASS, SMSQ or QD - eRant!

Post by NormanDunbar »

Right then, today I spent a couple of hours editing, assembling, re-editing the same file with no problems at all. :D Problem was, I was using QED instead of QD - so it looks possible that QD is the most likely cause of my grief.

Further investigation required though.


Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Post Reply