Forum Index
HomeZBasic Home   Forum RulesForum Rules   Forum FAQForum FAQ   MemberlistMemberlist   UsergroupsUsergroups   RSS FeedRSS Feed
Site SearchSite Search   LinksLinks   DownloadDownload   Digests and SubscriptionsDigests and Subscriptions
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   RegisterRegister
Occasional download glitch
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Forum Index -> ZBasic IDE
Author Message
pjc30943



Joined: 02 Dec 2005
Posts: 220

Posted: 28 September 2009, 0:22 AM    Post subject: Occasional download glitch Reply with quote

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?
Back to top
mikep



Joined: 24 Sep 2005
Posts: 765
Location: Austin, TX

Posted: 28 September 2009, 5:13 AM    Post subject: Reply with quote

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.
Back to top
stevech



Joined: 23 Feb 2006
Posts: 657

Posted: 28 September 2009, 18:44 PM    Post subject: Reply with quote

Does download have a read-back/verify option?
Back to top
mikep



Joined: 24 Sep 2005
Posts: 765
Location: Austin, TX

Posted: 28 September 2009, 22:00 PM    Post subject: Reply with quote

There is a verify operation. That is why I don't understand this problem for asked for more information.
Back to top
pjc30943



Joined: 02 Dec 2005
Posts: 220

Posted: 04 October 2009, 0:44 AM    Post subject: Reply with quote

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...
Back to top
GTBecker



Joined: 18 Jan 2006
Posts: 457
Location: Cape Coral

Posted: 04 October 2009, 1:27 AM    Post subject: Reply with quote

> ... 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:
Code:
Sub Main()
   console.writeline(cstr(-90.0 mod 360.0))                                                                                     
End Sub


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.
Back to top
pjc30943



Joined: 02 Dec 2005
Posts: 220

Posted: 12 November 2009, 1:08 AM    Post subject: Reply with quote

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).
Back to top
GTBecker



Joined: 18 Jan 2006
Posts: 457
Location: Cape Coral

Posted: 14 January 2010, 21:00 PM    Post subject: Reply with quote

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?
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR

Posted: 14 January 2010, 21:30 PM    Post subject: Reply with quote

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:
  • 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
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.
Back to top
twesthoff



Joined: 17 Mar 2006
Posts: 191
Location: Fredericksburg, VA

Posted: 14 January 2010, 22:47 PM    Post subject: Occasional download glitch Reply with quote

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:
Quote:
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:
  • 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
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.



- Don Kinzer

Back to top
pjc30943



Joined: 02 Dec 2005
Posts: 220

Posted: 01 April 2010, 0:35 AM    Post subject: Reply with quote

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.
Back to top
Don_Kirby



Joined: 15 Oct 2006
Posts: 329
Location: Long Island, New York

Posted: 01 April 2010, 1:15 AM    Post subject: Reply with quote

Maybe it's cosmic rays like the Toyota glitch...

-Don
Back to top
pjc30943



Joined: 02 Dec 2005
Posts: 220

Posted: 04 April 2010, 0:28 AM    Post subject: Reply with quote

Don_Kirby wrote:
Maybe it's cosmic rays like the Toyota glitch...

-Don


I can't tell if you're serious or not:)
Back to top
Don_Kirby



Joined: 15 Oct 2006
Posts: 329
Location: Long Island, New York

Posted: 04 April 2010, 1:49 AM    Post subject: Reply with quote

No, not serious. The Toyota glitch hypothesis doesn't apply in this case, being that it's repeatable.

-Don
Back to top
pjc30943



Joined: 02 Dec 2005
Posts: 220

Posted: 09 April 2010, 0:02 AM    Post subject: Reply with quote

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.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> ZBasic IDE Time synchro. with the server - Timezone/DST with your computer
Goto page 1, 2  Next
Page 1 of 2

 


All content Copyright © 2005-2012 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group