Occasional download glitch
Occasional download glitch
About one percent of the time it appears that a newly compiled program has downloaded (1280n), but in reality it has not. Then I erroneously assume I'm running a revised program. Occasionally I notice that it's the same one, for example when a debug statement is outputted after downloading, and the newly compiled version has that commented out.
Anyone else experience this?
Anyone else experience this?
Paul
I have never seen this before. When a program downloads, it shows you the progress of the download. I assume you see this progress indicator but yet it still seems that the program did not download?
One way you know if a program has been "freshly downloaded" is to the use the FirstTime() function.
One way you know if a program has been "freshly downloaded" is to the use the FirstTime() function.
Mike Perks
If I recall right, there were crashes a while back with the progress bar, so that has been disabled. If that issue has been resolved, I can re-enable it and see if it yields any insights.
Either way, I definitely see this occurring. I just had a new program "downloaded" three times in a row, but the old program executed instead. The fourth time the correct, new program executed.
A bit disturbing since it's hard to know how many times I assumed a new program wasn't working, and made changes accordingly, when in fact it was never even loaded:D
EDIT:
I re-enabled the progress bar. I believe the IDE does not always reach the download process when hitting F5; in these cases, no download is attempted, and the old program executes instead. I'm not sure why the device resets though--making it seem as though downloading occurred...
Either way, I definitely see this occurring. I just had a new program "downloaded" three times in a row, but the old program executed instead. The fourth time the correct, new program executed.
A bit disturbing since it's hard to know how many times I assumed a new program wasn't working, and made changes accordingly, when in fact it was never even loaded:D
EDIT:
I re-enabled the progress bar. I believe the IDE does not always reach the download process when hitting F5; in these cases, no download is attempted, and the old program executes instead. I'm not sure why the device resets though--making it seem as though downloading occurred...
Paul
> ... new program "downloaded" [] but the old program executed ...
Now that you mention it, I've seen this, too; yesterday, in fact. I can't duplicate it now.
To test an instruction's behavior, I wrote a minimal project (myproj3.pjt), something like:
My application was running at the time, so the debug pane was actively showing data fly by at 115200. I changed the console speed to 19200 and pressed F5 several times - and I think it appeared to compile (native mode) and download - but my application continued to run (lots of Nuls and garbage since I'd changed speed).
I have seen this phenomenon.
Now that you mention it, I've seen this, too; yesterday, in fact. I can't duplicate it now.
To test an instruction's behavior, I wrote a minimal project (myproj3.pjt), something like:
Code: Select all
Sub Main()
console.writeline(cstr(-90.0 mod 360.0))
End Sub
I have seen this phenomenon.
Tom
I have since removed the F7 button from my keyboard, to ensure that I'm hitting F5 (compile + *download*) and not just deceiving myself and others:D I still see this phenomena and have basically eliminated any human error. Maybe the compiler compiles an older version before it saves on hitting F5, or something with similar results...
I'll use FirstTime(), but this is still a bit disconcerting, as I don't want to rely on one function to verify that I'm running new code while debugging complex applications (i.e., what it FirstTime() has a bug, etc).
I'll use FirstTime(), but this is still a bit disconcerting, as I don't want to rely on one function to verify that I'm running new code while debugging complex applications (i.e., what it FirstTime() has a bug, etc).
Paul
I might have re-encountered the odd compile-and-download-but-still-execute-old-code phenomenon.
I SavedAs a .bas file, which automatically changed the IDE window name for that file but did not change the files in the project properties. Consequently, subsequent compiles didn't use the newly-named (and solely-displayed) changed code, instead using the previous-name file (which is not displayed).
Should a SaveAs change the project properties file list?
I SavedAs a .bas file, which automatically changed the IDE window name for that file but did not change the files in the project properties. Consequently, subsequent compiles didn't use the newly-named (and solely-displayed) changed code, instead using the previous-name file (which is not displayed).
Should a SaveAs change the project properties file list?
Tom
That's an interesting scenario. I would think that the project properties file should not be updated unconditionally.GTBecker wrote:Should a SaveAs change the project properties file list?
There are several possible desired outcomes when using Save As:
- do not change the project files list
- replace the original file in the project files list with the new file
- add the new file to the project list
- Don Kinzer
Occasional download glitch
FYI, The main reason I use SaveAs is to make a second copy of a program. This is usually during development, when I want to try something new and if it doesn't work out, then go back to the earlier version. I find I always have to go edit the project files list to get the desired result. I just want to save a snapshot in time to come back to later. So having a way to do this in one step would be nice.
There are a lot of possibilities as to how best to accomplish this, especially with include files etc.
On 1/14/2010 4:30 PM, IDE wrote:
There are a lot of possibilities as to how best to accomplish this, especially with include files etc.
On 1/14/2010 4:30 PM, IDE wrote:
GTBecker wrote: Should a SaveAs change the project properties file list? That's an interesting scenario. I would think that the project properties file should not be updated unconditionally.
There are several possible desired outcomes when using Save As:It may be best to add radio buttons to the Save As dialog to reflect these choices or, alternately, display a separate dialog with the choices after the Save As is completed.
- do not change the project files list
- replace the original file in the project files list with the new file
- add the new file to the project list
- Don Kinzer
I captured this glitch on video. The following occurred:
(1) code changed, then saved.
(2) F5 was pressed.
(3) code (from somewhere) downloaded and verified. No compilation process is seen on the video, although it may have compiled the first time before I started filming.
(4) The program downloaded correctly, since it was verified and the new program download fuse was set.
(5) code executed. This code is old code that was unchanged.
Steps 2-5 were run a few more times on the video, with the old code downloaded each time.
I then made another change, and pressed F5 again. This time the new code compiled, downloaded correctly, and executed.
(1) code changed, then saved.
(2) F5 was pressed.
(3) code (from somewhere) downloaded and verified. No compilation process is seen on the video, although it may have compiled the first time before I started filming.
(4) The program downloaded correctly, since it was verified and the new program download fuse was set.
(5) code executed. This code is old code that was unchanged.
Steps 2-5 were run a few more times on the video, with the old code downloaded each time.
I then made another change, and pressed F5 again. This time the new code compiled, downloaded correctly, and executed.
Paul
On a related note (which might be normal, though) sometimes the IDE tries to download a program that couldn't have compiled, since there were compilation errors.
For example, there was a "missing (" error, and yet the focus quickly changed from the Output window to the Debug window as the IDE was trying to download a program. The micro was powered off though, and i got the "Device failed to respond...' message. Back in the Output windows I noticed the error.
I wonder what would have been downloaded if the device was powered on.
For example, there was a "missing (" error, and yet the focus quickly changed from the Output window to the Debug window as the IDE was trying to download a program. The micro was powered off though, and i got the "Device failed to respond...' message. Back in the Output windows I noticed the error.
I wonder what would have been downloaded if the device was powered on.
Paul