godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.71k stars 21.12k forks source link

Godot crashes if no sound is available on Windows/RtAudio #1684

Closed OlexiyKravchuk closed 7 years ago

OlexiyKravchuk commented 9 years ago

On my computer it happened in all versions I use return, and the old and in the new version, I had thought that this problem only on my computer, but it appeared to others as well. Collapse occurs at the moment when there is a start-up scene from the editor, also the collapse happens when I run the project from the project manager, or start a game from the project manager immediately, and also the project manager sometimes collapse too. But of course, most often fall when trying to run the scene play, because this action, I often repeat when working on the script, it takes place as follows ... 1) I am submitting an amendment to the script or scene, and I press the button "play the current scene" to see how it works ... 2) The process starts to boot and there is a blank window which should start the game further with probability 60% -70%, there is a crash, and my Windows tells me that the program has ceased its operation for unknown reasons, and proposes close window the scene, but that editor itself is working on. 3) I try to start the scene again, try again, and again it failed, so there may be several times in a row. 4) between the start attempts, I have not changed anything anywhere, I just press on the "start this scene" again, and finally the scene starts, (but when I finally manage to start the the scene, I can not even remember what I wanted there find out ...). This situation is very, very frustrating, it reduces the efficiency very much and makes work in hell ...

OlexiyKravchuk commented 9 years ago

I also noticed that if I edited the script and left text caret somewhere in the middle of the line and ran the scene, the probability that it will crash rises to nearly 95%, but if I'm constantly on the move in the end of the line and do not forget to do so regularly, then the collapse occurs much less often about 15-20% ...

TheoXD commented 9 years ago

Statistics will not help in order to fix the crash, please provide a test project

reduz commented 9 years ago

An engine crash isn't that common.. Can you build the engine yourself and run it under windbg or gdb and paste a backtrace? Also is there any output in the console that may indicate an error? On Apr 13, 2015 3:07 PM, "TheoXD" notifications@github.com wrote:

Statistics will not help in order to fix the crash, please provide a test project

— Reply to this email directly or view it on GitHub https://github.com/okamstudio/godot/issues/1684#issuecomment-92447925.

OlexiyKravchuk commented 9 years ago

I am afraid that the problem is global. And is independent of the project, any project that I run, and edit anything, have the same falls and even the Godot editor and project manager, without the project, does the same thing ... I think it is a problem of compatibility and full of inward disonans in the Godot in the moment and not with regard to the specific project.

SuperUserNameMan commented 9 years ago

@OlexiyKravchuk : I think you told it somewhere, but i don't remember. Are you still under Windows XP ?

mohaalak commented 9 years ago

I had this problem after I custom built godot , when I tried to load a project it was collapse , if I run it as admin , everything works fine , maybe that's your problem too. can't read roaming appdata something like that.

mohaalak commented 9 years ago

and try runnig godot from command prompt to look what is the problem and copy paste it here.

OlexiyKravchuk commented 9 years ago

