Hi Christian,

On 11/16/2015 01:14 PM, Christian Prochaska wrote:
Hello Humberto,

On 11/12/2015 11:17 PM, Humberto López León wrote:
I also tried two more examples of qt5_gui module (qtbase/examples/gui),
the rasterwindow and analogclock. To include these examples in the
compilation mechanism of Genode I relied on the example
"qt5_openglwindow". Both examples compiled correctly, but do not run as
they should. I tried it on Qemu with pbxa9 using the foc  kernel.
could you provide a Genode branch on github or a patch with the changes
you made, so I can easily reproduce the problem?

Christian

With the help of some printf in the example rasterwindow I determined that the application fails in the renderNow() function, specifically when call the following code:

QPaintDevice *device = m_backingStore->paintDevice();

Output to run the application with foc_pbxa9:

Genode 15.08-215-g455cef5 <local changes>
int main(): --- create local services ---
int main(): --- start init ---
int main(): transferred 191 MB to init
int main(): --- init created, waiting for exit condition ---
Quota exceeded! amount=24576, size=4096, consumed=24576
[init] upgrading quota donation for Env::CPU (8192 bytes)
[init -> fb_drv] --- pl11x framebuffer driver ---
[init -> ps2_drv] Detected ExPS/2 mouse - activating scroll-wheel and 5-button support.
[init -> ps2_drv] Using keyboard with scan code set 1 (xlate).
[init -> nitpicker] create session with args: label="wm", ram_quota=28672
[init -> nitpicker] create session with args: label="pointer", ram_quota=28672 [init -> nitpicker] create session with args: label="wm -> decorator", ram_quota=28672 [init -> rasterwindow] tar archive 'qt5_fs_rasterwindow.tar' local at bf000, size is 503808
[init -> rasterwindow] void init_libc_lock_pipe(): init_libc_lock_pipe()
[init -> rasterwindow] using the pipe libc plugin
[init -> rasterwindow] read_rtc: rtc not configured, returning 0
[init -> rasterwindow] pid_t getpid(): getpid not implemented
[init -> nitpicker] create session with args: label="wm -> rasterwindow", ram_quota=28672
[init -> rasterwindow] fcntl(): command 4 arg 4 not supported - pipe
[init -> rasterwindow] fcntl(): command 4 arg 5 not supported - pipe
[init -> rasterwindow] fcntl(): command 4 arg 4 not supported - pipe
[init -> rasterwindow] fcntl(): command 4 arg 5 not supported - pipe
[init -> rasterwindow] read_rtc: rtc not configured, returning 0
[init -> rasterwindow] void qDefaultMessageHandler(QtMsgType, const QMessageLogContext&, const QString&): QObject::connect: Cannot connect (null)::framebuffer_changed() to QNitpickerWindowSurface::framebuffer_changed() [init -> nitpicker] create session with args: label="wm -> rasterwindow", ram_quota=28672
[init -> rasterwindow] ============= ok 1==============
[init -> rasterwindow] ============= ok 2==============
no RM attachment (READ pf_addr=0 pf_ip=101ce74 from 414000)
Genode::Signal_session_component::submit(Genode::Signal_context_capability, unsigned int)::<lambda(Genode::Signal_context_component*)>: invalid signal-context capability Genode::Pager_entrypoint::entry()::<lambda(Genode::Pager_object*)>: Could not resolve pf=0 ip=101ce74


I hope this clarifies my problem.
In the patch are the printf I used in the application code.
Thank you,

Humberto

rasterwindow_examples.patch

From: Christian Prochaska <christian.procha...@genode-labs.com>
From: Humberto López León <humbe...@uclv.cu>

---
 qtbase/examples/gui/rasterwindow/rasterwindow.cpp | 11 +++++++----
 qtbase/examples/gui/rasterwindow/rasterwindow.pro | 13 +++++++++----
 2 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/qtbase/examples/gui/rasterwindow/rasterwindow.cpp b/qtbase/examples/gui/rasterwindow/rasterwindow.cpp
index 96fe529..5a9c316 100644
--- a/qtbase/examples/gui/rasterwindow/rasterwindow.cpp
+++ b/qtbase/examples/gui/rasterwindow/rasterwindow.cpp
@@ -40,6 +40,8 @@
 
 #include "rasterwindow.h"
 
+#include <stdio.h>
+
 //! [1]
 RasterWindow::RasterWindow(QWindow *parent)
     : QWindow(parent)
@@ -101,16 +103,17 @@ void RasterWindow::renderNow()
 {
     if (!isExposed())
         return;
-
+    printf("============= ok 1==============\n");
     QRect rect(0, 0, width(), height());
     m_backingStore->beginPaint(rect);
-
+    printf("============= ok 2==============\n");
     QPaintDevice *device = m_backingStore->paintDevice();
+    printf("============= ok 2.1==============\n");
     QPainter painter(device);
-
+    printf("============= ok 3==============\n");
     painter.fillRect(0, 0, width(), height(), Qt::white);
     render(&painter);
-
+    printf("============= ok 4==============\n");
     m_backingStore->endPaint();
     m_backingStore->flush(rect);
 }
diff --git a/qtbase/examples/gui/rasterwindow/rasterwindow.pro b/qtbase/examples/gui/rasterwindow/rasterwindow.pro
index 8ca4f7a..d917250 100644
--- a/qtbase/examples/gui/rasterwindow/rasterwindow.pro
+++ b/qtbase/examples/gui/rasterwindow/rasterwindow.pro
@@ -1,7 +1,12 @@
-include(rasterwindow.pri)
+#include(rasterwindow.pri)
+QT		+= core gui
 
 SOURCES += \
-    main.cpp
-
-target.path = $$[QT_INSTALL_EXAMPLES]/gui/rasterwindow
+    main.cpp \
+    rasterwindow.cpp
+    
+HEADERS += \
+    rasterwindow.h
+    
+#target.path = $$[QT_INSTALL_EXAMPLES]/gui/rasterwindow
 INSTALLS += target
------------------------------------------------------------------------------
_______________________________________________
genode-main mailing list
genode-main@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/genode-main

Reply via email to