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

SIGSEGV Crash on run #4

Open
domstoppable opened this issue May 25, 2020 · 2 comments
Open

SIGSEGV Crash on run #4

domstoppable opened this issue May 25, 2020 · 2 comments

Comments

@domstoppable
Copy link

  • OS: Debian (Bullseye) Linux
  • Unreal Version: 4.24.2 (clean source build)
  • KantanDocGenPlugin version: master/head

The plugin crashes (SIGSEGV) when generating documentation for my project on
NodeDocsGenerator.cpp:181. The next time I boot into Windows I will attempt to replicate there.

if(RTResource->ReadPixelsPtr(PixelData->Pixels.GetData(), ReadPixelFlags, Rect) == false)

Call stack:

___lldb_unnamed_symbol1220$$libc.so.6 (@___lldb_unnamed_symbol1220$$libc.so.6:115)
FGenericPlatformMemory::Memcpy(void*, void const*, unsigned long) (/home/dom/code/UnrealEngine/Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformMemory.h:470)
FMemory::Memcpy(void*, void const*, unsigned long) (/home/dom/code/UnrealEngine/Engine/Source/Runtime/Core/Public/HAL/UnrealMemory.h:124)
FRenderTarget::ReadPixelsPtr(FColor*, FReadSurfaceDataFlags, FIntRect) (/home/dom/code/UnrealEngine/Engine/Source/Runtime/Engine/Private/UnrealClient.cpp:101)
FNodeDocsGenerator::GenerateNodeImage(UEdGraphNode*, FNodeDocsGenerator::FNodeProcessingState&)::$_12::operator()() const (/home/dom/code/Psydekick/PKDev/Plugins/KantanDocGenPlugin/Source/KantanDocGen/Private/NodeDocsGenerator.cpp:181)
decltype(fp(fp0...)) DocGenThreads::RunOnGameThreadRetVal<FNodeDocsGenerator::GenerateNodeImage(UEdGraphNode*, FNodeDocsGenerator::FNodeProcessingState&)::$_12>(FNodeDocsGenerator::GenerateNodeImage(UEdGraphNode*, FNodeDocsGenerator::FNodeProcessingState&)::$_12)::'lambda'()::operator()() const (/home/dom/code/Psydekick/PKDev/Plugins/KantanDocGenPlugin/Source/KantanDocGen/Private/ThreadingHelpers.h:30)
decltype(Forward<FNodeDocsGenerator::GenerateNodeImage(UEdGraphNode*, FNodeDocsGenerator::FNodeProcessingState&)::$_12>(fp)()) Invoke<decltype(fp(fp0...)) DocGenThreads::RunOnGameThreadRetVal<FNodeDocsGenerator::GenerateNodeImage(UEdGraphNode*, FNodeDocsGenerator::FNodeProcessingState&)::$_12>(FNodeDocsGenerator::GenerateNodeImage(UEdGraphNode*, FNodeDocsGenerator::FNodeProcessingState&)::$_12)::'lambda'()&>(FNodeDocsGenerator::GenerateNodeImage(UEdGraphNode*, FNodeDocsGenerator::FNodeProcessingState&)::$_12&&) (/home/dom/code/UnrealEngine/Engine/Source/Runtime/Core/Public/Templates/Invoke.h:45)
UE4Function_Private::TFunctionRefCaller<decltype(fp(fp0...)) DocGenThreads::RunOnGameThreadRetVal<FNodeDocsGenerator::GenerateNodeImage(UEdGraphNode*, FNodeDocsGenerator::FNodeProcessingState&)::$_12>(FNodeDocsGenerator::GenerateNodeImage(UEdGraphNode*, FNodeDocsGenerator::FNodeProcessingState&)::$_12)::'lambda'(), void ()>::Call(void*) (/home/dom/code/UnrealEngine/Engine/Source/Runtime/Core/Public/Templates/Function.h:548)
UE4Function_Private::TFunctionRefBase<UE4Function_Private::TFunctionStorage<true>, void ()>::operator()() const (/home/dom/code/UnrealEngine/Engine/Source/Runtime/Core/Public/Templates/Function.h:676)
FFunctionGraphTask::DoTask(ENamedThreads::Type, TRefCountPtr<FGraphEvent> const&) (/home/dom/code/UnrealEngine/Engine/Source/Runtime/Core/Public/Async/TaskGraphInterfaces.h:1305)
TGraphTask<FFunctionGraphTask>::ExecuteTask(TArray<FBaseGraphTask*, TSizedDefaultAllocator<32> >&, ENamedThreads::Type) (/home/dom/code/UnrealEngine/Engine/Source/Runtime/Core/Public/Async/TaskGraphInterfaces.h:847)
FBaseGraphTask::Execute(TArray<FBaseGraphTask*, TSizedDefaultAllocator<32> >&, ENamedThreads::Type) (/home/dom/code/UnrealEngine/Engine/Source/Runtime/Core/Public/Async/TaskGraphInterfaces.h:514)
FNamedTaskThread::ProcessTasksNamedThread(int, bool) (/home/dom/code/UnrealEngine/Engine/Source/Runtime/Core/Private/Async/TaskGraph.cpp:686)
FNamedTaskThread::ProcessTasksUntilQuit(int) (/home/dom/code/UnrealEngine/Engine/Source/Runtime/Core/Private/Async/TaskGraph.cpp:582)
FTaskGraphImplementation::WaitUntilTasksComplete(TArray<TRefCountPtr<FGraphEvent>, TInlineAllocator<4u, TSizedDefaultAllocator<32> > > const&, ENamedThreads::Type) (/home/dom/code/UnrealEngine/Engine/Source/Runtime/Core/Private/Async/TaskGraph.cpp:1463)
FTickTaskSequencer::ReleaseTickGroup(ETickingGroup, bool) (/home/dom/code/UnrealEngine/Engine/Source/Runtime/Engine/Private/TickTaskManager.cpp:559)
FTickTaskManager::RunTickGroup(ETickingGroup, bool) (/home/dom/code/UnrealEngine/Engine/Source/Runtime/Engine/Private/TickTaskManager.cpp:1527)
UWorld::RunTickGroup(ETickingGroup, bool) (/home/dom/code/UnrealEngine/Engine/Source/Runtime/Engine/Private/LevelTick.cpp:781)
UWorld::Tick(ELevelTick, float) (/home/dom/code/UnrealEngine/Engine/Source/Runtime/Engine/Private/LevelTick.cpp:1552)
UEditorEngine::Tick(float, bool) (/home/dom/code/UnrealEngine/Engine/Source/Editor/UnrealEd/Private/EditorEngine.cpp:1504)

I'm excited to make use of this plugin for documenting my own open source plugin, so whatever I can do to help troubleshoot, please let me know :)

@domstoppable
Copy link
Author

Just realized you have a 4.24 branch, which runs perfectly fine for me in Windows. It fails in Linux, even after wrapping the call to KantanDocGen.exe to my installation of mono:

mono Plugins/KantanDocGenPlugin/ThirdParty/KantanDocGenTool/bin/KantanDocGen.exe -outputdir="Saved/KantanDocGen" -fromintermediate -intermediatedir="Intermediate/KantanDocGen/MyProject_Documentation" -name=MyProject_Documentation -cleanoutput
KantanDocGen invoked with arguments:
-outputdir=Saved/KantanDocGen
-fromintermediate
-intermediatedir=Intermediate/KantanDocGen/MyProject_Documentation
-name=MyProject_Documentation
-cleanoutput

Unhandled Exception:
System.TypeInitializationException: The type initializer for 'net.sf.saxon.regex.Categories' threw an exception. ---> System.TypeLoadException: Could not load type of field 'java.util.jar.JarVerifier+VerifierStream:mev' (2) due to: Could not load file or assembly 'IKVM.OpenJDK.Security, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58' or one of its dependencies.
  at (wrapper synchronized) java.util.jar.JarFile.getInputStream(java.util.zip.ZipEntry)
  at sun.net.www.protocol.jar.JarURLConnection.getInputStream () [0x0006c] in <e558e0fcf22f4da6ae0339343959f352>:0 
  at java.net.URL.openStream () [0x00006] in <e558e0fcf22f4da6ae0339343959f352>:0 
  at java.lang.ClassLoader.getResourceAsStream (System.String name) [0x0000b] in <e558e0fcf22f4da6ae0339343959f352>:0 
  at net.sf.saxon.Configuration.locateResource (System.String filename, java.util.List messages, java.util.List loaders) [0x0009a] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.regex.Categories.build () [0x0001b] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.regex.Categories.getCategory (System.String cat) [0x00007] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.regex.Categories..cctor () [0x00067] in <9168faa572294178a78340feb77a0558>:0 
   --- End of inner exception stack trace ---
  at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr)
  at net.sf.saxon.regex.RECompiler.escape (System.Boolean ) [0x00213] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.regex.RECompiler.parseTerminal (System.Int32[] ) [0x0019d] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.regex.RECompiler.piece (System.Int32[] ) [0x0000b] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.regex.RECompiler.parseBranch () [0x00045] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.regex.RECompiler.parseExpr (System.Int32[] ) [0x000d8] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.regex.RECompiler.compile (net.sf.saxon.regex.UnicodeString pattern) [0x0017a] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.regex.ARegularExpression..ctor (java.lang.CharSequence pattern, System.String flags, System.String hostLanguage, java.util.List warnings) [0x0007d] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.dotnet.DotNetPlatform.compileRegularExpression (java.lang.CharSequence regex, System.String flags, System.String hostLanguage, java.util.List warnings) [0x000bd] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.functions.RegexFunction.tryToBindRegularExpression (net.sf.saxon.expr.Expression[] ) [0x00098] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.functions.RegexFunction.makeFunctionCall (net.sf.saxon.expr.Expression[] arguments) [0x00000] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.functions.RegexFunctionSansFlags.makeFunctionCall (net.sf.saxon.expr.Expression[] arguments) [0x0003a] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.functions.SystemFunction.makeCall (System.String name, net.sf.saxon.expr.parser.RetainedStaticContext rsc, net.sf.saxon.expr.Expression[] arguments) [0x0000f] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.trans.KeyManager.registerIdrefKey (net.sf.saxon.Configuration ) [0x00097] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.trans.KeyManager..ctor (net.sf.saxon.Configuration config, net.sf.saxon.expr.PackageData pack) [0x00029] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.expr.PackageData.getKeyManager () [0x00014] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.style.PrincipalStylesheetModule..ctor (net.sf.saxon.style.XSLPackage sourceElement) [0x000da] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.style.StyleNodeFactory.newPrincipalModule (net.sf.saxon.style.XSLPackage node) [0x00000] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.style.Compilation.compilePackage (javax.xml.transform.Source source) [0x00112] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.style.StylesheetModule.loadStylesheet (javax.xml.transform.Source styleSource, net.sf.saxon.style.Compilation compilation) [0x002a6] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.style.Compilation.compileSingletonPackage (net.sf.saxon.Configuration config, net.sf.saxon.trans.CompilerInfo compilerInfo, javax.xml.transform.Source source) [0x00008] in <9168faa572294178a78340feb77a0558>:0 
  at Saxon.Api.XsltCompiler.Compile (System.IO.Stream input, System.String theBaseUri, System.Boolean closeStream) [0x00074] in <ba467b97b7ed4d519aa056a68944b156>:0 
  at Saxon.Api.XsltCompiler.Compile (System.Uri uri) [0x0003b] in <ba467b97b7ed4d519aa056a68944b156>:0 
  at KantanDocGen.SaxonXform.Initialize (System.String XsltPath, System.Diagnostics.DataReceivedEventHandler OutputHandler) [0x0001c] in <95666dac66d041d38b715c2fe0a241ea>:0 
  at KantanDocGen.Program.Main (System.String[] args) [0x00175] in <95666dac66d041d38b715c2fe0a241ea>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'net.sf.saxon.regex.Categories' threw an exception. ---> System.TypeLoadException: Could not load type of field 'java.util.jar.JarVerifier+VerifierStream:mev' (2) due to: Could not load file or assembly 'IKVM.OpenJDK.Security, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58' or one of its dependencies.
  at (wrapper synchronized) java.util.jar.JarFile.getInputStream(java.util.zip.ZipEntry)
  at sun.net.www.protocol.jar.JarURLConnection.getInputStream () [0x0006c] in <e558e0fcf22f4da6ae0339343959f352>:0 
  at java.net.URL.openStream () [0x00006] in <e558e0fcf22f4da6ae0339343959f352>:0 
  at java.lang.ClassLoader.getResourceAsStream (System.String name) [0x0000b] in <e558e0fcf22f4da6ae0339343959f352>:0 
  at net.sf.saxon.Configuration.locateResource (System.String filename, java.util.List messages, java.util.List loaders) [0x0009a] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.regex.Categories.build () [0x0001b] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.regex.Categories.getCategory (System.String cat) [0x00007] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.regex.Categories..cctor () [0x00067] in <9168faa572294178a78340feb77a0558>:0 
   --- End of inner exception stack trace ---
  at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr)
  at net.sf.saxon.regex.RECompiler.escape (System.Boolean ) [0x00213] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.regex.RECompiler.parseTerminal (System.Int32[] ) [0x0019d] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.regex.RECompiler.piece (System.Int32[] ) [0x0000b] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.regex.RECompiler.parseBranch () [0x00045] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.regex.RECompiler.parseExpr (System.Int32[] ) [0x000d8] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.regex.RECompiler.compile (net.sf.saxon.regex.UnicodeString pattern) [0x0017a] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.regex.ARegularExpression..ctor (java.lang.CharSequence pattern, System.String flags, System.String hostLanguage, java.util.List warnings) [0x0007d] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.dotnet.DotNetPlatform.compileRegularExpression (java.lang.CharSequence regex, System.String flags, System.String hostLanguage, java.util.List warnings) [0x000bd] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.functions.RegexFunction.tryToBindRegularExpression (net.sf.saxon.expr.Expression[] ) [0x00098] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.functions.RegexFunction.makeFunctionCall (net.sf.saxon.expr.Expression[] arguments) [0x00000] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.functions.RegexFunctionSansFlags.makeFunctionCall (net.sf.saxon.expr.Expression[] arguments) [0x0003a] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.functions.SystemFunction.makeCall (System.String name, net.sf.saxon.expr.parser.RetainedStaticContext rsc, net.sf.saxon.expr.Expression[] arguments) [0x0000f] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.trans.KeyManager.registerIdrefKey (net.sf.saxon.Configuration ) [0x00097] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.trans.KeyManager..ctor (net.sf.saxon.Configuration config, net.sf.saxon.expr.PackageData pack) [0x00029] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.expr.PackageData.getKeyManager () [0x00014] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.style.PrincipalStylesheetModule..ctor (net.sf.saxon.style.XSLPackage sourceElement) [0x000da] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.style.StyleNodeFactory.newPrincipalModule (net.sf.saxon.style.XSLPackage node) [0x00000] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.style.Compilation.compilePackage (javax.xml.transform.Source source) [0x00112] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.style.StylesheetModule.loadStylesheet (javax.xml.transform.Source styleSource, net.sf.saxon.style.Compilation compilation) [0x002a6] in <9168faa572294178a78340feb77a0558>:0 
  at net.sf.saxon.style.Compilation.compileSingletonPackage (net.sf.saxon.Configuration config, net.sf.saxon.trans.CompilerInfo compilerInfo, javax.xml.transform.Source source) [0x00008] in <9168faa572294178a78340feb77a0558>:0 
  at Saxon.Api.XsltCompiler.Compile (System.IO.Stream input, System.String theBaseUri, System.Boolean closeStream) [0x00074] in <ba467b97b7ed4d519aa056a68944b156>:0 
  at Saxon.Api.XsltCompiler.Compile (System.Uri uri) [0x0003b] in <ba467b97b7ed4d519aa056a68944b156>:0 
  at KantanDocGen.SaxonXform.Initialize (System.String XsltPath, System.Diagnostics.DataReceivedEventHandler OutputHandler) [0x0001c] in <95666dac66d041d38b715c2fe0a241ea>:0 
  at KantanDocGen.Program.Main (System.String[] args) [0x00175] in <95666dac66d041d38b715c2fe0a241ea>:0 

Ultimately I just needed a way to generate screenshots of the Blueprint nodes, and I have that now even without KantanDocGen.exe working. I will let you decide on whether to keep this ticket open if you'd like to better support Linux though. I'm still happy to help troubleshoot.

@kamrann
Copy link
Owner

kamrann commented May 30, 2020

Thanks for the info, but I'm afraid aside from not having any time, this is way out of my range of understanding. The exception is in the doc gen tool (source for that is in another repo also here on my Github), which is a C# app. It's packaged prebuilt with the plugin.

I have no experience with Linux or Mono, and very little with C# generally. My guess is that the important part is: Could not load file or assembly 'IKVM.OpenJDK.Security, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58' or one of its dependencies.
It looks like a missing C# assembly dependency, but where that would fit in in terms of running via Mono, I have absolutely no idea.
If you wanted to investigate further, all I could suggest would be to see if you're able to build the doc gen tool repo from source under Mono, maybe that would give some pointers?

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