Results 1 to 14 of 14

Thread: Progress bar acts differently in debug/compile

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2012
    Posts
    13

    Progress bar acts differently in debug/compile

    I guess this is the best place to post this. Even though Ive been programming for about 10 years, everything is self-taught...if I need to learn how to do something I just look it up, and usually end up here.

    Anyways, Im making a side scrolling shooter type game for my daughter and her friends in VB2010(in , and a few days ago I was testing something farther into the game so I put a 'health.value = maxhealth' (health.value being a progress bar as a placeholder for when I can do the UI for the game, and maxhealth being a variable integer) at the top of the code and tested and it worked out fine...so I removed the health code. Now when I debug the game the health goes down as it should but every time I publish it acts like the health code is back, when I get hit the health instantly refills..Ive cleaned, refreshed, deleted the old files...everything I can think of to get rid of the old version to no avail.

    Ive combed through every single line of the game trying to figure it out...anyone have any ideas? Ive been trying not to ask for help because I dont like bugging people haha, but this one has me completely stumped.

    Any help would be GREATLY appreciated...its basically stopped my game progress for the past 4 days because I cant figure it out.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,302

    Re: Progress bar acts differently in debug/compile

    I'd suggest some tracing code, so it tells you where it's at and what it's doing. Any time something happens in a Release build that you can reproduce in the debugger, that's a good option. There is tracing functionality built into the Framework or you can keep it simple and just write a file or a TextBox or whatever.

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2012
    Posts
    13

    Re: Progress bar acts differently in debug/compile

    I do have a quick question...in this code instance:
    Code:
    If v=3 Then v = v + 1 : function1()
    Will the function be called regardless the outcome of the IF statement? If so I might have found my problem.

  4. #4
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,532

    Re: Progress bar acts differently in debug/compile

    yes... what you have there is the same as the following:

    Code:
    If v = 3 then v = v + 1
    
    function1()
    or

    Code:
    If v = 3 then 
      v = v + 1
    end if
    
    function1()

    which is why I don't like the : notation.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  5. #5

    Thread Starter
    New Member
    Join Date
    Oct 2012
    Posts
    13

    Re: Progress bar acts differently in debug/compile

    I changed all of the coding as suggested above, and still nothing...the game runs fine in debug, but still messes up in the published version

    I dont think the problem is in the programming anymore...I think its in the publishing.

    When I went to publish I changed the settings to online/offline mode...when I pulled up the HTML file it showed an older version then the current, but checking the coding in the HTML file it showed the updated version...fine, its cached...refresh...works, I can now install it. BUT my fail connection would have taken 4 hours to upload(Thanks fail ADSL).

    So I republished it, and said ONLY online(which prior to this I could publish it only online and I could run it from my publish location on my desktop without problems), when I try to run the html...again, it showed the old cached version with the install button....refresh...it updated the version number and the button says "Run" now but the thing still insists on me installing it instead of simply running it from the publish location like Ive done for the past 15 revisions, the setup file is still for an "Install" setting

    Ive never had a problem with this before, I used to be able to publish and immediately test the published version...but now it seems like VB is publishing older versions of certain files of my application...I know it doesnt make sense...but files are not being updated to the newer ones when I publish.

    So far Ive got these issues:
    -Form 1 retaining the health.value = maxhealth code even though its been deleted.
    -Setup file retaining settings from previous publish, the HTML file said "Run" but the setup file insists on installing

    Or maybe Im just missing something REALLY simple...

    Thanks everyone for all the help so far

    By the way, here are my Publish settings:
    Specify Publish Location: C:\Users\Jeff\Desktop\a\
    From a Website: http://mav.steam-united.com/Products/RDSD/
    No, only available online

  6. #6
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,532

    Re: Progress bar acts differently in debug/compile

    clear out the bin and obj folders... it's possible that an older, cached copy of something is getting published... in those cases, clearing out the bin and obj folders seems to clear that up.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  7. #7
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: Progress bar acts differently in debug/compile

    Well the steps are ...

    Build Menu > Configuration Manager > Active Solution Configuration = Release (Close)
    Build Menu > Build (or Rebuild if you have a previous Release version)
    Build Menu > Publish

    ... might you have left anything out?
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  8. #8

    Thread Starter
    New Member
    Join Date
    Oct 2012
    Posts
    13

    Re: Progress bar acts differently in debug/compile

    Is there any way to run the Published file from the publish location? Ive had it set like that before...and I set it back EXACTLY the way it was....but now it doesnt work...Selecting online only wants to download it from the website and online/offline is trying to say its already installed in another location when its not..

    I cant figure out if either of the suggestions above works because its acting like this now....I just want it to run after being published...no uploading, no installing...just Run from the published directory.

  9. #9
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: Progress bar acts differently in debug/compile

    You can always run it from the release folder in the project directory the old fashioned way (with a doubleclick on the .exe file)!

    If you publish online only, there still needs to be a user 'install' of sorts. It's just that the install is into a temporary folder and the application is deleted when closed. You can't physically run a .Net program on the webserver.
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  10. #10

    Thread Starter
    New Member
    Join Date
    Oct 2012
    Posts
    13

    Re: Progress bar acts differently in debug/compile

    Quote Originally Posted by dunfiddlin View Post
    You can always run it from the release folder in the project directory the old fashioned way (with a doubleclick on the .exe file)!

    If you publish online only, there still needs to be a user 'install' of sorts. It's just that the install is into a temporary folder and the application is deleted when closed. You can't physically run a .Net program on the webserver.
    Wow that worked...never realized I could do that.

    Before it installed to a temp folder and ran without going through the whole install process...but now it wont even install because its saying its already installed in another location

    The health bar works now, in addition to fixing my music manager Now I just need to figure out how to get it distributed right.

    I know Im going way off topic here, and let me know if I should make another topic for this...is there a way to have the software check the version of the app on the server against the version currently installed and download the new version if necessary? Ive seen something about updates and such but its over my head

  11. #11
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,532

    Re: Progress bar acts differently in debug/compile

    "the application is deleted when closed." -- that.... isn't true... what happens with a Click-Once deployment is that the application is installed locally into a sandboxed area. The app isn't deleted when you close it. What happens when you run it again, is it checks to see if it's installed, and if so, then checks the installed version against the published version, and if the published version is newer, then it will download it and installs it.

    This maybe what you're experiencing. The date on the files are newer, but the assembly file info says it's the same version. Right-click the project, & select Properties. On the Application tab, select the assembly information button... update the file version information... not the Assembly version but the file version. Save everything. Rebuild everything, then re-publish it, see if the problem with the offline install works or not.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  12. #12

    Thread Starter
    New Member
    Join Date
    Oct 2012
    Posts
    13

    Re: Progress bar acts differently in debug/compile

    Did that and this is the error it returned

    Code:
    PLATFORM VERSION INFO
    	Windows 			: 6.1.7601.65536 (Win32NT)
    	Common Language Runtime 	: 4.0.30319.269
    	System.Deployment.dll 		: 4.0.30319.1 (RTMRel.030319-0100)
    	clr.dll 			: 4.0.30319.269 (RTMGDR.030319-2600)
    	dfdll.dll 			: 4.0.30319.1 (RTMRel.030319-0100)
    	dfshim.dll 			: 4.0.31106.0 (Main.031106-0000)
    
    SOURCES
    	Deployment url			: file:///C:/Users/Jeff/Desktop/Release/RDSD.application
    
    IDENTITIES
    	Deployment Identity		: RDSD.application, Version=1.0.0.27, Culture=neutral, PublicKeyToken=0c989b761b5060ea, processorArchitecture=x86
    
    APPLICATION SUMMARY
    	* Installable application.
    	* Trust url parameter is set.
    ERROR SUMMARY
    	Below is a summary of the errors, details of these errors are listed later in the log.
    	* Activation of C:\Users\Jeff\Desktop\Release\RDSD.application resulted in exception. Following failure messages were detected:
    		+ You cannot start application RDSD from this location because it is already installed from a different location.
    		+ You cannot start application RDSD from location file:///C:/Users/Jeff/Desktop/Release/RDSD.application it is already installed from location http://mav.steam-united.com/Products/RDSD/RDSD.application. You can start it from location http://mav.steam-united.com/Products/RDSD/RDSD.application or you can uninstall it and reinstall it from location file:///C:/Users/Jeff/Desktop/Release/RDSD.application. If you reinstall the application, be aware that you might lose any customizations that you made to the application.
    
    COMPONENT STORE TRANSACTION FAILURE SUMMARY
    	No transaction error was detected.
    
    WARNINGS
    	There were no warnings during this operation.
    
    OPERATION PROGRESS STATUS
    	* [10/24/2012 1:12:22 PM] : Activation of C:\Users\Jeff\Desktop\Release\RDSD.application has started.
    	* [10/24/2012 1:12:22 PM] : Processing of deployment manifest has successfully completed.
    
    ERROR DETAILS
    	Following errors were detected during this operation.
    	* [10/24/2012 1:12:22 PM] System.Deployment.Application.DeploymentException (DeploymentUriDifferent)
    		- You cannot start application RDSD  from this location because it is already installed from a different location.
    		- Source: System.Deployment
    		- Stack trace:
    			at System.Deployment.Application.ApplicationActivator.CheckDeploymentProviderValidity(ActivationDescription actDesc, SubscriptionState subState)
    			at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
    			at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
    		--- Inner Exception ---
    		System.Deployment.Application.DeploymentException (DeploymentUriDifferent)
    		- You cannot start application RDSD from location file:///C:/Users/Jeff/Desktop/Release/RDSD.application it is already installed from location http://mav.steam-united.com/Products/RDSD/RDSD.application. You can start it from location http://mav.steam-united.com/Products/RDSD/RDSD.application or you can uninstall it and reinstall it from location file:///C:/Users/Jeff/Desktop/Release/RDSD.application. If you reinstall the application, be aware that you might lose any customizations that you made to the application.
    		- Source: 
    		- Stack trace:
    
    
    COMPONENT STORE TRANSACTION DETAILS
    	No transaction information is available.
    I tried reinstalling as it said by starting RDSD.application but that returns the same error also, I did the publish in offline mode...not sure why its checking the site unless it pulled that info from the app thats supposedly installed...how would I go about clearing out the temp folder?

    Sorry about all the trouble...lol thats why I dont ask questions because I feel like this is something I should already know.
    Last edited by JeffStaples; Oct 24th, 2012 at 12:22 PM.

  13. #13
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,532

    Re: Progress bar acts differently in debug/compile

    Honestly I don't know... I don't use Click-Once... the one job I had were we did use it, we had this automated tool that compiled everything, created the manifest and then copied everything out to the app deployment server... it was heavily automated.

    As for you last comment... how are you supposed to know if you don't ask? the knowledge has to start somewhere. - in other words, Pfffft! I wouldn't worry about it... there's really only a few of us here that actually understand Click-once... and fewer still that have gotten it to work on the first go.

    You may want to re-post this as in the application deployment area, as that's what it is about now, with a link back to this one for reference. You might get lucky with someone who has a better understanding of CO than I do.


    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  14. #14

    Thread Starter
    New Member
    Join Date
    Oct 2012
    Posts
    13

    Re: Progress bar acts differently in debug/compile

    Ok, its been posted, thanks a lot for all the help

    Link to follow-up topic for future reference: http://www.vbforums.com/showthread.p......but-it-isnt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width