Compile button disappears

I pressed “compile” then I pressed “cancel”. But I pressed “cancel” at the EXACT same time as when the compile completed. So I got both the -cancel-message and the success-message at the same time. Then the compile-button in the editor disappeared and I had to restart the editor to get it back again.

Hello Napoleon,

I was able to reproduce this in 4.11 but couldn’t get the issue to occur in 4.12. Could you give it a try there to see if the issue is fixed on your end as well? It’s can require some exact timing so maybe I was just messing it up the second time around.

Hello,

It is a rare bug that is hard to reproduce. Every time you have to make a change in VS and hit compile in the editor and then you have to time it EXACTLY right for it to bug.

I tried it a couple of times but I can’t even manage to time it. Compile times vary between 17 and 20 seconds for me for the same change. Hard to reproduce. It may still be present in 4.12, it may not. Since there is an easy workaround I’m not gonna spend 30 minutes trying to reproduce it. Hope you don’t mind.

The reason I’m asking you to try to reproduce the issue in 4.12 is because, if it doesn’t occur, I won’t be bugging it as it’s not occurring in the latest version. Until we have an occurrence in 4.12, I’ll be marking this as fixed

Hi.

I have a similar problem in UE 4.12. The Compile button also disappears, not when I cancel the compilation, but after the compile is successfull. Here is my case…

I’m trying to use MS Kinect gesture recognition functions in Unreal. I have added all the needed PrivateIncludePaths and PublicAdditionalLibraries in Build.cs file of the unreal project. The compilation works ok.
The problem occurs when I try to use the function CreateVisualGestureBuilderFrameSource from the Kinect SDK. The compilation in Unreal Editor completes succesfully, but the Compile button dissapears.

I can run the game from the editor after that, but if I restart Unreal Editor, I get the following error when I open the same project again:

The game module 'SAFTDemosi' could not be loaded. There may be an operating system error or the module may not be properly set up.

I have managed to circumwent this by deleting the Binaries folder and commenting out the source code line that invokes CreateVisualGestureBuilderFrameSource. The editor then asks me to recompile when it opens the project, and that works, the project is opened normally.

Some additional info:

  • I’m not sure if it matters, but I found out that this problem (disappearance of the compile button) happens regardless of whether if I invoke the function from which I call CreateVisualGestureBuilderFrameSource or not
  • I have also tried to compile the project from Visual Studio, and the compilation is succesfull, but the project fails to open, with the same error message (The game module ‘SAFTDemosi’ could not be loaded…)
  • I have tried to run another C++ project that uses CreateVisualGestureBuilderFrameSource and that program comiples and runs without problem (with the same include paths and additional libraries for Kinect)

If you need any more further info about this problem, I would be glad to help.

To explain a bit; Whenever the Compile button disappears, this means that something in the compilation caused the editor to become unlinked from the code. This means that the attempt that broke this link and any subsequent attempts while the editor is open, will not update the editor as the editor is working off the last working .dll. That’s why this usually happens with failed builds rather than successful ones.

Could you provide your edited .build.cs file(s) to see if I can get the same behavior? It does seem like it would be correct in this case about the module not being properly set up but I can’t tell without seeing it.

Hi, I’m really new to UE4, but I am having a similar problem with the compile button disappearing. I’m using a build of 4.12 with FleX integration. The compile button disappears after the compilation is “completed” (it is not actually successful, as it will still use old code evidenced by onscreen debug messages remaining the same). There is no indication that there is anything wrong other than the compile button disappearing.

I am trying to link a 5DT data glove using the .dll and .lib files, and followed the tutorial for linking static libraries (A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums). However, if I include a function call to one of the functions in the library, building in Visual Studio or pressing the Compile button in UE4 results in the compile button disappearing and the previous code is used when I press play. Closing the editor and trying to open this project from a build fails. I can only reopen the project if I comment out the function calls and rebuild from that.

The associated 5DT .dll and .lib files do work when I created my own application. Also, the UE4 project itself will run correctly as long as I do not make any calls to the library (and I’m not doing anything yet with the FleX part).

Attached is the Build.cs file I modified as well as the .cpp and .h I’m trying to call the function in (as text files, as the uploader won’t let me do the proper files). I’m pretty sure I followed the steps correctly for linking, but I’m still new at using UE4, so I might have missed something. Thank you for your help!

Build.cs GlovePawn.cpp GlovePawn.h

Hi.

I solved my problem by copying the dll files I’m using to the Binaries/Win64 subfolder of my project.

Try this and let us know if it helped.

As I mentioned in comment to kdube, I solved my problem by copying .dll files to my project’s Binaries/Win64 subfolder. It seems that the DLLs I was using were ment for redistribution.

I understand that there is some logic in hiding the compile button when such situation occurs, but it’s not very user friendly. I got stuck with this problem for two days (googling and trial&error attempts) with no useful info from Unreal Editor that would help me solve the problem.

It would be useful to implement some kind of handling of such situations, that would point the user to the source of the problem and help him resolve it. Maybe display a message that compile failed and write some additional info in UE log.

When you go to compile while the editor is open, it first compiles the code and then attempts a hot reload if the editor is open. If the compile succeeds, due to other factors, the hot reload can still fail. Once the hot reload fails once, currently at least, it fails to keep the link between the compiler and the editor. This results in the compile button disappearing and the .dll no longer being updated.

The fact that your code changes aren’t being reflected in the editor doesn’t necessarily mean that the compile itself failed. Even if it succeeds, if the code isn’t linked with the editor and doesn’t update the .dll, you’ll never see your changes. I would suggest trying to close the editor, delete you Binaries and Intermediates folder, generate project files again by right-clicking the .uproject file, and then compiling from inside of Visual Studio. If the compile succeeds, you should be able to see your changes when you go to open the project.

As far as having trouble importing this static library, I would suggest posting on the C++ section of our forums as this topic is not related to that subject and you are likely to get more detailed help for that subject there.

Edit: I forgot to add here, but through the help of another user, I was able to reproduce this issue before and have entered a bug for the problem. You can find the information here: UE-31575

Easy as that. Worked like a charm! Thank you!

I found the bug source:

@ UnrealEngine\Engine\Source\Runtime\Core\Private\Modules\ModuleManager.cpp
@ FModuleManager::MakeUniqueModuleFilename

Replace
*Module->OriginalFilename.Right( Module->OriginalFilename.Len() - SuffixPos ) );
to
TEXT( “.dll” ) );

This code will definitely work for PC, I am not sure if hot reload supported for other platforms.
The reason of issue is that this code will generate name of module as …/…/MyGameName_1234_5678.dll
But to source compiler only MyGameName 1234 part will be provided and compiler will succesfully produce
…/…/MyGameName_1234.dll

PS: the problem will not on first UE startup after clean project rebuild, because your .dll will look like MyGameName.dll
So, wiping the project output folder (\Binaries\Win64) before starting Unreal does solve the problem.

Just to clarify. After deleting those folders you can close everything, then open Unreal Editor again and it will tell you that it will rebuild all the files missing. It generates the solution too. And the build button will be there again and the c++ classes you added and were not showing up in the list too.