Unfortunately I cant build an engine, but I can give a photo when the console is happening fall. But I do not know how to copy all the text from the console it is not highlighted by the cursor. I tried to watch it, but it seems it does not stay in the console in sufficient volume :( but I will try to create one now ... I need a little time to make that report ...

@UsernamesAReservedVord No, Windows VISTA x 32

reduz commented 9 years ago

Is it maybe gpu hardware or os version related? I haven't heard of this behavior before.. But I admit never tried Godot on Vista... On Apr 13, 2015 3:37 PM, "OlexiyKravchuk" notifications@github.com wrote:

Unfortunately I cant build an engine, but I can give a photo when the console is happening fall. But I do not know how to copy all the text from the console it is not highlighted by the cursor. I tried to watch it, but it seems it does not stay in the console in sufficient volume :( but I will try to create one now ... I need a little time to make that report ...

@UsernamesAReservedVord No, Windows VISTA x 32

— Reply to this email directly or view it on GitHub https://github.com/okamstudio/godot/issues/1684#issuecomment-92455256.

OlexiyKravchuk commented 9 years ago

http://snag.gy/4Tubi.jpg that's what I was able to catch the camera, the last frame of perhaps a little more information, but I think the same thing everywhere, the first two I create one of (window_management), the last one (polygon_path_finder_demo)

SuperUserNameMan commented 9 years ago

@OlexiyKravchuk : well, according to your screen-capture, there is a problem with DirectSound. Are your audio-drivers updated ? is DirectX updated ? do you encounter audio problems with other application or video-game that use DirectSound ?

reduz commented 9 years ago

that's interesting... I didn't know RtAudio would suicide if there is a problem initializing sound.. maybe vista has some issues with directsound or opening the device more than once is not supported?

On Tue, Apr 14, 2015 at 8:04 AM, UsernameIsAReservedWord < notifications@github.com> wrote:

@OlexiyKravchuk https://github.com/OlexiyKravchuk : well, according to your screen-capture, there is a problem with DirectSound. Are your audio-drivers updated ? is DirectX updated ? do you encounter audio problems with other application or video-game that use DirectSound ?

— Reply to this email directly or view it on GitHub https://github.com/okamstudio/godot/issues/1684#issuecomment-92770260.

SuperUserNameMan commented 9 years ago

They seems to have done some update related to DirectSound (and ALSA) at https://github.com/thestk/rtaudio Maybe it would worth a try to compile Godot with those updated RtAudio files and see if it solve this issue ?

OlexiyKravchuk commented 9 years ago

In fact, I do not know what games they are used, but the problems were with the sound quite often, especially manifested in Skype when I had (but I do not use it for a long time), as well as several programs at the same time play a sound, it is also had a braking system and distortion sounds, but I can not understand how does the sound to the problem, because in these projects is nowhere sounds at all. In addition I have a question, do Godot uses DirectX? And besides DirectX Version: 9.29.1974, no longer have a change after the date: 18.04.2011 http://www.microsoft.com/en-US/download/details.aspx?id=35 My video card is quite a lot of years is a laptop with an ATI Radion mobile, HD 3650 with 1791 MB of video memory, some of which operating. And with regard to the sound I have built-5.1 channel sound, but in reality, there are only two physical dinaiki presence, and one sabufer, the other channels is only an illusion ...

OlexiyKravchuk commented 9 years ago

and today I conduct a small test it on another computer windows 7 x 64 where I could not get it to fall even be somehow, even when the audio and video player with online broadcasting of news, everything worked well ...

SuperUserNameMan commented 9 years ago

So it would mean that this problem is not caused by Godot.

Regarding your sound-card, maybe the current drivers are the wrong version, or an outdated version ?

And to reply to your question, Godot uses RtAudio. And RtAudio uses DirectSound which is part of DirectX.

OlexiyKravchuk commented 9 years ago

Hmm .. If it is not in Godot problem, why it only happens when I work in Godot, The rest of the program was never fall, not to mention the fact that it is so often the case with just Godot, and again the question remains why it is not stable occurs randomly and? Also question why the sound problem, when in fact, there is no any sound? In addition, if Godot uses sound of DirectX then how does this happen on other platforms where it is not present?

reduz commented 9 years ago

well, i think it should at least not crash.. i've long since wanted to use something different to RtAudio for Windows, so i can disable exceptions and make a smaller binary..

On Tue, Apr 14, 2015 at 1:58 PM, UsernameIsAReservedWord < notifications@github.com> wrote:

So it would mean that this problem is not caused by Godot.

Regarding your sound-card, maybe the current drivers are the wrong version, or an outdated version ?

And to reply to your question, Godot uses RtAudio. And RtAudio uses DirectSound which is part of DirectX.

— Reply to this email directly or view it on GitHub https://github.com/okamstudio/godot/issues/1684#issuecomment-92979470.

OlexiyKravchuk commented 9 years ago

By the way, conducting tests, I noticed a very stable relationship, from the fact that the fall is almost mandatory to occur when the script editor is present autocomplete drop-down menu, with options, I tried to repeat it on other computers (Windows 7 x64) but it never fell, but when I do so on my, it's 100%, robbery, I checked and stable 1.0 and 1.1 beta, the results are identical.

reduz commented 9 years ago

it is a bug in Godot I think, it should not crash if no sound is available..

On Tue, Apr 14, 2015 at 3:46 PM, OlexiyKravchuk notifications@github.com wrote:

By the way, conducting tests, I noticed a very stable relationship, from the fact that the fall is almost mandatory to occur when the script editor is present autocomplete drop-down menu, with options, I tried to repeat it on other computers (Windows 7 x64) but it never fell, but when I do so on my, it's 100%, robbery, I checked and stable 1.0 and 1.1 beta, the results are identical.

— Reply to this email directly or view it on GitHub https://github.com/okamstudio/godot/issues/1684#issuecomment-93016168.

OlexiyKravchuk commented 9 years ago

Thanks for the replies everyone, I will follow up on this topic, if you want any more information is I will try to give as much as possible that to me available, if only I knew where, I'm sorry that I can not hold a compilation now to be on the cutting edge, I need time to get there and be there.

SuperUserNameMan commented 9 years ago

@OlexiyKravchuk : instead of taking photo of the command prompt, here is a method to automatically save everything into a text file :

It should open your project into the editor. All errors and messages will be automatically logged into the logout.txt file.

Also, if you move Godot into the C:/ drive and create your projects and assets into the C:/ drive, does it change something ?

SuperUserNameMan commented 9 years ago

Also, I have just noticed this error into the screen-capture you provided :

ERROR: Error attempting to create data dir : C:/Users//AppData/Roaming/Godot/app_userdata/polygon_path_finder_demo

I think there should be your user-name between C:/Users/ and /AppData/Roaming....

In what alphabet is written your Windows user-name ?

mohaalak commented 9 years ago

did you run godot as administrator ? if you run it as administrator it will solve this problem

ERROR: Error attempting to create data dir : C:/Users//AppData/Roaming/Godot/app_userdata/polygon_path_finder_demo

SuperUserNameMan commented 9 years ago

@mohaalak : I'm not sure Godot should be run as administrator. I think it's a bug. Running it as admin is just a work-around.

I've just made a test myself by creating a fake Windows user account on my computer with a user-name written in non-latin alphabet, and Godot could not even create or open a new project.

I think that @OlexiyKravchuk 's issue contains several issues in fact .... It's a "All in one issue".

OlexiyKravchuk commented 9 years ago

yes it is good that you noticed and reminded me, my name is written there in their native language, this Ukrainian keyboard layout, and this folder there have been problems in the past, I was never able to establish export templates in any way, either automatically or even when I unpack them manually then Godot still have not seen them, and I do not know how to fix it, Godot does not extract them from the archive to which I point out to him, in his catalog, in my user directory (I also ate rename the file in the ZIP, listening to advice from the forum but it did not help me) when I point them out to him as if he were trying to appear and load indicator, which quickly digs, and then nothing changes, Godot still can not export project. I have not yet tested this possibility with beta vesiey 1.1.

OlexiyKravchuk commented 9 years ago

@mohaalak I tried to run as administrator but was refused.

SuperUserNameMan commented 9 years ago

@OlexiyKravchuk, @mohaalak : could you please download and test godot 1.1rc2 and see if the problems mentioned here are solved ? It should not be required to run godot as administrator now.

godotengine commented 9 years ago

damn it i forgot to tag this issue as windows, so when i was on windows i didn't give it a check

On Tue, May 5, 2015 at 9:59 AM, SuperUserNameMan notifications@github.com wrote:

@OlexiyKravchuk https://github.com/OlexiyKravchuk, @mohaalak https://github.com/mohaalak : could you please download and test godot 1.1rc2 and see if the problems mentioned here are solved ? It should not be required to run godot as administrator now.

— Reply to this email directly or view it on GitHub https://github.com/okamstudio/godot/issues/1684#issuecomment-99072109.

OkamStudio

OlexiyKravchuk commented 9 years ago

@SuperUserNameMan Yes, I'll do that right now, very glad to hear that there is a new patch.

OlexiyKravchuk commented 9 years ago

It took a long time to all the tests, the problem has not disappeared Godot cuts as before. That's what I see in the console ... http://snag.gy/uwqwe.jpg But now the project manager, do not forget to store all found projects from the last session, and I was able to install the export templates, and Godot was able to identify them, and I could even make the attempt to export projects, I tried to export (2D platformer). and isometric demo (with Troll), I tried to windows and HTLM and Godot create executable files, but they break when you try to run, and HTLM, completely refused to do the file, saying that there is no template, but the template is there but Godot simply did not recognize that, for reasons unknown to me :( The rest of the OS is not available to me.

SuperUserNameMan commented 9 years ago

As @reduz mentioned into #1693, godot crash on your computer because of an error with directsound.

I have compiled a version with an updated audio driver source code. You can download it here if you want : http://demo.ovh.eu/download/27f513e8714994ee278160b661398a45/godot.windows.tools.32bits.updated_rtaudio.7z

If you want to try it, you will need 7zip to decompress the archive.

OlexiyKravchuk commented 9 years ago

I was hoping that today it will be fixed with a new RTAudio but it still breaks up with this error. Are there any alternatives that would prevent falls ?.

OlexiyKravchuk commented 9 years ago

Offline I found this ... http://www.godotengine.org/forum/viewtopic.php?f=11&t=2136 but I'm not sure that I understood what is happening, any ideas ...

leonkrause commented 8 years ago

I think I had a similar issue when working on getting Godot on FreeBSD working again, ALSA was disabled for non-linux, PulseAudio not installed (or manually disabled), got a segfault at startup. ALSA is enabled again now, but compiling without audio driver shouldn't just crash

akien-mga commented 8 years ago

Not critical for the upcoming 2.1, so moving to the next milestone.

Zephilinox commented 7 years ago

I can confirm this is still an issue, godot will crash either at startup or during use if you have no playback devices on windows enabled.

image

akien-mga commented 7 years ago

CC @marcelofg55

marcelofg55 commented 7 years ago

Just checked it and found the problem, will submit a PR soon.