Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

GDI Heap Extender

- - - - -

  • Please log in to reply
170 replies to this topic

#101
mcv93us

mcv93us

    Newbie

  • Member
  • 49 posts
  • Joined 16-May 05
  • OS:98SE
  • Country: Country Flag

Installed Beta1 + rp10.dll beta2 --> All OK

Yeah, and youtube works? Finally!

Perhaps, get to see a movie full 1 time in 4. :angry:
I do not know if it depends on algorithm is too aggressive but I upload the video jerky and then to 60% crashes.
It seems that the CPU is working very slow because the PC will not change until the page or I close Internet Explorer.
However I will do other tests.
Bye.

Mcv'93


How to remove advertisement from MSFN

#102
Tihiy

Tihiy

    the creator

  • Member
  • PipPipPipPipPipPipPip
  • 1,944 posts
  • Joined 19-November 04
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

It may be difficult to obtain proper performance on 128MB of RAM. Final algorithms are gonna be much less aggressive.
supem/Chozo4?

#103
Chozo4

Chozo4

    Advanced Member

  • Member
  • PipPipPip
  • 392 posts
  • Joined 31-July 05
Sorry for the late response, was away for a few days. Being the bearer of bad news, it still has the same issue with this build. Do you want fresh watson logs at all and/or perhaps logs produced through OllyDebug (been a while since I'd used it)? Wish there was more i could do to help try to narrow this issue down.

Once I get ahold of a spare HD, I'm going to try a freshinstall and work from the ground up, see what's the root cause and/or if it's the hardware itself.

Hardware is EPoX 9nda3-j, Geforce4 mx 4000, AMD Athlon 64 4000+, 2x512mb OCZ pc3200 DDR.

Edited by Chozo4, 25 August 2009 - 02:02 PM.


#104
Tihiy

Tihiy

    the creator

  • Member
  • PipPipPipPipPipPipPip
  • 1,944 posts
  • Joined 19-November 04
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

it still has the same issue with this build

Can you re-try Alpha2 please? Just to be sure.

Edited by Tihiy, 25 August 2009 - 02:34 PM.


#105
Chozo4

Chozo4

    Advanced Member

  • Member
  • PipPipPip
  • 392 posts
  • Joined 31-July 05

it still has the same issue with this build

Can you re-try Alpha2 please? Just to be sure.


Not having any issues with alpha2 other than the start menu bug that it introduces after a while of use.

#106
slhk

slhk

    Junior

  • Member
  • Pip
  • 68 posts
  • Joined 03-August 08
Beta2 + Simplified Chinese Win98SE + KernelEx 4 Final 2

- Drwatson runs on startup

- No more BSOD at normal shutdown :)

- However, when Kernel Task Manager said "System seems unstable" and I pressed the "Shut Down" button to close all programs, system crashed with BSOD

Otherwise Beta2 looks stable for me

#107
RetroOS

RetroOS

    Senior Member

  • Member
  • PipPipPipPip
  • 531 posts
  • Joined 26-June 07
  • OS:Windows 7 x64
  • Country: Country Flag

GDI Heap Extender Beta 2 Testing
...
The first test I left my batch file loading up all the IE sessions (with fifteen second pauses between) and came back about ten minutes later to find that Windows had rebooted and was sitting at the desktop.
The second test started to exhaust the GDI Heap and some graphics on web pages were missing.
...
I also had several hangs in Microsoft Word 2002 (XP), although I've had this in the past, so I cannot conclusively link it to GDI Heap Extender. It seems to come and go over time, and I've never identified what causes it. It only happens in Word.
...

Well, I've since had a hang in IE6 and a hang in WinDVD - these hangs all required the power button.
Also, after some minutes of using Thunderbird 2.0.0.23, the graphics and buttons started to scramble until it was not possible to make out what to click on.

I've rolled back to Beta 1 and so far no problems.
I've been using Thunderbird for hours selectively transferring, and filing in folders, e-mails from an old webmail account.
No problem whatsoever.

Beta 1 was very stable, so if it continues to be, then I'll know that the previous issues are Beta 2 and not something else.
I'll keep testing with Beta 1 and post results.
retrofreak n a person who is very enthusiastic about something from the past.
retrology n the study of association with and revival from the past.
life n a series of near misses.

#108
Tihiy

Tihiy

    the creator

  • Member
  • PipPipPipPipPipPipPip
  • 1,944 posts
  • Joined 19-November 04
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

Beta 3 dissection edition
http://tihiy.ahanix.org/rpXbeta3.zip

* Reverted RP9 to beta1 (thus shutdown probs again);
* Other changes nobody cares about.

This build has debug partial disabling functionality, intended to help Chozo4 identify the problem:

Please turn on all those switches in \windows\uberskin.ini:

[Beta]
Alpha=1
NoCleanup=1
NoSetDIBits=1
NoRestoreDC=1
NoGetDIBits=1
NoIsGDIObject=1
NoWackoHacko=1
If this solves your problem, please narrow the source of the problem to the only switch. If it's not, i'm gonna divide by zero. Don't forget rebooting.

The summer is almost over.

#109
Chozo4

Chozo4

    Advanced Member

  • Member
  • PipPipPip
  • 392 posts
  • Joined 31-July 05
Just tried out beta3 and tested using the bits specified.

This is OKAY:
[Beta]
Alpha=0
NoCleanup=1
NoSetDIBits=0
NoRestoreDC=0
NoGetDIBits=0
NoIsGDIObject=0
NoWackoHacko=0

However, the issue crops up once you unset the 'NoCleanup' bit.

#110
Tihiy

Tihiy

    the creator

  • Member
  • PipPipPipPipPipPipPip
  • 1,944 posts
  • Joined 19-November 04
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

I felt it, since it was the second only Alpha 2->3 change. But it's just assembly code and the issue must be deeper.
Stay tuned.

Edited by Tihiy, 27 August 2009 - 02:47 PM.


#111
Chozo4

Chozo4

    Advanced Member

  • Member
  • PipPipPip
  • 392 posts
  • Joined 31-July 05
I'd also noticed a slight rendering issue with beta3. Although, I'm not sure if it is due to the cleanup being off for it to work or not. However, when an application crashes (in this case, IExplore.exe causes an IPF in mshtml.dll), the skinning becomes corrupt on the skinning elements (titlebar, taskbar, etc).

http://i29.tinypic.com/10cq550.jpg

Ignore the settings shown in the notepad document up, that was only during testing. The corruption occurs while Alpha=0 only (when alpha=1, the startmenu button only goes missing). The skinning elements are restored by reselecting the theme in rpconfig and applying again so it's purely an inconvinience really rather than something really major.

Edited by Chozo4, 27 August 2009 - 07:34 PM.


#112
Tihiy

Tihiy

    the creator

  • Member
  • PipPipPipPipPipPipPip
  • 1,944 posts
  • Joined 19-November 04
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

Surely it's cleanup.
Now test this please (without NoCleanup on) and let's hope push fs / pop fs save the day.
http://tihiy.ahanix.org/rpXbeta4.zip

#113
Chozo4

Chozo4

    Advanced Member

  • Member
  • PipPipPip
  • 392 posts
  • Joined 31-July 05

Surely it's cleanup.
Now test this please (without NoCleanup on) and let's hope push fs / pop fs save the day.
http://tihiy.ahanix.org/rpXbeta4.zip


Tested without NoCleanup set, no go there. :wacko:

#114
Tihiy

Tihiy

    the creator

  • Member
  • PipPipPipPipPipPipPip
  • 1,944 posts
  • Joined 19-November 04
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

Once again, this one should do the trick...
http://tihiy.ahanix.org/rpXbetaX.zip

Edited by Tihiy, 28 August 2009 - 12:10 PM.


#115
Chozo4

Chozo4

    Advanced Member

  • Member
  • PipPipPip
  • 392 posts
  • Joined 31-July 05

Once again, this one should do the trick...
http://tihiy.ahanix.org/rpXbetaX.zip

[Beta]
Alpha=0
NoCleanup=0
NoSetDIBits=0
NoRestoreDC=0
NoGetDIBits=0
NoIsGDIObject=0
NoWackoHacko=0

SUCCESS! :thumbup

Well, I'm proud to say that one definately did the trick. So far no GDI crashes to report from winamp, psp7, etc.

It will most like be over my head but I hope you don't mind my asking: What WAS the cause anyway? :blink:

Edited by Chozo4, 28 August 2009 - 08:18 PM.


#116
Tihiy

Tihiy

    the creator

  • Member
  • PipPipPipPipPipPipPip
  • 1,944 posts
  • Joined 19-November 04
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

What WAS the cause anyway?

I wish i knew exactly.

GDI Heap Extender works this way: [**** i suck at diagrams]
There are GDI handles pointing to 16-bit local heap memory blocks.
Handles are stored in handle tables and consist of 4 bytes: pointer to block (2 bytes) and flags (2 bytes).

When GDI Heap Extender kicks in, handles are decoupled from blocks. It preallocates several memory blocks [arenas] in 16-bit heap (~1% of resources) and provides those blocks for active GDI handles with special LRU algorithm:
* when new handle is allocated, it points to least used arena. if handle was using this arena, it is 'swapped out': contents are moved into special 'shadow' 32-bit heap. handle is marked by special 'mutated' flag 0x80. this value is not defined nor used in 16-bit heap.
* when GDI function receives handle marked as 'mutated', it must 'unmutate' it the same way: find least used arena, 'swap out' its contents, and 'swap in' object contents.

That's pretty much is it. This way each bitmap handle costs only 4 bytes to GDI heap, not 44 as before, thus potentially there is 10 times possible improvement. There are other limitations for bitmaps (global memory, LDT, 32-bit GDI heap) but best case it's really 10+ times.
GDI Heap Extender also can increase performance sometimes, and that's not obvious. I'll tell ya later.

So what was the problem? 0x80. It seems in Chozo4 case some program/driver is abusing handles the way i do, so I added simple check if it's really a bitmap.

#117
triger49

triger49

    Member

  • Member
  • PipPip
  • 143 posts
  • Joined 14-March 09
Tihiy...

Installed rpxbeta2 . (oops, didn't know I was doing something wrong....sorry)




Thanks
Jake

Edited by triger49, 29 August 2009 - 03:33 PM.


#118
mcv93us

mcv93us

    Newbie

  • Member
  • 49 posts
  • Joined 16-May 05
  • OS:98SE
  • Country: Country Flag
Tested RPX BetaX:

Good results with youtube...

[Beta]
Alpha=0
NoCleanup=1
NoSetDIBits=0
NoRestoreDC=0
NoGetDIBits=0
NoIsGDIObject=0
NoWackoHacko=0

Best results with youtube.
[Beta]
Alpha=0
NoCleanup=1
NoSetDIBits=1
NoRestoreDC=1
NoGetDIBits=1
NoIsGDIObject=1
NoWackoHacko=1

Bye.
Mcv'93

#119
Tihiy

Tihiy

    the creator

  • Member
  • PipPipPipPipPipPipPip
  • 1,944 posts
  • Joined 19-November 04
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

Please don't touch RPXBetaX. It's intended only for those who had problems.
Final beta will came, with optimizations.

#120
Chozo4

Chozo4

    Advanced Member

  • Member
  • PipPipPip
  • 392 posts
  • Joined 31-July 05

What WAS the cause anyway?

I wish i knew exactly.

GDI Heap Extender works this way: [**** i suck at diagrams]


Ah, that explains things well for me, thanks! You say you suck at explaining but quite frankly, you did well as I'd understood it no problem. Just have to love how sometimes it's the smallest most obscure thing that can cause the biggest upheaval in a program,script, etc. Been there myself in other programming languages (though, web based involving user and session databases with efforts to minimize them as much as possible) so can somewhat relate.

.. thanks again for your efforts and unwavering patience in having solved this issue. :)

#121
supem

supem

    Junior

  • Member
  • Pip
  • 50 posts
  • Joined 27-April 08
Hi,
after coming back to my place (and of course to my 98 SE boxes) from one week vacation I found that GDI faults reported and described earlier are successfully solved. Thank you Tihiy.

#122
Chozo4

Chozo4

    Advanced Member

  • Member
  • PipPipPip
  • 392 posts
  • Joined 31-July 05
I think I stumbled upon a potential limitation in the extender (or just misrepresentation of the resource meter perhaps?). When the bitmap count is pushed beyond 600 (611) in this case, certain applications may start to lose their GDI elements (will become blank or corrupt) or will not properly refresh GDI elements. After around 800-1000 or more bitmap entries, some noted symptoms have occured:

1) Internet explorer will only load a page in one explorer instance. All others stay blank and/or not loaded
2) Some programs may not load at all, such as Mozilla Thunderbird
3) Programs may crash with an error containing no error data (no data in the dump info, etc)
4) Trying to save data from the clipboard in MSPaint would result in the following messages: "error getting the clipboard data" followed by "There is not enough memory or resources to complete operation. Close some programs, and then try again."
5) Programs beginnignt o become affected may exhibit pink corners frm the skinning engine
6) Explorer may crash with an illegal operation error in rp8.dll (only noted once)

During all this, resource meter may report that resources are still plenty with around 60-75% GDI resources available.


.. as a side curiosity.. does the GDI extender also go as far as Brushes/Pens? Some programs such as 3mle, a MIDI->MML composer/editor for example basically overflow the brush/pen count with useless entries (but still clean most of them up on close) after a while of use and need to be closed down and restarted to actually use again before it brings down the system due to a lack of resources as a result.

Edited by Chozo4, 09 September 2009 - 01:40 AM.


#123
Tihiy

Tihiy

    the creator

  • Member
  • PipPipPipPipPipPipPip
  • 1,944 posts
  • Joined 19-November 04
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

I think I stumbled upon a potential limitation in the extender

you've bumped into 32-bit heap limitation <- link doesn't work for some reason, look previous page with GDIMaxHeapSize description.

As for GDI Heap Extender: i had release ready but now i'm fighting with extremely nasty Miranda IM crash similar to previously reported, and it's hard to defeat.

Edited by Tihiy, 09 September 2009 - 04:53 AM.


#124
slhk

slhk

    Junior

  • Member
  • Pip
  • 68 posts
  • Joined 03-August 08

you've bumped into 32-bit heap limitation

Can this be overcome by increasing the value of GDIMaxHeapSize in win.ini? When this value is changed, will it be effective at once or a reboot is needed? Will RP10 have an interface for tuning this value? Or will it be tuned automatically by RP10?

#125
Tihiy

Tihiy

    the creator

  • Member
  • PipPipPipPipPipPipPip
  • 1,944 posts
  • Joined 19-November 04
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

Can this be overcome by increasing the value of GDIMaxHeapSize in win.ini?

Yep. I plan RP10 to bump it to 4MB (only if not already specified). Setting too big values is not recommended as it may deplete too much selectors.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users