Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrupted Style with Test Feature #32

Open
Goujer opened this issue Oct 2, 2019 · 8 comments
Open

Corrupted Style with Test Feature #32

Goujer opened this issue Oct 2, 2019 · 8 comments

Comments

@Goujer
Copy link

Goujer commented Oct 2, 2019

I was making a theme with this and I did a bit of a dicey edit and I tried to test it.
This caused the screen to flash black with the mouse appearing every now and then.
I figure there is a setting somewhere that gets rerouted when the tester is enabled.
Do you know what I do to reset the msstyle back to default?
I have tried deleting the msstyle in the public folder but that has done nothing.
This has essentially bricked my computer, please help.
Thank you.

@nptr
Copy link
Owner

nptr commented Oct 2, 2019

Hello, sorry to hear.

Before suggesting anything it would be good to have more info. It might help me to understand
in what state the system is.

  • Which msstyleEditor version are you using?
  • Which Windows version are you using?
  • Did this happen on the first test attempt, or were previous ones successful?
  • What did you roughly change?
  • Did you forcefully exit msstyleEditor (taskman, power cord, .. ) ?
  • Is it similar to issue "Apply Theme" breaks the desktop environment - 1.3.0.0-beta #9 ?
  • Can open or see any programs, or is the UI completely gone?

Background info:
When testing a style, a temporary copy of the style is saved to \Users\Public\Documents\ under a random name of format "tmpXXXXX.msstyle". Then, the OS is instructed to apply this style. It validates the style or throws an error (in which case I show the "Failed to apply the theme as the OS rejected it!" dialog).

When the user stops testing, or cleanly exits the application (ie. not killing the process), I revert back to the previous theme and delete the temporary theme. Nothing else. The acual work is done by the OS.

@Goujer
Copy link
Author

Goujer commented Oct 2, 2019

  • msstyleEditor: 1.4.0.4
  • Windows 8.1
  • I had used the test feature numerous times, it worked every time except the last time.
  • I added an IMAGECOUNT of 2 to Rule 63 in DWMWindow on Windows 8.1's aero.msstyles with many other changes that worked before (margin changes, image swaps).
  • I did not forcefully exit.
  • It is very similar, but I was not forced to the lock screen, I was able to see the lockscreen after a hard restart, but it stopped appearing after a few additional attempts.
  • UI is completely gone, I should also note that my music player stopped playing as well.

I tried very similar steps to issue #9 on my own but I was also unable to fix it.
I had to restore my PC from a backup, but I did keep the tmpXXXXX.msstyle.
I also did not have a restore point which would have been smart...

@nptr
Copy link
Owner

nptr commented Oct 2, 2019

Would you share the visual style with me that broke your windows? Maybe it behaves the same on my Win8.1 installation and I'll be able to draw some conclusions. But don't count on it :S

For future improvement a few questions:

  • Were you aware that using the tool and modding msstyles could break things?
  • Would you suggest that I show more prominent warnings? If yes, any ideas in mind?
  • Would you suggest that I ask the user to create a system restore point?

@Goujer
Copy link
Author

Goujer commented Oct 4, 2019

I think deep down I was aware, but I repressed that feeling in the fun of working on styles.
I would have it somewhere that making a Restore Point would be a good idea.
A on startup warning that this could break stuff and a Restore Point is recommended would be sufficient I think.

Here is a link to the style: https://www.dropbox.com/s/ng2la1im06eiu1t/tmp08449.msstyles?dl=0

@nptr
Copy link
Owner

nptr commented Oct 4, 2019

I tried applying your theme on my Win8.1 system, but it rejects it and all other themes. I remember its because I'm on a recent patch level and affected by issue #29 (Test feature not working altogether), so I can't test it currently :(

I'll consider adding the system restore point warning in the next version - thanks for your input on this one! And if you ever discover the purpose of some of the unnnamed parts, DWMWindow Part 63 for example, let me know!

@Goujer
Copy link
Author

Goujer commented Oct 8, 2019

I pulled this from the aeroglass atlas layout file and it seems to apply to msstyles

Part51 Frames.AeroPeek.Left
Part52 Frames.AeroPeek.Right
Part53 Frames.AeroPeek.Top
Part54 Frames.AeroPeek.Bottom
Part55 Frames.ToolWindow.AeroPeek.Left
Part56 Frames.ToolWindow.AeroPeek.Right
part57 Frames.ToolWindow.AeroPeek.Top
part58 Frames.ToolWindow.AeroPeek.Bottom
part59 Animations.LoadingSpinner
part60 Frames.AeroPeek.Shadowless.Top
part62 Frames.AeroPeek.Shadowless.Bottom
part63 Frames.AeroPeek.Background

@Goujer
Copy link
Author

Goujer commented Jun 18, 2020

I did actually find out that you can fix this by opening the OS's registry hives in another Windows' regedit and searching for references to the corrupted style and changing them to the default style.
You then need to boot into the Windows you just fixed (which will still appear broken) then leave and go back to the helper Windows, edit the registry again and then it should work.
There is some weird caching thing I think.

@nptr
Copy link
Owner

nptr commented Jun 21, 2020

Thanks for your research!
Maybe I can make the "test" feature safer by ensuring the registry keys are consistent
after ending a test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants