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

Crash in Reaper on Win11 #7187

Closed
Andreya-Autumn opened this issue Aug 17, 2023 · 33 comments
Closed

Crash in Reaper on Win11 #7187

Andreya-Autumn opened this issue Aug 17, 2023 · 33 comments
Labels
Bug Report Item submitted using the Bug Report template Windows Windows related issues
Milestone

Comments

@Andreya-Autumn
Copy link
Collaborator

Discord user Coralina reports (on another server not ours) that 1.2.3 crashes for her, in reaper on Windows 11, and provides the following screenshots:

Crash2
Crash1

@Andreya-Autumn Andreya-Autumn added the Bug Report Item submitted using the Bug Report template label Aug 17, 2023
@Andreya-Autumn Andreya-Autumn added this to the Surge XT 1.3 milestone Aug 17, 2023
@Andreya-Autumn Andreya-Autumn added the Windows Windows related issues label Aug 17, 2023
@baconpaul
Copy link
Collaborator

Does the standalone work for the user?
Does the user have a non utf8 username?

@coralkitty2
Copy link

The standalone doesn't launch.
My username is and has always been utf8, but I did at one point change it from one name to another, if that's relevant.

@Andreya-Autumn
Copy link
Collaborator Author

Hello again! I doubt the username change is relevant.

This one is mysterious though. We have lots and lots of Windows users, presumably many of whom are on Win11 and use Reaper.

Hmm... Is there anything else unusual about your system? What computer is it? What is your Audio interface? Audio drivers?

@coralkitty2
Copy link

The computer is a Lenovo Yoga 7.
Audio should be one of the things listed in the attached image, I hope.
image

@Andreya-Autumn
Copy link
Collaborator Author

Oh, are those bluetooth headphones? Could maybe be the issue, we've had such a problem in the past which was fixed, but maybe something lingers. Can you try switching to some non-bluetooth sound option and see if that helps?

@coralkitty2
Copy link

Using the computer's built-in speakers, the issue still occurs, both with the VST and with the standalone.

@Andreya-Autumn
Copy link
Collaborator Author

Right, not that then. Thanks.

@mkruselj Are you seeing this one?

@mkruselj
Copy link
Collaborator

mkruselj commented Aug 18, 2023

I'm on W10.

@coralkitty2 Can you show sound device properties (from Control Panel) of your default sound playback device? Like this one here:

image

@coralkitty2
Copy link

Shown for my speakers, and for my headphones.
image
image

@mkruselj
Copy link
Collaborator

Right, that does seem fine tbh...

@Andreya-Autumn
Copy link
Collaborator Author

Yeah this is mysterious. Lemme ask around in our Discord server for other Win11 users and see what comes up.

@mthierman
Copy link
Contributor

Does the standalone show a more specific error message?

I would try to re-install the latest Visual C++ Redistributable

@ultrasound1372
Copy link

Audio issues might be the reason for the standalone but wouldn't mess with the VST, as the host is supposed to handle that. And reaper has error handling on that, it'll pop up angry modals if something doesn't work.

@baconpaul
Copy link
Collaborator

Does the standalone show a more specific error message?

I would try to re-install the latest Visual C++ Redistributable

that's solid advice but we should statically link the CRT with surge. At least I hope we do! if we don't we can fix that in cmake.

@mthierman
Copy link
Contributor

mthierman commented Aug 21, 2023

but I did at one point change it from one name to another

Does your username exactly match the folder name in Users/ after the change?

baconpaul added a commit to baconpaul/surge that referenced this issue Aug 22, 2023
If the creation of the surge instance throws an exception,
we catch it and replace the surge internals with a fatal
error screen. This may help us debug surge-synthesizer#7187. Or may not.
@baconpaul
Copy link
Collaborator

Sorry to be absent from the convo

so I think the most likely form of uncaught exception is a file system exception coming from the surge synth creation. I'm not sure but thin possibly. So I just made a modification to the code to catch any exception thrown by surge and then replace the
surge editor with basically a big red error message showing what went wrong. This, of course, won't be a usable surge, but will (1) not crash your DAW and (2) be clearer

If the problem is instead some linkage nuttiness with windows 11 its harder to fix

but my change is in CI now. I tested it by making SurgeStorage startup path throw a files system exception and instead of an uncaught crash I now get a screen with the error message. Very minimal screen of course. This is a last chance kinda thing

So when I merge and the next nightly is out, would very much appreciate testing it on system in question to see if we get a screen. If we dont I can also move the bounds of the crash test further

if it is something else, this won't help at all, and we will get a crash still. That's information rich.

baconpaul added a commit that referenced this issue Aug 22, 2023
If the creation of the surge instance throws an exception,
we catch it and replace the surge internals with a fatal
error screen. This may help us debug #7187. Or may not.
@baconpaul
Copy link
Collaborator

That new nightly is up

@coralkitty2
Copy link

I have downloaded the newest nightly. I now get a new error either when launching the standalone or trying to load the VST3i in REAPER.
image
Note: The error still occurs exactly as originally reported for Surge XT Effects, presumably because that's a separate executable.

@baconpaul
Copy link
Collaborator

Excellent. Now we have a path to debug this.

that error means that surge can’t resolve your documents directory using windows apis. Tomorrow I can figure out what you need to do.

and yeah fx will still just self destruct on that error

@baconpaul
Copy link
Collaborator

baconpaul commented Aug 24, 2023

https://github.com/surge-synthesizer/sst-plugininfra/blob/c5dd6e0d231b7faccd14b88aea75ef153b68eba0/src/paths_windows.cpp#L29

Here’s the exact error location. It means surge can either not find documents program files or local app data on your machine.

do you have all of those or have you modified your system to remove them or delete the registry entries for them?

@baconpaul
Copy link
Collaborator

Oh and if thst question is one which is mysterious I can make a version with more fulsome error reporting this weekend now we know the core problem.

@baconpaul
Copy link
Collaborator

So @coralkitty2 I think the problem is most likely when you changed your user id you didn't correctly change the registry entry for your my documents folder

https://support.microsoft.com/en-us/topic/configuration-of-the-my-documents-folder-dfd9a90d-8f80-18d6-e7cc-f1566fc3b10b

can you see if you have a "My Documents" folder that matches those locations?

I'm going to update the error message a bit, but that error message isn't one we can recover from, it's just one we can show you, when your windows shell locations are not configured.

@baconpaul
Copy link
Collaborator

Specifically I bet

Restoring the Default My Documents Path

If the current My Documents path is incorrect or is no longer available, you can use the Restore Default option to restore the default path:

NOTE: This option is not displayed when group policy folder redirection is in effect for this folder.

Right-click My Documents (on the desktop), and then click Properties.

Click Restore Default. 

The following registry value is used to determine the default location based on the user's profile and appends "\My Documents" to form a complete path:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\ProfileList\user ID

Value Name: ProfileImagePath
Value Type: REG_EXPAND_SZ
where user ID is the appropriate user ID.

is what you need to do

baconpaul added a commit to baconpaul/surge that referenced this issue Aug 24, 2023
@baconpaul
Copy link
Collaborator

OK final comment here. The next nightly in about an hour will show the same error but it will show you exactly which directory is not configured on your machine. Fix that directory and then Surge will work.

The clear message as opposed to crash is a clear improvement too. Thanks for flagging this!

@baconpaul
Copy link
Collaborator

And the new nightky is now available. It will show you clearly which directories are mis configured on your machine leading to this error. Please let us know!

@coralkitty2
Copy link

Here's the error. I'll see if I can fix this.
image

@baconpaul
Copy link
Collaborator

Yeah that means the my documents folder is not set up correctly. The instructions above should fix it but we need that to be set up to spec to run.

im really glad we don’t just crash any more. Worthwhile change. Thanks for raising the issue.

@coralkitty2
Copy link

I don't think my computer has ever had a 'My Documents' folder, only a 'Documents' folder.

@baconpaul
Copy link
Collaborator

So I don’t really use windows I use macOS, but every other surge user can resolve the documents folder using the windows api. The error you see is your computer is configured so it can’t. That’s what you need to fix basically. I think the documents I linked above tell you how.

@mkruselj
Copy link
Collaborator

but I did at one point change it from one name to another

Does your username exactly match the folder name in Users/ after the change?

It's really important to confirm this, @coralkitty2.

@baconpaul
Copy link
Collaborator

I think the registry didn’t survive that and corallitty just needs to do the fix linked above for the documents folder.

———-

If the current My Documents path is incorrect or is no longer available, you can use the Restore Default option to restore the default path:

NOTE: This option is not displayed when group policy folder redirection is in effect for this folder.

Right-click My Documents (on the desktop), and then click Properties.

@coralkitty2
Copy link

Update: The error is no longer thrown, and the standalone launches without issue.
What I did: Went to both Shell Folders and User Shell Folders, and replaced the value of the Personal key with C:\Users\coral\Documents. Before the change the value of the key was a OneDrive documents location that no longer existed. Thank you all for your help and patience.

@mkruselj
Copy link
Collaborator

Glad you have it resolved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report Item submitted using the Bug Report template Windows Windows related issues
Projects
None yet
Development

No branches or pull requests

6 participants