Jump to content

100% CPU when changing font


Go to solution Solved by Rick Brewster,

Recommended Posts

I have just updated to version 4.3.4 and when I use the Text tool, if I don't change the default font (Calibri) everything works but if I try to change the font, Paint.NET takes 100% CPU (multi core CPU!!!) and I have to kill it.

It is enough to open the font combobox to have this effect.

I have uninstalled Paint and reinstalled it but nothing changes, I can't change font.

My OS is Windows 10 pro 64bit v1607 (I can't update for compatibility issues).

 

Any suggestion to solve this problem?

 

Thanks

Link to comment
Share on other sites

Hello @stefanob and welcome :)

 

I can't reproduce this myself in 4.3.4.  Are you saying it 'hangs' so that you have to kill it?

30b8T8B.gif

How I made Jennifer & Halle in Paint.net

My Gallery | My Deviant Art

"Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon.

 
Link to comment
Share on other sites

Hello and welcome from me too @stefanob

 

I too had some very strange 'hangs' after updating to 4.3.4 - I had to keep using the task manager to kill pdn.😒
However when you actually leave it to run without trying to do anything it eventually sorts itself out. The next time you open the program it loads quickly and doesn't hang.
I believe it is doing loads of background stuff when first loaded after installation and appears usable when it isn't really ready... Also check settings for any plugin load errors, many effects need updating for this version. A reboot may help too.
Hope that helps.

 

Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings

 

PdnForumSig2.jpg

Link to comment
Share on other sites

On 12/10/2021 at 6:25 AM, stefanob said:

Any suggestion to solve this problem?

Greetings @stefanob

 

Where do you have your fonts installed?

Do you see fonts in Settings\Fonts?

Can you use fonts in another application? (Wordpad or Notepad)

Download and install a font to see what happens when you install a font. https://www.dafont.com/

If it installs, see if you can see it in Paint.

Fonts is a windows setting. Not a Paint setting. Paint can only use those fonts that are installed to windows.

One of these questions should reveal the trouble.

Not updating Windows could be the issue as well.

Good Luck :)

 

 

qG3vze.png

 

Link to comment
Share on other sites

Hello AndrewDavid, thanks for your suggestions.

My fonts are installed in C:\WINDOWS\Fonts and in the Settings I have not found a Font menu but in the Tools menu, in the Text section (see image) there is a font combobox that behave in the same manner as the one in the main Paint.NET interface: if I open it, Paint takes 100% CPU.

In other application (Word) I can use fonts without problems.

I have downloaded and installed a font and I can see it both in Paint than in Word (but Paint takes 100% CPU...)

I hope that the problem is not not updating Windows.

I have this problem only witn this last version of Paint, now I look for the previous one.

paint.jpg

Link to comment
Share on other sites

4 hours ago, stefanob said:

attach a (low quality) video to show what is happening.

 

You seem to have an awful lot of other applications running at the same time, which may be interfering with paint.net.

Try stopping them and use only paint.net to see if it makes a difference.

30b8T8B.gif

How I made Jennifer & Halle in Paint.net

My Gallery | My Deviant Art

"Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon.

 
Link to comment
Share on other sites

I have installed .NET 6.0 but it did not solved the problem.

Now I have installed Paint.NET 4.0.20 and things are better even if in reality the problem persists.

Now I can change font and go on working but the CPU usage goes to 25-30%; since I have a 4 cores CPU, I suspect that Paint 4.0 is not a multi-core application while 4.3 is.

Link to comment
Share on other sites

If you can easily reproduce the problem, would you mind using the portable version of 4.3.4 and creating a performance trace for me? That would pinpoint where the CPU time is being spent 

 

Also, 4.0 is definitely a highly multithreaded app too. It always has been.

 

 

 

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

  • Solution

So I looked at the trace you sent me, @stefanob and it's definitely using a lot of CPU time in the CreateFontPreview method (i.o.w. it's not some other red herring)

 

image.png

The highlights for the table and graph are synchronized (that's how WPA works). My CreateFontPreview method is using DirectWrite to render text, and it's spending almost all (99.83%) of its time in a function called VariationInterpolator::AccumulateInterpolatedTupleDeltas. So, something about font "variations" is causing this.

 

I searched for that function name and I found this, https://github.com/microsoft/cascadia-code/issues/319 . Someone was having performance problems with Visual Studio, on Windows Server v1607 (same as Win10 v1607), after installing the Cascadia font. I recommend reading through that issue, they may have some insight for you. However, ultimately, you need to install your Windows Updates, as this has probably been fixed. You may also have installed some fonts with "variations" (not sure what that is), and you might be able to uninstall/disable them to get performance working again. Or maybe just install a newer version of them (maybe it's the Cascadia font; that link is in the GitHub repo for it, they probably have a newer release).

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...