PDA

View Full Version : Rendering and possibly memory leaking issue



Ikael
March 15th, 2011, 19:46
I have experienced several times strange rendering issues which have caused Windows 7 crashing with bluescreen saying "dumping memory". I use custom ruleset which has sharable combat tracker. This issue only occurs when I have shared he combat tracker so I am starting to believe that it's issue in my ruleset. However I am glueless what could cause this kind of behavior. The crash have occurred 2 times from 10 similar situations where I share combat tracker to players (3 players in all cases). Has anyone received similar strange rendering issues with FG (in any situation). Those obscure rendering marks move vividly from side to side and sometimes they dissapear and reappear, but there doesn't seem to be any logic in there. Could it be possible that somehow player would be moving/resizing the shared combat tracker on his side which could cause this kind of issues?

In addition one real concern about FG is that it actually has allowed windows to crash. I believe FG could have little better memory handling that would close the application itself in facing such memory leaking.

Griogre
March 15th, 2011, 22:19
I get that refresh problem all the time. I think there is a refresh problem in the chat window area. I started noticing it started several versions back. To make it go away you just need to move the mouse over the area which I presume causes a refresh and fixes the problem. While it often happens during combat I'm not sure I could tie it to combat.

I've never had FG crash because of it and I'll see it at least a few times a session sometimes a half a dozen times. I use the 4E ruleset.

phantomwhale
March 15th, 2011, 23:03
I've had one player get infrequent display driver crashes or bad rendering (https://www.fantasygrounds.com/forums/showthread.php?t=13901) as you described, and myself can occasionally get a DirectX error on loading the client during my ruleset development (often fixed by a reboot or closing several memory hog apps then reopening them after loading FGII).

So I concur there is something "sub-optimal" in the graphical display / memory usage of FGII occasionally, but cannot find a 100% way to reproduce these errors to make any solid suggestions

Zeus
March 15th, 2011, 23:16
I get that refresh problem all the time. I think there is a refresh problem in the chat window area. I started noticing it started several versions back. To make it go away you just need to move the mouse over the area which I presume causes a refresh and fixes the problem. While it often happens during combat I'm not sure I could tie it to combat.

I've never had FG crash because of it and I'll see it at least a few times a session sometimes a half a dozen times. I use the 4E ruleset.

Hmm. I wonder if some of the fixes moon_wizard introduced for better Mac/Wine support could be causing the screen rendering issues your seeing.

I only say this as I originally had a similar problem on Mac with some parts of the screen not rendering until mouse movement over the affected chat pad. Since moon_wizard addressed a fix, I have not seen a repeat of the rendering issue.

I run at least 2 sessions a week, each one lasting 3-4 hours and I have not noticed the rendering corruption issue. Given I am running under Wine, might offer an explanation as to why I don't see it but you do. Maybe moon_wizard can offer his insight.

AnAxeToGrind
March 16th, 2011, 01:49
I will occasionally get a garble flicker related to Win 7 when using FG. This happens over the whole screen. This is related to the Dell driver for my particular screen (much improved from the oops I shutdown reboot me screen of death I used to get)

adminwheel3
March 16th, 2011, 02:13
I get that refresh problem all the time. I think there is a refresh problem in the chat window area. I started noticing it started several versions back. To make it go away you just need to move the mouse over the area which I presume causes a refresh and fixes the problem. While it often happens during combat I'm not sure I could tie it to combat.

I've never had FG crash because of it and I'll see it at least a few times a session sometimes a half a dozen times. I use the 4E ruleset.


Same here - I see it as well - and I cross my fingers and hope it goes away. So far that's worked for me.

StuartW
March 16th, 2011, 07:45
The screen rendering issue can also arise if there is a 'race condition' in the ruleset code, specifically when the host and one or more clients compete to update the same resource. It has been seen with shared combat trackers before, including early versions of some of my rulesets, and I believe JPG had similar issues at one time.

It doesn't seem easy to track down or isolate the issue, and is very frustrating when it occurs.

Sorry I can't be much more help.

Stuart

madman
March 16th, 2011, 16:03
That's weird, I had the same thing happen. Yesterday during a game, for the first time. And during a Cthulhu game last night I saw a 2-3 pixel line flash across the screen about ten times.
Have never noticed these before.

Chris

Moon Wizard
March 18th, 2011, 02:21
I see the compressed graphics similar to the image about once a session, but it only lasts for a quarter second. I'm unsure as to what is causing the issue.

At least in all newer versions of Windows, the only way to get a blue screen crash is when a driver has errors. Programs can not cause these errors, though they can call a driver which causes the errors. (graphics, sound, etc.) During one of the v2.7.x development cycles, I found an issue where DirectX would crash if it was passed a certain set of values that sometimes occured in FG (now worked around).

Even when it runs out of memory, FG should just crash, not all of Windows. Also, v2.7.4+ has significantly reduced memory requirements, so you should make sure you are running that version.

Regards,
JPG

Galeric
March 18th, 2011, 05:58
Just had this issue happen while playing with a couple people, and it did crash windows on me. rebooted and came back, now no one can connect to me =/

But anyway, did not have any of these issues with 272, but since i updated to 274 this has happened twice in 2 days, my question is... If i revert to 272 how much content do i miss ?

Moon Wizard
March 18th, 2011, 11:00
The changes between 2.7.2 to 2.7.4 were two main items:
* Chat log backward compatibility to v2.6.x
* Memory usage reduction (Modules take about 50-60% less memory)

Are you sure nothing else changed in the interim? Graphics driver updates, etc? I've had the graphics glitch happen for a long time on my machine, not just with 2.7.4.

For the connection, you should check the IP address of your computer, since it may have changed during reboot.

Also, what OS are you running? I wonder if it's specific to one of the earlier Win OS versions.

Thanks,
JPG

Zeus
March 18th, 2011, 12:06
The changes between 2.7.2 to 2.7.4 were two main items:
* Chat log backward compatibility to v2.6.x
* Memory usage reduction (Modules take about 50-60% less memory)

Are you sure nothing else changed in the interim? Graphics driver updates, etc? I've had the graphics glitch happen for a long time on my machine, not just with 2.7.4.

For the connection, you should check the IP address of your computer, since it may have changed during reboot.

Also, what OS are you running? I wonder if it's specific to one of the earlier Win OS versions.

Thanks,
JPG

moon, as per my post above I do not see the corruption at all under Wine/OSX. I do occasionally see it on my Win 7 development system (particularly when my code goes awry or I get into a loop/heavy processing condition).

The only glitch I see under Wine/OSX is during player connection, the host usually freezes for 10-15 seconds and the screen sometimes goes black. Normal activity resumes pretty quickly.

Do you recall the screen region refresh issue that occurred back in early 2.7.x, I was getting corrupted output of the chatwindow (would disappear until mouse over). Could it be related to region refresh code.

Galeric
March 18th, 2011, 17:44
The changes between 2.7.2 to 2.7.4 were two main items:
* Chat log backward compatibility to v2.6.x
* Memory usage reduction (Modules take about 50-60% less memory)

Are you sure nothing else changed in the interim? Graphics driver updates, etc? I've had the graphics glitch happen for a long time on my machine, not just with 2.7.4.

Not a thing changed. Latest DirectX, latest Nividia Drivers, and the system has been running really good over the last month. Win7 is the OS unfortunately. This is definitely a video problem. Pixelation and smearing are real bad, i watched it for awhile each time to see what it was doing. Couple occasions the driver crashed but was able to recover.



For the connection, you should check the IP address of your computer, since it may have changed during reboot.

Thanks,
JPG

As far as this, this should have a solution in the "Generate Alias" button. I dont know what kind of timer the server has for time out but several hours later no one was able to connect to me at all, not sure if this is the case right now however.

Moon Wizard
March 18th, 2011, 19:13
If the IP address changes, then port forwarding settings have to be updated on your router. It's a security feature of your router, not something that a piece of software can control. I did implement UPnP support to attempt to automatically set up port forwarding in v2.7.2, but router support varies widely. Luckily, only the host needs to worry about this.

Port forwarding setup is the side effect of having a piece of software that you don't have to sign into a remote server in order to use. The vast majority of the community prefers peer-to-peer design, over centralized server (which would require monthly subscription fees, ala DDI).

You should also open up your Task Manager, and make sure that a FantasyGrounds process is not still running. In certain crash conditions, a phantom copy of FG can be left running but not visible, and it will interfere with your visible copy.

Cheers,
JPG

Moon Wizard
March 18th, 2011, 19:19
DrZ,

It possibly could be related to some sort of refresh code. However, the glitched region (at least in my experience) looks like a horizontally compressed copy of the entire desktop, so it doesn't look like a refresh issue. Perhaps something related to DirectX doing something unexpected between frames (i.e. rectangle changed before frame flipped). Talking about it has given me an idea of where I can start investigating, though the inconsistency of it will be hard to determine if I can find a fix or not.

Regards,
JPG

Galeric
March 18th, 2011, 19:52
If the IP address changes, then port forwarding settings have to be updated on your router. It's a security feature of your router, not something that a piece of software can control. I did implement UPnP support to attempt to automatically set up port forwarding in v2.7.2, but router support varies widely. Luckily, only the host needs to worry about this.

Port forwarding setup is the side effect of having a piece of software that you don't have to sign into a remote server in order to use. The vast majority of the community prefers peer-to-peer design, over centralized server (which would require monthly subscription fees, ala DDI).

You should also open up your Task Manager, and make sure that a FantasyGrounds process is not still running. In certain crash conditions, a phantom copy of FG can be left running but not visible, and it will interfere with your visible copy.

Cheers,
JPG

I don't use a router so that is not the issue. My Firewall has persistent connections, unless your app needs UDP opened this should be working no problem. Testing connection i can see you and you can see me according to your test connection button. its just a 3rd party is not able to find me using your protocols.

myself and that 3rd party can connect to each other using Utorrent, and many other pieces of software, its just not a possibility with FG. Now i have dug through your options and since there is no real manual on what your options do i have no clue what half of them do. However i am 99% positive there would be no connection options in your game options that would have been flagged some how.

And The system was rebooted, so no ghost process running at the time.

And as far as getting back on the topic, i have not noticed memory swelling to much, its acting just like a DirectX issue i used to see in EQ, not sure what they did to fix it.


I know none of this helps, but its all i got for ya.

Moon Wizard
March 23rd, 2011, 07:25
Galeric,

Thanks for the info. As you surmised, I have no way of tracking the cause at this point. If you can remember what actions you were performing at the times, perhaps I can try to narrow that way.

From my review of the code, FG does not currently use UDP. However, I have reviewed some game networking libraries that do.

I have been working on revamping some of the networking code for v2.8, and I found that the Test Connection button will sometimes leave an open listening socket on 1802 which would interfere with subsequent hosting. So, try shutting down FG between Test Connection and Load/Create Campaign.

Finally, I did find that the chat window has a special implementation using some DirectX bitmap functions to speed up display. Since everyone sees the glitch on the left side over the chat window, I might look into this as a lead, but not sure if its the issue. If anyone notices that the glitch is limited to the chat window region only, let me know. I didn't know to look before, and it hasn't happened again.

Thanks,
JPG