Call for new tests on IGP
Hi all,
I’ve been through all the feedback from the Indiefreaks Game Profiler users and got all known bugs fixed. I’m now looking for some more testers so if you have a few minutes to give this real time Xna game profiler a go, that would be awesome.
The download link is the same:
http://downloads.indiefreaks.com/igp/v1.0.0.0/Indiefreaks Game Profiler for Xna Setup.zip
As usual, once you install it, you’ll find a PDF file explaining how to setup everything for your project to be profiled.
All feedback will be very much appreciated and, if as expected, this current build is bug free, I’m sure a lot of other Xna developers will find this utility very useful to track their performance gaps and potential memory leaks to spread the word
35 Comments
Trackbacks/Pingbacks
- Where Is My XNA Game Running Slow? « Robot Foot Games - [...] even if you're not currently having slowdown problems. You can find the download link at their blog post here. ...
Leave a Reply
You must be logged in to post a comment.

Cool, i’ll give this a shot tonight and see if it will finally work.
In the meantime get back to your IGF goodness!
Tested and I can run the game. It crashed few times, but bigger problem is that CTRL+F12 or Start + DUp is not working.
Really Filip? Are you sure you included the ProfilerGameComponent in the constructor and setup the [assembly: Profiler(GameClass = "Namespace.GameInheritedClassName")] attribute as explained in the PDF document?
I made an update to the current setup as I noticed I missed to remove Enum and struct from being considering in the profiling rules (need more work to handle them correctly
)
If you aren’t sure which version you have installed, simply uninstall the current one and install the latest downloaded one: each new build replaces the old one.
With your previous post, please explain why you don’t rev the minor version to avoid confusion?
It worked for me, good job. I did notice that it does not scroll though. if I have a lot of units that have update calls and they quickly scroll off the screen and I can’t see the rest.
Yes, everything from your document is in and set. I can see that profiling is running, coz there is +3ms per frame in update method.
Corny, I didn’t added to the minor version because I didn’t find where I could set that: now that I know, I will do so
For the scroll not working, I simply forgot to add this behavior
I’ll work on it now.
Filip, you tell me that you can see +3ms per frame in update method but I suppose it isn’t the profiler tool that tells you so but something else, right?
Could you make sure you added the ProfilerGameComponent instance in your Game inherited class constructor and added it to your Components property. Another quick test would be to set the ProfilingManager.Run = true manually just after.
Finally, if it happens that your Game inherited class doesn’t override the Draw() method, you may want to add a simple override:
public override void Draw(GameTime gameTime)
{
base.Draw(gameTime);
}
As the profiler expects this method to be present in your build to add the rendering stuff
Hey Filip, I just wanted to know if you got it sorted out since I got no other developer using IGP with issues like you got?
Didn’t have the time to test it more. Maybe it’s my InputManager eating up keystrokes or something.
Ive followed all of the instructions in the PDF and i can get the game to run, however when i try to proceed past my main menu, i get null reference exceptions popping up and crashing the program. If i remove the IGP initialisation code the game works fine. Any help would be appreciated.
please disregard my previous post, my problem was fixed from the comments on http://indiefreaks.com/2011/07/06/the-indiefreaks-game-profiler-for-xna-is-here/
I’d love to give the tool a try, but it crashes on build:
An unhandled exception of type ‘Microsoft.Xna.Framework.Content.ContentLoadException’ occurred in Microsoft.Xna.Framework.dll
Additional information: Error loading “ProfilerFont”. File not found.
Hi SimpleRookie
In the PDF file explaining how to use the profiler, there’s a paragraph explaining that you need to setup the component with a SpriteFont passing the path to the font you wanna use.
If you have any other issue, feel free to contact me again
My apologize I totally glossed over that paragraph. Thanks!
Is there anyway to set the display size? To get inside of the “safezone” on the screen? Computer is fine of course, but shifting it to the xbox puts it into that area that the tv’s won’t show along the edges.
Unfortunatelly there is no way to setup the display area. I may add that as a feature later.
For the time being, I’ll consider it as a bug and I’ll fix it so it uses the TitleSafeArea instead of client bounds.
Stay tuned for some news on my twitter account or in this blog.
There doesn’t seem to be a way to view info that exceeds the screen height.
BTW, is this the best place to send bug reports? I noticed the IGF was on CodePlex but I couldn’t find IGP.
I need to work on this feature and add a scrolling system to IGP. I just didn’t find the time to do it.
While IGF is open source, IGP isn’t for now. I may open its source code when I get this last feature done.
Hi,
I managed to follow your instructions in the pdf to the word, but I must be doing something wrong because the ctrl+F12 and the start+dpad-up shortcuts don’t work. The game’s framerate drops a little bit and there’s nothing in the console so I’m guessing it’s in the background or, like I said, I’ve done something wrong. It just does nothing.
Is there an example project or something where it’s been set up properly and shows some data?
If you followed the instructions by the word, the sole thing I could think of would be that your Game inherited class doesn’t override Update and/or Draw.
IGP actually uses these methods to add a few code. If they aren’t in the assembly it can’t do its job. I have an idea to remove this dependency in a next release.
Having a little issue. I went through and got your profiler to work, but it turned out to be not for me. (Running on XBOX it ate my speed up and spit out about 2 fps) No big deal. I’ll still use it now and again for windows work. However, previous to installing I could debug xbox running builds on the computer and now I cannot. Is there a way to reverse this? I have removed all ref and links to the profiler but it still won’t let me debug normally again, is there some option I must have missed? Any help is appreciated.
Hi Mac, that is really strange you get such performance drop using the profiler. Can you share with me the class and method signatures (not their body, I don’t need it so understand the potential issue)?
As for removing the profiler from the Xbox project, you should just have to take all configuration steps backward (remove the “igp.exe…” call from the build post event, remove references, remove AssemblyInfo.cs added attributes, remove the Profiler game component from the game constructor and update methods).
It was on an older project, I just slapped it on top of the whole thing. Something like 60 classes, so each call ate a little bit.
As for the removing, yea, that’s what I had figured, just take the steps in reverse order. But something must have got changed in the IDE that I missed. Since newer projects have the same issue as well. Maybe I’ll try a fresh install.
Even with 60 classes or more, it shouldn’t slow down that much as everything is set when building and it actually simply surrounds your public methods with a Stopwatch listener. And rendering is simply getting through a list of values to print on screen using a standard SpriteBatch.DrawString(…) call.
I haven’t met yet anything like what you’re experiencing but that doesn’t mean something weird isn’t happening because of IGP… Let me know what you find out.
Hi, I’ve followed the instructions, but at the end, when I tried to build the project, I got a “type or namespace ‘Profiler’ could not be found” as well as for ‘ProfilerAttribute’ in AssemblyInfo.cs . I’ve added both references and the post-build event and also tried with an new XNA 4.0 Windows project but it would still not work.
Any help would be appreciated.
What do you mean by it still doesn’t work? Does it compile or throws an error?
When I build the game, I get a “type or namespace ‘Profiler’ could not be found” and a “type or namespace ‘ProfilerAttribute’ could not be found” in AssemblyInfo.cs.
The error happens at this line :
[assembly: Profiler(GameClass = "IndieFreaksProfilerTest.Game1")]
This is in a new XNA 4.0 Windows Project I created to test this. I followed the instructions in the .pdf, got to the end after adding the post build event, built the game as instructed (step 5) and got the error I mentioned.
Ah! Fixed it, had forgotten to add “using Indiefreaks.AOP.Profiler;” in Assembly.cs.
Now I get
The command “”C:\Program Files (x86)\Indiefreaks.com\Indiefreaks Game Profiler\igp.exe”"C:\Projects\XNAtests\IndieFreaksProfilerTest\IndieFreaksProfilerTest\IndieFreaksProfilerTest\bin\x86\Debug\IndieFreaksProfilerTest.exe”" exited with code 123.
This seems to be about the post-build event which looks like this :
“C:\Program Files (x86)\Indiefreaks.com\Indiefreaks Game Profiler\igp.exe”"$(TargetPath)”
I have not modified the installation directory of igp.exe and I am on a 64bit OS.
Sorry for the multiple posts, but I’m finding new information about the error, I think I should share it as it could help fixing it, if it’s too much, I’ll stop.
The output window looks like this after the error I mentioned in the previous post :
IndieFreaksProfilerTest -> C:\Projects\XNAtests\IndieFreaksProfilerTest\IndieFreaksProfilerTest\IndieFreaksProfilerTest\bin\x86\Debug\IndieFreaksProfilerTest.exe
The filename, directory name, or volume label syntax is incorrect
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3717,9): error MSB3073: The command “”C:\Projects\XNAtests\IndieFreaksProfilerTest\IndieFreaksProfilerTest\IGP\igp.exe”"C:\Projects\XNAtests\IndieFreaksProfilerTest\IndieFreaksProfilerTest\IndieFreaksProfilerTest\bin\x86\Debug\IndieFreaksProfilerTest.exe”" exited with code 123.
This part seems interesting : “The filename, directory name, or volume label syntax is incorrect”. However, I don’t see any strange characters/syntax that could lead to this error, I checked the file paths and they are correct.
Arkensis, the igp.exe call should be done on the C:\Program Files path and not on your C:\Projects one. That might be the issue.
I’ve found the problem, I forgot a space in the post build event.
this works :
“C:\Program Files (x86)\Indiefreaks.com\Indiefreaks Game Profiler\igp.exe” “$(TargetPath)”
this doesnt
“C:\Program Files (x86)\Indiefreaks.com\Indiefreaks Game Profiler\igp.exe”"$(TargetPath)”
Work excellent!
I have a question. I have a external project that generated a DLL.
How I can include the functions of that DLL in the profiler?
Hi Edgar,
If you want to include a dll in the profiler, you need to add the same references and attributes to the dll source code.
This is required to prevent injecting code to a dll when you shouldn’t: most 3rd party assemblies’ licenses forbids you to inject/modify its binary code.