Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. WPF is a nightmare

WPF is a nightmare

Scheduled Pinned Locked Moved The Lounge
csharpc++wpfarchitectureperformance
29 Posts 8 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Christian Graus

    Yeah - the best bit is that my business partner doesn't want to discuss it, he just expects it to work. 'This is an expensive machine' he keeps reminding me. I agree in part, I want to fix it and not just ditch this machine, what if a client buys the same one ?

    Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

    S Offline
    S Offline
    Shog9 0
    wrote on last edited by
    #5

    Christian Graus wrote:

    I agree in part, I want to fix it and not just ditch this machine, what if a client buys the same one ?

    Watch Dell (or NVidia or whoever) like a hawk. For updated drivers. Or older drivers. Either way, look for one that works. Then recommend it to anyone who reports the same problem. Or, start a HCL. I mean, what else can you do? Say you latched upon some voodoo that avoided the problem. Who's to say it won't cause other problems on other hardware / other drivers? Some days, plain ol' framebuffer rendering is just about the most appealing thing out there.

    C 1 Reply Last reply
    0
    • L Luca Leonardo Scorcia

      I'd blame graphics drivers... have you tried fiddling with the different hardware acceleration parameters?

      Luca The Price of Freedom is Eternal Vigilance. -- Wing Commander IV En Það Besta Sem Guð Hefur Skapað, Er Nýr Dagur. (But the best thing God has created, is a New Day.) -- Sigur Ròs - Viðrar vel til loftárása

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #6

      No, good thought, thanks. I was aware that the drivers are almost certainly the issue, but I didn't think to try that. :doh:

      Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      1 Reply Last reply
      0
      • S Shog9 0

        Christian Graus wrote:

        I agree in part, I want to fix it and not just ditch this machine, what if a client buys the same one ?

        Watch Dell (or NVidia or whoever) like a hawk. For updated drivers. Or older drivers. Either way, look for one that works. Then recommend it to anyone who reports the same problem. Or, start a HCL. I mean, what else can you do? Say you latched upon some voodoo that avoided the problem. Who's to say it won't cause other problems on other hardware / other drivers? Some days, plain ol' framebuffer rendering is just about the most appealing thing out there.

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #7

        If I turn the hardware acceleration down so that DX is off, it solves it ( but now the app is all jerky ). I wonder if a new version of DX might help ?

        Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        S K 2 Replies Last reply
        0
        • C Christian Graus

          If I turn the hardware acceleration down so that DX is off, it solves it ( but now the app is all jerky ). I wonder if a new version of DX might help ?

          Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

          S Offline
          S Offline
          Shog9 0
          wrote on last edited by
          #8

          Christian Graus wrote:

          If I turn the hardware acceleration down so that DX is off, it solves it ( but now the app is all jerky ).

          Yeah, 'cause now you're doing software rendering into a framebuffer, and MS doesn't write fast software renderers.

          Christian Graus wrote:

          I wonder if a new version of DX might help ?

          :shrug: Worth a shot, maybe... but presumably you have the same DX on other machines? Check for new DX drivers first.

          C 1 Reply Last reply
          0
          • C Christian Graus

            So, we have shipped our product. It pretty much works great on all machines, bar the Dell we bought to use for demos ( it's a portable PC, but too big to be a notebook, it's a media center ). In our app, we show images and when we zoom, we reload them at the new size ( so we keep the smallest possible image in memory ). On the Dell, it zooms, reloads the image, but does not refresh. Calls to invalidate visual do not work. In fact, the whole app bar the frame stops painting, opens calculator and you can leave a trail. Minimise and maximise and all is good again. But not for all images. And only on the Dell. I tried a number of fixes, such as loading a blank image first, clearing the data dependancy property, etc. Many of these work. Twice. Then never work again. How is that possible ? how is any of this possible ? There are huge bugs in WPF that are known and not fixed, don't they even care ?

            Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

            P Offline
            P Offline
            peterchen
            wrote on last edited by
            #9

            Christian Graus wrote:

            how is any of this possible ? There are huge bugs in WPF that are known and not fixed, don't they even care ?

            Everybody is still drooling over how cool it looks, so cover your keyboard.

            We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
            blog: TDD - the Aha! | Linkify!| FoldWithUs! | sighist

            P 1 Reply Last reply
            0
            • S Shog9 0

              Christian Graus wrote:

              If I turn the hardware acceleration down so that DX is off, it solves it ( but now the app is all jerky ).

              Yeah, 'cause now you're doing software rendering into a framebuffer, and MS doesn't write fast software renderers.

              Christian Graus wrote:

              I wonder if a new version of DX might help ?

              :shrug: Worth a shot, maybe... but presumably you have the same DX on other machines? Check for new DX drivers first.

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #10

              I don't know, I assume so. But, it's worth a shot. Apart from that, I've got nothing.... It's still true that if WPF allowed me to tell a window to repaint itself, there would be no problem.

              Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

              S 1 Reply Last reply
              0
              • C Christian Graus

                I don't know, I assume so. But, it's worth a shot. Apart from that, I've got nothing.... It's still true that if WPF allowed me to tell a window to repaint itself, there would be no problem.

                Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                S Offline
                S Offline
                Shog9 0
                wrote on last edited by
                #11

                Christian Graus wrote:

                It's still true that if WPF allowed me to tell a window to repaint itself, there would be no problem.

                And then you'd have a procedural rendering system, which was great on DOS and which i miss dearly, but... wait, what was the downside again? :rolleyes: Since, presumably, dragging calc over it is invalidating the window, you have the deeper issue that whatever is managing it either 1) doesn't get the message, or 2) is trying to refresh the screen from the screen buffer rather than a backing store, or 3) some bizarre DX issue that boils down to #2. So either your hypothetical RepaintWindow() proc lets you override WPF and tell DX to throw away all its buffers and then tell WPF to re-render, or you're stuck with the same (or maybe an even weirder) issue. Just out of curiosity - does slightly resizing the window also "fix" the problem (temporarily)?

                C 1 Reply Last reply
                0
                • S Shog9 0

                  Christian Graus wrote:

                  It's still true that if WPF allowed me to tell a window to repaint itself, there would be no problem.

                  And then you'd have a procedural rendering system, which was great on DOS and which i miss dearly, but... wait, what was the downside again? :rolleyes: Since, presumably, dragging calc over it is invalidating the window, you have the deeper issue that whatever is managing it either 1) doesn't get the message, or 2) is trying to refresh the screen from the screen buffer rather than a backing store, or 3) some bizarre DX issue that boils down to #2. So either your hypothetical RepaintWindow() proc lets you override WPF and tell DX to throw away all its buffers and then tell WPF to re-render, or you're stuck with the same (or maybe an even weirder) issue. Just out of curiosity - does slightly resizing the window also "fix" the problem (temporarily)?

                  C Offline
                  C Offline
                  Christian Graus
                  wrote on last edited by
                  #12

                  yes, a restore/maximise will do it, if there's a delay between the calls. Installing the new DX, it worked on tests 1 and 2, not on 3, and again on 4. Dell don't have new drivers, I can get them from ATI but I need to use a third party tool to install them on a Dell, I need to talk to Matt before I do that.

                  Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                  S 1 Reply Last reply
                  0
                  • C Christian Graus

                    yes, a restore/maximise will do it, if there's a delay between the calls. Installing the new DX, it worked on tests 1 and 2, not on 3, and again on 4. Dell don't have new drivers, I can get them from ATI but I need to use a third party tool to install them on a Dell, I need to talk to Matt before I do that.

                    Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                    S Offline
                    S Offline
                    Shog9 0
                    wrote on last edited by
                    #13

                    Christian Graus wrote:

                    I can get them from ATI

                    Heh, i was just gonna ask if it was an ATI card. My next question is, is this on XP or Vista? (my prediction: XP)

                    C 1 Reply Last reply
                    0
                    • S Shog9 0

                      Christian Graus wrote:

                      I can get them from ATI

                      Heh, i was just gonna ask if it was an ATI card. My next question is, is this on XP or Vista? (my prediction: XP)

                      C Offline
                      C Offline
                      Christian Graus
                      wrote on last edited by
                      #14

                      Ah... yes, we are on XP, we rolled back from Vista due to other issues, plus we all hate using Vista. So, there's a pattern here ?

                      Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                      S 1 Reply Last reply
                      0
                      • C Christian Graus

                        Ah... yes, we are on XP, we rolled back from Vista due to other issues, plus we all hate using Vista. So, there's a pattern here ?

                        Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                        S Offline
                        S Offline
                        Shog9 0
                        wrote on last edited by
                        #15

                        ATI has a bit of a history of... issues when rendering into a DX window (vs. fullscreen) surface. I'm just assuming here that (on XP) WPF has to manage its own surfaces and is hitting the bug because of it (AFAIK, Vista's DWM puts a lot of even weirder requirements on the drivers in order to implement hardware-accelerated double-buffering and funky shower-door translucency for Aero, so bugs like this are probably flushed out faster). If i were you, i wouldn't waste any more time on this 'till you've tried updated drivers direct from ATI.

                        C 1 Reply Last reply
                        0
                        • S Shog9 0

                          ATI has a bit of a history of... issues when rendering into a DX window (vs. fullscreen) surface. I'm just assuming here that (on XP) WPF has to manage its own surfaces and is hitting the bug because of it (AFAIK, Vista's DWM puts a lot of even weirder requirements on the drivers in order to implement hardware-accelerated double-buffering and funky shower-door translucency for Aero, so bugs like this are probably flushed out faster). If i were you, i wouldn't waste any more time on this 'till you've tried updated drivers direct from ATI.

                          C Offline
                          C Offline
                          Christian Graus
                          wrote on last edited by
                          #16

                          Thanks for the info, I'd pretty much decided exactly that. I wonder if it's possible to replace the video card in this thing....

                          Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                          1 Reply Last reply
                          0
                          • P peterchen

                            Christian Graus wrote:

                            how is any of this possible ? There are huge bugs in WPF that are known and not fixed, don't they even care ?

                            Everybody is still drooling over how cool it looks, so cover your keyboard.

                            We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
                            blog: TDD - the Aha! | Linkify!| FoldWithUs! | sighist

                            P Offline
                            P Offline
                            Paul Watson
                            wrote on last edited by
                            #17

                            peterchen wrote:

                            Everybody is still drooling over how cool it looks, so cover your keyboard.

                            Got any demos? Seen nothing impressive since what I saw at Mix'06. Nothing in the wild at least.

                            regards, Paul Watson Ireland & South Africa

                            Fernando A. Gomez F. wrote:

                            At least he achieved immortality for a few years.

                            P 1 Reply Last reply
                            0
                            • P Paul Watson

                              peterchen wrote:

                              Everybody is still drooling over how cool it looks, so cover your keyboard.

                              Got any demos? Seen nothing impressive since what I saw at Mix'06. Nothing in the wild at least.

                              regards, Paul Watson Ireland & South Africa

                              Fernando A. Gomez F. wrote:

                              At least he achieved immortality for a few years.

                              P Offline
                              P Offline
                              peterchen
                              wrote on last edited by
                              #18

                              Nothing except what I've seen here on CP. It looks good, and fun if you have the time and desire to make you app look shiny.

                              We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
                              blog: TDD - the Aha! | Linkify!| FoldWithUs! | sighist

                              S 1 Reply Last reply
                              0
                              • C Christian Graus

                                So, we have shipped our product. It pretty much works great on all machines, bar the Dell we bought to use for demos ( it's a portable PC, but too big to be a notebook, it's a media center ). In our app, we show images and when we zoom, we reload them at the new size ( so we keep the smallest possible image in memory ). On the Dell, it zooms, reloads the image, but does not refresh. Calls to invalidate visual do not work. In fact, the whole app bar the frame stops painting, opens calculator and you can leave a trail. Minimise and maximise and all is good again. But not for all images. And only on the Dell. I tried a number of fixes, such as loading a blank image first, clearing the data dependancy property, etc. Many of these work. Twice. Then never work again. How is that possible ? how is any of this possible ? There are huge bugs in WPF that are known and not fixed, don't they even care ?

                                Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                                A Offline
                                A Offline
                                Andre xxxxxxx
                                wrote on last edited by
                                #19

                                Are you still using this old and crufty WPF technology? "The Windows UI Platform team is creating a new Framework that will enable new UI experiences in future versions of Windows." http://www.istartedsomething.com/20080111/new-ui-framework-future-windows/[^] Also according to a developer of Windows 7 WPF goes unmanged: "I'm sure that the WPF stack will be optimized, perf-wise. I'll bet anything (well...my MSFT stock options) that it will be unmanaged in the future. Wait! It is! See Silverlight - light, small, fast. Microsoft ended up writing a WPF stack twice - which is expensive, and pointless - we should have released something much better the first time round, imo."

                                P 1 Reply Last reply
                                0
                                • A Andre xxxxxxx

                                  Are you still using this old and crufty WPF technology? "The Windows UI Platform team is creating a new Framework that will enable new UI experiences in future versions of Windows." http://www.istartedsomething.com/20080111/new-ui-framework-future-windows/[^] Also according to a developer of Windows 7 WPF goes unmanged: "I'm sure that the WPF stack will be optimized, perf-wise. I'll bet anything (well...my MSFT stock options) that it will be unmanaged in the future. Wait! It is! See Silverlight - light, small, fast. Microsoft ended up writing a WPF stack twice - which is expensive, and pointless - we should have released something much better the first time round, imo."

                                  P Offline
                                  P Offline
                                  Paul Watson
                                  wrote on last edited by
                                  #20

                                  That has got to be a joke, right? Worse than us frikking web developers with our dynamic frameworks that sprout faster than weeds in horse manure.

                                  regards, Paul Watson Ireland & South Africa

                                  Fernando A. Gomez F. wrote:

                                  At least he achieved immortality for a few years.

                                  A S 2 Replies Last reply
                                  0
                                  • P Paul Watson

                                    That has got to be a joke, right? Worse than us frikking web developers with our dynamic frameworks that sprout faster than weeds in horse manure.

                                    regards, Paul Watson Ireland & South Africa

                                    Fernando A. Gomez F. wrote:

                                    At least he achieved immortality for a few years.

                                    A Offline
                                    A Offline
                                    Andre xxxxxxx
                                    wrote on last edited by
                                    #21

                                    Paul Watson wrote:

                                    That has got to be a joke, right?

                                    I guess only the future can tell, from internal plans to announcements to what actually ships is a long way. But I have zero hope for WPF in its current form and hope for an unmanaged version of WPF which I can used straight from C++ :) But wait, we almost already have it, Codejock is working on a MFC XAML renderer and it beats the performance of WPF by factor 10 or so on my machine. So I can step into XAML without using this bloated framework from Microsoft :)

                                    1 Reply Last reply
                                    0
                                    • P Paul Watson

                                      That has got to be a joke, right? Worse than us frikking web developers with our dynamic frameworks that sprout faster than weeds in horse manure.

                                      regards, Paul Watson Ireland & South Africa

                                      Fernando A. Gomez F. wrote:

                                      At least he achieved immortality for a few years.

                                      S Offline
                                      S Offline
                                      Shog9 0
                                      wrote on last edited by
                                      #22

                                      Paul Watson wrote:

                                      That has got to be a joke, right?

                                      Ahhah. Hahhah. Hahahahahah. You've been away from the MS world too long, Paul. Nothing lies still long here.

                                      1 Reply Last reply
                                      0
                                      • P peterchen

                                        Nothing except what I've seen here on CP. It looks good, and fun if you have the time and desire to make you app look shiny.

                                        We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
                                        blog: TDD - the Aha! | Linkify!| FoldWithUs! | sighist

                                        S Offline
                                        S Offline
                                        Shog9 0
                                        wrote on last edited by
                                        #23

                                        peterchen wrote:

                                        It looks good, and fun if you have the time and desire to make you app look shiny.

                                        IMHO, the true beauty is that MS is finally moving away from the '80s-style "we have to cram the entire UI into 4K of RAM, screw re-use" model of development. The problem is, they wrote it for XAML, which pretty much requires tools to use effectively, and for which no good tools are available. By the time we get good tools, it'll be obsolete.

                                        1 Reply Last reply
                                        0
                                        • C Christian Graus

                                          So, we have shipped our product. It pretty much works great on all machines, bar the Dell we bought to use for demos ( it's a portable PC, but too big to be a notebook, it's a media center ). In our app, we show images and when we zoom, we reload them at the new size ( so we keep the smallest possible image in memory ). On the Dell, it zooms, reloads the image, but does not refresh. Calls to invalidate visual do not work. In fact, the whole app bar the frame stops painting, opens calculator and you can leave a trail. Minimise and maximise and all is good again. But not for all images. And only on the Dell. I tried a number of fixes, such as loading a blank image first, clearing the data dependancy property, etc. Many of these work. Twice. Then never work again. How is that possible ? how is any of this possible ? There are huge bugs in WPF that are known and not fixed, don't they even care ?

                                          Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                                          A Offline
                                          A Offline
                                          Andy Brummer
                                          wrote on last edited by
                                          #24

                                          If Dell doesn't have updated video drivers for that system, look up the specs on it and download drivers from the chipset vendor. There's a good chance that will fix it. Who knows what Dell had disabled during their certification process, or how many versions back their driver is.


                                          I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon

                                          C 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups