armortools
armortools copied to clipboard
[iOS] LZ4_DISABLE_DEPRECATE_WARNINGS compile errors
ArmorPaint iOS Build iPhone XR iOS 15.3 Building with Xcode-beta on macOS Monterey
Issue description: So I managed to get the app working on my iPhone but to do so I had to disable this few lines of code in the file: /Users/USERNAME/Desktop/Armorpaint/armorpaint/armorcore/Libraries/plugins/Sources/io_usd/tinyusdz/pxrLZ4/lz4.h
starts on line 445 in the file (This is the modification of the code)
#endif /* LZ4_DISABLE_DEPRECATE_WARNINGS
Obsolete compression functions LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_default() instead") int LZ4_compress (const char* source, char* dest, int sourceSize);
LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_default() instead") int LZ4_compress_limitedOutput (const char* source, char* dest, int sourceSize, int maxOutputSize);
LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_fast_extState() instead") int LZ4_compress_withState (void* state, const char* source, char* dest, int inputSize);
LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_fast_extState() instead") int LZ4_compress_limitedOutput_withState (void* state, const char* source, char* dest, int inputSize, int maxOutputSize);
LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_fast_continue() instead") int LZ4_compress_continue (LZ4_stream_t* LZ4_streamPtr, const char* source, char* dest, int inputSize);
LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_fast_continue() instead") int LZ4_compress_limitedOutput_continue (LZ4_stream_t* LZ4_streamPtr, const char* source, char* dest, int inputSize, int maxOutputSize);
decompression functions LZ4LIB_API LZ4_DEPRECATED("use LZ4_decompress_fast() instead") int LZ4_uncompress (const char* source, char* dest, int outputSize);
LZ4LIB_API LZ4_DEPRECATED("use LZ4_decompress_safe() instead") int LZ4_uncompress_unknownOutputSize (const char* source, char* dest, int isize, int maxOutputSize);
decompression functions use new streaming interface whenever possible
LZ4LIB_API LZ4_DEPRECATED("use LZ4_createStream() instead") void* LZ4_create (char* inputBuffer);
LZ4LIB_API LZ4_DEPRECATED("use LZ4_createStream() instead") int LZ4_sizeofStreamState(void);
LZ4LIB_API LZ4_DEPRECATED("use LZ4_resetStream() instead") int LZ4_resetStreamState(void* state, char* inputBuffer);
LZ4LIB_API LZ4_DEPRECATED("use LZ4_saveDict() instead") char* LZ4_slideInputBuffer (void* state);
decompression functions
LZ4LIB_API LZ4_DEPRECATED("use LZ4_decompress_safe_usingDict() instead") int LZ4_decompress_safe_withPrefix64k (const char* src, char* dst, int compressedSize, int maxDstSize);
LZ4LIB_API LZ4_DEPRECATED("use LZ4_decompress_fast_usingDict() instead") int LZ4_decompress_fast_withPrefix64k (const char* src, char* dst, int originalSize);
PXR - modification, add namespace. */
} // pxr_lz4
//PXR_NAMESPACE_CLOSE_SCOPE
#endif /* LZ4_H_2983827168210 */
/* PXR - modification; remove C linkage.
#if defined (__cplusplus)
}
#endif
*/
*Everything was working fine, I could paint and do everything else but when I try to save my project it gets stuck on "Saving Project" sometimes. And whenever I try to open a project the project opens and immediately closes the app. Also If I try to Drag a project from the browser menu the viewport just turns into a black screen. So Is this because of the lz4.h file and If so how do I get to build the project without disabling the lines of code from the lz4.h code? I mean... It says in the code that it's obsolete so I didn't think it was important
The app is performing great otherwise on my phone
So this is what I get when I try to open a .arm file from the projects menu
if (texture->impl.data != NULL) {
free(texture->impl.data);
texture->impl.data = NULL;
}
}
ArmorPaint(2499,0x1084b8580) malloc: *** error for object 0x7373616c63626428: pointer being freed was not allocated
ArmorPaint(2499,0x1084b8580) malloc: *** set a breakpoint in malloc_error_break to debug
dyld4 config: DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/usr/lib/libMTLCapture.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib
(lldb)
Sorry it took me a while to update Kinc submodule - fix for the crash (https://github.com/Kode/Kinc/pull/682) is included now in the ArmorPaint repository. Will take care of the LZ4_DISABLE_DEPRECATE_WARNINGS
errors next. Thanks for report!
Nice! it works good now. 😁
Great to hear! Re-opening just to remind myself to fix the LZ4_DISABLE_DEPRECATE_WARNINGS
issues.
Fixed compile errors at https://github.com/armory3d/armorpaint_plugins/commit/c0b612596a1cdde0aac697ea2514647df95f8b88. Regarding the undefined symbols errors: make sure to build in release mode.