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 any time a Message is added to Log with Collapse Mode on #8

Open
OdinVex opened this issue Apr 15, 2021 · 5 comments
Open

Crash any time a Message is added to Log with Collapse Mode on #8

OdinVex opened this issue Apr 15, 2021 · 5 comments

Comments

@OdinVex
Copy link
Contributor

OdinVex commented Apr 15, 2021

Background

I noticed there wasn't a Linux compile of UE4_MagicConsole but most plugins can compile without issue or much alteration if merely included in Engine/Plugins/Marketplace. Compile went well, aside from needing to fix an issue regarding regex byte-encoding and adding Linux to the whitelist so that Unreal Engine would compile it. (I created a #7 for those changes.)

Note: Unreal Engine 4.26.2.
Note: Linux x64

Behavior

Any time a message is added to the Enhanced Output Log (when it is open) it will crash if and only if Collapse Mode is on.

Expected Behavior

No crashes.

Steps to Reproduce

  1. Open a project.
  2. Open Enhanced Output Log.
  3. Do anything to add a message to the log with Collapse Mode on.

Failure Logs

`libUE4Editor-Slate.so!FTextBlockStyle::FTextBlockStyle(FTextBlockStyle const&) [/opt/UnrealEngine/Engine/Source/Runtime/SlateCore/Public/Styling/SlateTypes.h:226]

libUE4Editor-Slate.so!FSlateTextRun::FSlateTextRun(FRunInfo const&, TSharedRef<FString const, (ESPMode)0> const&, FTextBlockStyle const&, FTextRange const&) [/opt/UnrealEngine/Engine/Source/Runtime/Slate/Private/Framework/Text/SlateTextRun.cpp:268]

libUE4Editor-Slate.so!FSlateTextRun::Create(FRunInfo const&, TSharedRef<FString const, (ESPMode)0> const&, FTextBlockStyle const&, FTextRange const&) [/opt/UnrealEngine/Engine/Source/Runtime/Slate/Private/Framework/Text/SlateTextRun.cpp:19]

libUE4Editor-ConsoleEnhanced.so!FOutputLogTextLayoutMarshaller::AppendMessagesToTextLayout(TArray<TSharedPtr<FLogMessage, (ESPMode)0>, TSizedDefaultAllocator<32> > const&) [/opt/UnrealEngine/Engine/Plugins/Marketplace/ConsoleEnhanced/Source/ConsoleEnhanced/Private/SOutputLog.cpp:753]

libUE4Editor-ConsoleEnhanced.so!FOutputLogTextLayoutMarshaller::AppendMessage(char16_t const*, ELogVerbosity::Type, double, FName const&) [/opt/UnrealEngine/Engine/Plugins/Marketplace/ConsoleEnhanced/Source/ConsoleEnhanced/Private/SOutputLog.cpp:638]

libUE4Editor-ConsoleEnhanced.so!non-virtual thunk to SOutputLog::Serialize(char16_t const*, ELogVerbosity::Type, FName const&, double) [/opt/UnrealEngine/Engine/Plugins/Marketplace/ConsoleEnhanced/Source/ConsoleEnhanced/Private/SOutputLog.cpp:1301]`

@OdinVex OdinVex changed the title Crash any time a Message is added to Log Crash any time a Message is added to Log with Collapse Mode on Apr 15, 2021
@Cultrarius
Copy link
Owner

Sorry, I've tried a few times to repro it, but everything works fine for me. I don't have a Linux machine to test it, so that might be the source of the problem.

@OdinVex
Copy link
Contributor Author

OdinVex commented Dec 6, 2021

Should leave it open until another Linux user can test. I managed to work around it by disabling it in code.

@Cultrarius
Copy link
Owner

The issue was open since April, so I don't expect a lot to happen there. But I'll reopen it for you, if it makes you happy ;)

@Cultrarius Cultrarius reopened this Dec 6, 2021
@OdinVex
Copy link
Contributor Author

OdinVex commented Dec 6, 2021

The issue was open since April, so I don't expect a lot to happen there. But I'll reopen it for you, if it makes you happy ;)

It's merely about keeping Issues open for visibility. I doubt many people develop enough on Linux to warrant even the plugin, but I enjoyed it and felt I'd do my part.

@OdinVex
Copy link
Contributor Author

OdinVex commented Dec 5, 2022

Ported to 5.1.0 (see issue #11). Decided to try enabling Collapsed Mode again:

Assertion failed: IsInGameThread() || IsInSlateThread() || IsInAsyncLoadingThread() [File:Runtime/Slate/Public/Framework/Application/SlateApplication.h] [Line: 255]

libUnrealEditor-Slate.so!FTextLayout::FLineModel::FLineModel(TSharedRef<FString, (ESPMode)1> const&) [./UnrealEngine/Engine/Source/./Runtime/Slate/Private/Framework/Text/TextLayout.cpp:2674]
libUnrealEditor-Slate.so!FTextLayout::AddLines(TArray<FTextLayout::FNewLineData, TSizedDefaultAllocator<32> > const&) [./UnrealEngine/Engine/Source/./Runtime/Slate/Private/Framework/Text/TextLayout.cpp:2164]
libUnrealEditor-ConsoleEnhanced.so!FOutputLogTextLayoutMarshaller::AppendMessagesToTextLayout(TArray<TSharedPtr<FLogMessage, (ESPMode)1>, TSizedDefaultAllocator<32> > const&) [./UnrealEngine/Engine/Source/./../Plugins/Marketplace/ConsoleEnhanced/Source/ConsoleEnhanced/Private/SOutputLog.cpp:793]
libUnrealEditor-ConsoleEnhanced.so!FOutputLogTextLayoutMarshaller::AppendMessage(char16_t const*, ELogVerbosity::Type, double, FName const&) [./UnrealEngine/Engine/Source/./../Plugins/Marketplace/ConsoleEnhanced/Source/ConsoleEnhanced/Private/SOutputLog.cpp:637]
libUnrealEditor-ConsoleEnhanced.so!non-virtual thunk to SOutputLog::Serialize(char16_t const*, ELogVerbosity::Type, FName const&, double) [./UnrealEngine/Engine/Source/./../Plugins/Marketplace/ConsoleEnhanced/Source/ConsoleEnhanced/Private/SOutputLog.cpp:0]
libUnrealEditor-Core.so!void UE::TDepletableMpscQueue<UE::Private::FOutputDeviceLine, UE::Private::FOutputDeviceLinearAllocator>::Consume<UE::Private::FOutputDeviceRedirectorState::FlushBufferedLines()::$_7>(UE::TDepletableMpscQueue<UE::Private::FOutputDeviceLine, UE::Private::FOutputDeviceLinearAllocator>::FNode*, UE::TDepletableMpscQueue<UE::Private::FOutputDeviceLine, UE::Private::FOutputDeviceLinearAllocator>::FNode*, UE::Private::FOutputDeviceRedirectorState::FlushBufferedLines()::$_7 const&)::'lambda0'(UE::TDepletableMpscQueue<UE::Private::FOutputDeviceLine, UE::Private::FOutputDeviceLinearAllocator>::FNode*)::operator()(UE::TDepletableMpscQueue<UE::Private::FOutputDeviceLine, UE::Private::FOutputDeviceLinearAllocator>::FNode*) const [./UnrealEngine/Engine/Source/Runtime/Core/Public/Containers/DepletableMpscQueue.h:130]
libUnrealEditor-Core.so!UE::Private::FOutputDeviceRedirectorState::FlushBufferedLines() [./UnrealEngine/Engine/Source/./Runtime/Core/Private/Misc/OutputDeviceRedirector.cpp:453]
libUnrealEditor-Core.so!UE::Private::FOutputDeviceRedirectorState::ThreadLoop() [./UnrealEngine/Engine/Source/./Runtime/Core/Private/Misc/OutputDeviceRedirector.cpp:436]
libUnrealEditor-Core.so!FThreadImpl::Run() [./UnrealEngine/Engine/Source/./Runtime/Core/Private/HAL/Thread.cpp:67]
libUnrealEditor-Core.so!FRunnableThreadPThread::Run() [./UnrealEngine/Engine/Source/./Runtime/Core/Private/HAL/PThreadRunnableThread.cpp:25]
libUnrealEditor-Core.so!FRunnableThreadPThread::_ThreadProc(void*) [./UnrealEngine/Engine/Source/Runtime/Core/Private/HAL/PThreadRunnableThread.h:185]

Just spit-balling here, but I wonder if the bit of code relating to the old error FTextBlockStyle stuff with this new context might mean something regarding the AppendMessagesToTextLayout block in SOutputLog.cpp. Is something perhaps happening outside the thread and Linux is strict about that whereas Windows can behave wonky? This 'Run' business, maybe Collapsed Mode does something special during that, I mean.

Edit: Apparently happens whether Collapsed is on or off, was lucky it worked before. Possibly a memory access issue. AppendMessagesToTextLayout is always responsible, though. That much is definite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants