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"

Fatal error trying to call function in packaged game

I'm trying to use Third Party Library in my plugin for write PDF document and get fatal error in builded game (Windows 64-bit). In editor all works fine.

library: https://github.com/galkahana/PDF-Writer

Error occurs when call:

 PDFUsedFont * font = PdfWriter->GetFontForFile(fontpath, 0L);

this function returns NULL in DebugGame in Local Windows Debugger

In build.cs I'm include all .lib files:

 PublicAdditionalLibraries.Add(Path.GetFullPath(Path.Combine(ModuleDirectory, ../../Source/PDFWriter4_0/Build/LibAesgm.lib")));
 PublicAdditionalLibraries.Add(Path.GetFullPath(Path.Combine(ModuleDirectory, "../../Source/PDFWriter4_0/Build/Zlib.lib")));
 PublicAdditionalLibraries.Add(Path.GetFullPath(Path.Combine(ModuleDirectory, "../../Source/PDFWriter4_0/Build/LibTiff.lib")));
 PublicAdditionalLibraries.Add(Path.GetFullPath(Path.Combine(ModuleDirectory, "../../Source/PDFWriter4_0/Build/LibJpeg.lib")));
 PublicAdditionalLibraries.Add(Path.GetFullPath(Path.Combine(ModuleDirectory, "../../Source/PDFWriter4_0/Build/FreeType.lib")));
 PublicAdditionalLibraries.Add(Path.GetFullPath(Path.Combine(ModuleDirectory, "../../Source/PDFWriter4_0/Build/libpng_64.lib")));
 PublicAdditionalLibraries.Add(Path.GetFullPath(Path.Combine(ModuleDirectory, "../../Source/PDFWriter4_0/Build/PDFWriter.lib")));

In packaged game log I have:

     [2019.04.05-14.46.17:507][ 43]LogWindows: Error: === Critical error: ===
     [2019.04.05-14.46.17:507][ 43]LogWindows: Error: 
     [2019.04.05-14.46.17:507][ 43]LogWindows: Error: Fatal error!
     [2019.04.05-14.46.17:507][ 43]LogWindows: Error: 
     [2019.04.05-14.46.17:507][ 43]LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000000
     [2019.04.05-14.46.17:507][ 43]LogWindows: Error: 
     [2019.04.05-14.46.17:507][ 43]LogWindows: Error: [Callstack] 0x00007ff76cd661d0 pdfWriterPlugin.exe!UnknownFunction []
     ...
     [2019.04.05-14.46.17:507][ 43]LogWindows: Error: [Callstack] 0x00007ff9fb34b85d USER32.dll!UnknownFunction []
     [2019.04.05-14.46.17:507][ 43]LogWindows: Error: [Callstack] 0x00007ff9fb34b1ef USER32.dll!UnknownFunction []
     [2019.04.05-14.46.17:507][ 43]LogWindows: Error: [Callstack] 0x00007ff769baef76 pdfWriterPlugin.exe!UnknownFunction []
     ...
     [2019.04.05-14.46.17:508][ 43]LogWindows: Error: [Callstack] 0x00007ff9f9a81fe4 KERNEL32.DLL!UnknownFunction []
     [2019.04.05-14.46.17:508][ 43]LogWindows: Error: [Callstack] 0x00007ff9fc0ff061 ntdll.dll!UnknownFunction []
     [2019.04.05-14.46.17:508][ 43]LogWindows: Error: 

I think that UE4 have some troubles with FreeType.lib, in VS it has no intellisense highlight.

I'm already has try to:

  1. Add .h files from FreeType.lib to source/PDFWriter4_0/FreeType/include and add this path to "PublicIncludePaths" and/or ''PrivateIncludePaths" in my build.cs file

  2. Use Engine FreeType2 Library from Epic Games\UE_4.22\Engine\Source\ThirdParty\FreeType2

  3. Use FreeType 2.6.0 (as in editor Runtime) instead FreeType 2.4.11 in shipping build (change FreeType.Build.cs in Engine\Source\ThirdParty\FreeType2) - this don't help (LogSlate: Using FreeType 2.4.11)

Sorry for my English

Product Version: UE 4.22
Tags:
more ▼

asked May 06 '19 at 02:21 PM in C++ Programming

avatar image

AlexeyGet
1 1

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

0 answers: sort voted first
Be the first one to answer this question
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