<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">On Montag, 14. März 2022 10:16:04 CET Alexander Neundorf wrote:</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> On Montag, 14. März 2022 08:23:20 CET Johnny Jazeix wrote:</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> > Hi,</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> > </p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> > usually, crashes happened to me when the images size was not set or there</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> > was a division by 0.</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> > Maybe it's something equivalent here.</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> </p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> Hmm, I'm just trying to run one of the "android-ready" examples from Qt, I</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> would expect that they work. It also crashes if my main() doesn't actually</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> do anything.</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> </p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> Some more info:</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> something at least already succeeded before:</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> </p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> D         : Gralloc Free  w:1200, h:1920, f:0x1101, usage:0xb00,</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> ui64Stamp:129462 line = 2376 D         : Gralloc Free  w:1200, h:1920,</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> f:0x1101, usage:0xb00, ui64Stamp:129513 line = 2376 D         : Gralloc</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> Free  w:1200, h:1920, f:0x1101, usage:0xb00, ui64Stamp:129462 line = 2376 D</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> ip_monitor-525: fe80::1 dev wlan0 lladdr 4c:1b:86:33:c4:1e router STALE I</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> QtCore  : Start</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> I Qt      : qt started</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> </p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> Then there are some other error messages which don't look good:</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> </p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> W project.exampl: Accessing hidden field Landroid/graphics/drawable/</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> GradientDrawable$GradientState;->mShape:I (greylist-max-p, reflection,</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> denied) W System.err: java.lang.NoSuchFieldException: mShape</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> 0W System.err:    at java.lang.Class.getField(Class.java:1604)</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> W System.err:    at</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> org.qtproject.qt5.android.ExtractStyle.getGradientDrawable(ExtractStyle.java</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> :672) W System.err:    at</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> org.qtproject.qt5.android.ExtractStyle.getDrawable(ExtractStyle.java: 1039)</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> </p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> NullPointerExceptions also looks suspicious:</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> </p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> W System.err: java.lang.NullPointerException: Attempt to invoke virtual</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> method 'float java.lang.reflect.Field.getFloat(java.lang.Object)' on a null</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> object reference W System.err:    at</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> org.qtproject.qt5.android.ExtractStyle.getRotateDrawable(ExtractStyle.java:7</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> 12) W System.err:    at</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> org.qtproject.qt5.android.ExtractStyle.getDrawable(ExtractStyle.java: 1043)</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> W System.err:    at</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> org.qtproject.qt5.android.ExtractStyle.getLayerDrawable(ExtractStyle.java:62</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> 3) W System.err:    at</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> org.qtproject.qt5.android.ExtractStyle.getDrawable(ExtractStyle.java: 1031)</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> W System.err:    at</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> org.qtproject.qt5.android.ExtractStyle.extractProgressBarInfo(ExtractStyle.j</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> ava:1665)</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> </p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> The malloc(4GB)-call and crash happen afterward.</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> </p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> </p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> I'm also trying to get some logging output:</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> </p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> int main(int argc, char* argv[])</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> {</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>   __android_log_write(ANDROID_LOG_DEBUG, "MyTag", "******** hello log !\n");</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> //     QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> QGuiApplication app(argc,argv);</p>
<br /><br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">this is probably also not good ?</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"><span style="color:#000000;"><span style="background-color:#ffffff;"><span style="font-family:monospace;">I/hwservicemanager(  299): getTransport: Cannot find entry android.hardware.graphics.mapper@3.0::IMapper/default in either framework or device manifest. </span></span></span><br />W/Gralloc3(25555): mapper 3.x is not supported <br />D/        (25555): Gralloc Register  w:1200, h:1920, f:0x1101</p>
<br /><br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">My CMakeLists.txt looks like this:</p>
<br /><br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">cmake_minimum_required(VERSION 3.10)</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">project(qmlcanvas)</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">find_package(Qt5 COMPONENTS Qml Quick REQUIRED)</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">set(CMAKE_AUTOMOC ON)</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">set(srcs main.cpp)</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">qt5_add_resources(QT_RESOURCES canvas.qrc ../shared/shared.qrc)</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">add_executable(qmlcanvas ${srcs}  ${QT_RESOURCES})</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">target_link_libraries(qmlcanvas Qt5::Qml Qt5::Quick log)</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">install(TARGETS qmlcanvas DESTINATION bin )</p>
<br /></body>
</html>