x

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"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

Possible crash between Weak Pointer IsValid check and calling Pin()

This is a very hard to reproduce bug, and the description that was given to us claimed: "had a blueprint stopped on a breakpoint. then pressed the stop button". (We are on 4.6, with some changes ported over from 4.7 and 4.8)

 Fatal error! 
 Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000000 
 UE4Editor-Engine.dll!FSceneViewport::OnMouseLeave() 
 UE4Editor-Slate.dll!SViewport::OnMouseLeave() 
 UE4Editor-Slate.dll!FSlateApplication::ProcessMouseMoveEvent() 
 UE4Editor-Slate.dll!FSlateApplication::OnMouseMove() 
 UE4Editor-Core.dll!FWindowsApplication::ProcessDeferredMessage() 
 UE4Editor-Core.dll!FWindowsApplication::DeferMessage() 
 UE4Editor-Core.dll!FWindowsApplication::ProcessMessage() 
 UE4Editor-Core.dll!FWindowsApplication::AppWndProc() 
 USER32.dll!UnknownFunction (0x00007ff96732250d) 
 USER32.dll!UnknownFunction (0x00007ff967322367) 
 UE4Editor-Core.dll!FWindowsPlatformMisc::PumpMessages() 
 UE4Editor-Core.dll!FGenericPlatformMisc::PeriodicallyPumpMessages() 
 UE4Editor-Engine.dll!UWPFAssetManager::GetData() 
 UE4Editor-Engine.dll!WPFAssetManagerInterface::GetData() 
 UE4Editor-WPFRenderer.dll!FileResourceLoader::Run() 
 UE4Editor-WPFRenderer.dll!LoadableObject::LoadData() 
 [...]
 

The code of the OnMouseLeave functions shows:

     if (ViewportInterface.IsValid())
     {
         ViewportInterface.Pin()->OnMouseLeave(MouseEvent);
     }

We believe that the ViewportInterface somehow got lost in between the IsValid and Pin call. This same structure happens through the whole file, except on one other location, where the Pin is called before doing the IsValid check (this occurs in the OnPaint function).

Are we correct to assume that all IsValid checks should only be called after the Pin function is called? In which case, the whole file could do with some rewriting...

Product Version: UE 4.6
Tags:
more ▼

asked Aug 18 '15 at 05:21 PM in Bug Reports

avatar image

artofcode
8 1 4

avatar image Tim C ♦♦ STAFF Aug 25 '15 at 09:38 PM

Hi artofcode,

Are you seeing this happen in just a single Blueprint with a breakpoint on a specific node, or does it happen in multiple Blueprints and with different nodes? I tried adding breakpoints to a few nodes in a new 4.6 project and did not have any problems with stopping PIE while execution is paused by a breakpoint.

Tim

avatar image artofcode Aug 26 '15 at 09:45 AM

One of our designers had it happen 'randomly' and we've been unable to reproduce it whatsoever. From what I can tell it only happened once.

Considering that the IsValid call and the Pin call are both very close to each other, I can imagine that if there is a chance to go wrong, the chance will be very small (but possible nonetheless).

We've updated the code in that file for each IsValid - Pin call to Pin first and IsValid afterwards.

OnMouse will look like this:

     TSharedPtr<ISlateViewport> PinnedInterface = ViewportInterface.Pin();
     if (PinnedInterface.IsValid())
     {
         PinnedInterface->OnMouseLeave(MouseEvent);
     }

All other functions have been updated accordingly, just to be on the safe side.

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Hi artofcode,

It appears that the suggested code that you provided may indeed be a safer alternative in this case. I have submitted a report about this issue to have the code in this file investigated to see what we can do to reduce the possibility of any further crashes (UE-20580).

Tim

more ▼

answered Aug 31 '15 at 11:00 PM

(comments are locked)
10|2000 characters needed characters left
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