Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Cannot cast GetGameMode() to child game mode blueprint

I have attached a project. It won't load past 72%.

Steps to reproduce (copy this into your ticket, I already tested it from a FP template.)

  1. Create FP C++ template

  2. Create BP child of your CPP GameMode

  3. Change Project to use BP Game mode

  4. In BeginPlay() of Character BP call GetGameMode pure function and cast it to your Blueprint game mode (child of C++ gamemode)

  5. Reboot editor

  6. It won't load past 72%

Project sample: https://drive.google.com/file/d/0B8XZp93HI41kMC1MNFpJLU1XMlk/view?usp=sharing

Product Version: UE 4.15
more ▼

asked Apr 15 '17 at 06:18 PM in Bug Reports

avatar image

20 1 6 17

avatar image muchcharles Apr 15 '17 at 06:22 PM

Something similar was mentioned here: https://issues.unrealengine.com/issue/UE-37922

Why was it closed with "Won't Fix"?

(edit: answer hub submission link: https://answers.unrealengine.com/questions/515179/infinite-loopeditorcritical-workaround-for-stuck-a.html )

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first


Thank you for posting the link to that issue muchcharles, I do agree that that is likely the same issue. I've updated the ticket with the reasoning for it being closed as Won't Fix, so if you take another look at the public issues link you should be able to see that now.

Just to post the reasoning here for convenience: "There's no way around it in UE4. The native AMyGameMode class load the character blueprint which has the same native AMyGameMode class as its export so AMyGameMode's CDO needs to be constructed on load which leads to a dead-lock caused by internal C++ guard on static local variables."

Have a great day

more ▼

answered Apr 17 '17 at 01:37 PM

avatar image

Sean L ♦♦ STAFF
43.6k 485 152 442

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question