Most simply explained, when I edit, delete, or add code into my XNA project, it does not respond. This is to say that I can comment out the entire Update method of my game and it will run as usual. This also means that the game is stuck at a certain time in development, and can not be edited. I've tried reopening my project and it does not help. I've had this problem before and it is incredibly infuriating and frustrating.
http://puu.sh/1kD6P
This is an image where I have commented out the Update method and would normally never be able to run with 66 errors. But it does run.
In the past I have had to create new projects and drag all of my art assets over and copies of the code. That is the only way I know to fix it, but this has happened with every one of my projects (even on a different computer before).
Anybody know what's going on?
Have you tried rebuilding it from the build menu, not just clicking the debug button?
Related
I have a winforms app (>75k lines of source code), I have just added some new functionality and a new form and I'm getting the 'can't create window handle' error but only when running inside VS. The app builds OK and when i run it as the executable it is using 597 handles, 94 GDI and 83 USER and the new form works just fine apart from my logic errors in it. So as far as I can tell; my app is well below the 10,000 limit where things start to break therefore the problem is in/with VS somewhere but I may have hold of entirely the wrong end of the stick or possibly completely the wrong stick.
I have cleaned, rebuilt, rebooted etc and it stills falls over.
I'm using Process Explorer (thats where the previous numbers came from) but can't seem to find VS in there to check what its total handle count is.
VS2017 on Win 11.
Yes, I have googled it and explored things to look at but I can't find a result that matches 'Studio falling over but the exe running fine', any help / pointers very much appreciated as I obviously can't debug the new form which does make things somewhat difficult.
The underlying issue was to do with a pop-up form being generated by the parent form during its load processes, I found that the parent hadn't been issued a handle before it was trying to show the pop-up. Before you ask... I'm capturing data from a network sensor via the pop-up, which, once the user has accepted the incoming value, feeds the data back to the parent form. I assume that in run-time everything runs faster and it doesn't hit that 'un-coupled' point. Changed the code in the instantiate/load/shown cycle it runs and all is well.
Thanks once again Hans, headache solved.
I'm having a strange problem in Visual Studio 2022, and would like to know if someone else faced it.
It only happens when editting .cshtml files, on Asp.net MVC projects, ocasionally when I press a key on the keyboard, the editor insert that same letter 2, sometimes 4 times. I need to restart my machine to solve it, but it will eventually return. The image bellow ilustrate the problem, I've typed <div> and got this result:
It doesn't happen on .cs, .js files, or in any other editor in my machine.
You most likely have GitHub Copilot activated. If so, try deactivating it.
I was going nuts with this too, until I found out that it was GitHub Copilot that was doing it once in a while. I have not found a solution to it, other than deactivating Copilot.
You can see a thread on it here: https://github.com/github-community/community/discussions/14206
Boa sorte ;-)
My game was working fine all long for days. Recently just after adding attack animation for my enemyai it started freezing everytime I clicked on play.
So when I click play unity pops up with a message saying "Hold On ! Application.UpdateScene" and its stuck on that ever since. The only way for me to exit is using task manager.
Screenshot:
I tried debbing and adding break points but it did not work. At this point I don't know what wrong is it my code or something else.
I haven't updated my unity I am on 2020.1f but I don't think that might be causing the problem.
Also incase it's not possible to resolve this problem can you'll please tell me a way to complete my project quicker without redoing it everything.
Thanks
It is usually caused by a dead-loop.
I also has this issue today. I solved it by attaching the debugger (Visual Studio in my case) to the forever loading Unity Editor. After that, pause the debugger. This will freeze Unity but we can then inspect where the code is executing at this particular moment. Select the inspecting thread to "Unity Thread" in Visual Studio. In my case, it immediately show the code is running inside a while-loop which I forgot to increase the i variable and turn the loop into a dead loop.
The reason is just delete your Library package in your project folder then reopen your project unity recreate the file. The problem appears when you import assets from asset store.
Here is my previous question, if you want some further information regarding my current problem:
WinForm: Inherited Panel wont Autosize
If you don't want to read through it, I'll give you some general information:
I'm not working directly via the programme, I'm just editing a specific DLL, that is used by this programme
That means, that I don't have any access to the source code of this specific programme
That also means that I have to fix this problem via some changes in the DLL, that is - as I mentioned before - used by this programme.
What I found out so far:
It works without any problems, if I attach the programme to the DLL's source code in VS2015.
But it has some glitches if I build the code and then copy the DLL into the programme's folder - that's also my actual problem: it somehow shrinks the tableLayoutpanel to half its actual size and I get some weird glitches in the other half of its actual, in normal start somehow not used, size.
What I tried out:
I changed the size manually, not via "Dock = Fill" or "Autosize = true" and it worked. But that's, as you all may know, not the best solution and we only want to use it, if there is absolutely no other way around it. No one likes to hard-code.
I tried to inherit its Parent's Size via:
this.tablelayoutPanel.Size = this.Size;
and
this.tableLayoutPanel.Size = new Size(this.Height, this.Size);
So do you guys have any ideas?
Okay, I did not figured out why the debuger worked and the release/debug build not. But I just forced a redraw on the tableLayoutPanelMainwith with Application.DoEvents(). I never tried this out before, because Invalidate() + Update() or Refresh() did not work - I was like: okay, that wont be that easy, so just forget about that.
But after some trial & error and a lot of time...well, I was working for two weeks on it...I tried the simpliest thing out and YEAHY, it worked!
Anyways, thank you for your help, guys. I appreciate that.
I've got a problem that's driving me nuts. We have a C# project that has a few types of custom controls, but has several hundred instances of those controls (don't ask). Every time I do anything that requires compile I get the following behavior:
The project appears to build very quickly (like 3 or 4 seconds).
Then VS becomes totally unresponsive for quite a while (maybe 15 seconds to a minute)
The status at the bottom of the window shows "Build Succeeded" during the unresponsive period.
Clicking just about anything will cause a spinner to appear.
Eventually the spinner will go away and the status will show "Ready" at the bottom, at which point I'm back in business.
I'm almost certain that this is a self-inflicted problem, but for the life of me I can't figure out what is going on during the "spinning" period. Is there any way to see what's going on during the build process so that I can determine precisely how I'm shooting myself in the foot?
UPDATE: I tried a strange experiment. I created a new application using the exact same user controls and then just plopped down about 2,000 of them on my form. No problem at all, this application works fine. How incredibly odd...
Close the form design view before compiling the project.
If that did not work (which worked for me but not for you as you've mentioned in your comment) then I think it's something about your custom control like trying to connect to a server and validating it's licensing. Check your internet traffic with something like Wireshark. I hope that helps.