Monitor the QObject Tree of a Qt App

August 14, 2014 7 comments

Because it is still reported that the ownCloud Client has an increasing memory footprint when running for long time I am trying to monitor the QObject tree of the client. Valgrind does not report any memory problems with it so my suspicion was that somewhere QObjects are created with valid parent pointers referencing a long living object. These objects might accumulate unexpectedly over time and waste memory.

So I tried to investigate the app with Qt Inspector of Robert Knight. That’s a great tool, but it does not yet completely do what I need because it only shows QWidget based objects. But Robert was kind enough to put me on the right track, thanks a lot for that!

I tried this naive approach:

In the clients main.cpp, I implemented these both callback functions:

 QSet<QObject*> mObjects;

 extern "C" Q_DECL_EXPORT void qt_addObject(QObject *obj)
 {
    mObjects.insert(obj);
 }

 extern "C" Q_DECL_EXPORT void qt_removeObject(QObject *obj)
 {
    mObjects.remove(obj);
 }

Qt calls these callbacks whenever a QObject is created or deleted respectively. When the object is created I add it’s pointer to the QSet mObjects, and if it is deleted, it is removed from the QSet. My idea was that after the QApp::exec() call returns, I would have to see which QObjects are still in the mObjects QSet. After a longer run of the client, I hoped to see an artificial amount of objects being left over.

Well, what should I say… No success so far: After first tests, it seems that the amount of left-over objects is pretty constant. Also, I don’t see any objects that I would not kind of expect.

So this little experiment left more questions than answer: Is the suspicion correct that QObjects with a valid parent pointer can cause the memory growth? Is my test code as I did it so far able to detect that at all? Is it correct to do the analysis after the app.exec() call returned?

If you have any hints for me, please let me know! How would you tackle the problem?

Thanks!

This is the link to my modified main.cpp:

https://github.com/owncloud/mirall/blob/qobject_monitor/src/main.cpp

Categories: FOSS, ownCloud Tags: , ,

Let’s party!

July 24, 2014 1 comment

Yesterday, we released ownCloud 7. You might have read that somewhere on the internet – it was widely announced and broadly picked up. If you do not have ownCloud yet, you really should try it now, and if you are one of the people happily using ownCloud for a while, update soon!

In my opinion, ownCloud 7 is a real step ahead. So much work went into it from the brave server guys, and the result is simply impressive: It is fast, beautiful and fully focused on what it is supposed to be and do: File sync and share, even though you still have of course all the other useful stuff like calendaring and such.

Apart from the wellknown features ownCloud 7 also brings some things that you do not see on the first look. Some of these things relate to syncing and as a guy working mainly on the sync client I am especially happy about that: Already with the current released clients you will see a performance win in syncing, because ownCloud 7 handles parallel HTTP requests way better. Moreover, ownCloud 7 sends some interesting information about it’s files, and the next generation of sync clients will for example know which files are shared and their permissions. We are currently working on some exciting stuff on the client side, stay tuned.

Release Party ownCloud 7

That all should be reason enough to celebrate together, because ownCloud is done by all of us in the community.

On Tuesday, august 5th, we will do a Release Party in Nuremberg, Germany. As last time, the Coworkingspace N├╝rnberg is hosting us. We will start at 18:00.

Everybody who is interested in ownCloud for whatever reason is very welcome to show up. We will probably have a short informal demonstration or two, but of course plenty room for questions, discussions, meet and greet with all kind of FOSS people, some core ownCloud people, nice beer and big fun.

You really should come! And don’t forget to tell your friends, thanks!

Categories: Event, FOSS, ownCloud, Release Tags: , ,

ownCloud Client 1.6.1

June 30, 2014 6 comments

End of last week, we have released version 1.6.1 of the ownCloud Client, the desktop tool that does file syncing with your ownCloud. Read on the Desktop Client page how to get and install it.

The recommendation is to update your installation to this version. The previous version 1.6.0 had great new features, first and foremost the parallel up- and download of files and a way more performant handling of the local sync journal. That required a lot of code changes. Unfortunately that also brought in some bugs which are now fixed with the 1.6.1 release.

On the windows platforms, we experienced a memory leak that over time let the memory consumption of the client grow. Also, a problem in the Qt5 library that we ship for windows caused the problem that under some circumstances the wrong encryption lib was loaded, so that some people saw SSL problems on Windows.

And there were crashes. Users kept on reporting that the client was crashing after some time on windows, without a special reason. None of the developers was able to reproduce that or ever saw that. We asked for backtraces, which also can be produced on windows. Even though the backtraces looked similar, we did not find an obvious reason for the crashes. Finally, by reading through all involved code levels again and again, Olivier was able to spot some code in libneon that, again under special circumstances, could cause crashes on win.

It was a one line fix, we quickly built test packages, people tested, and finally the crashes were gone (the patch to libneon is on its way to upstream of course).

All that is now fixed in 1.6.1.

What does that show?
There not very much little “easy” bug findings any more. That is similar to the soccer world championship, where the coaches keep telling that there are no “easy opponents” any more nowadays, which is also true. These tricky problems we face in the client are hard to find, require time, often special setups if they are reproduceable at all, and advanced debugging skills. Very challenging, very much fun. But that also requires very much patience from the people who suffer from that bugs. We keep on asking questions,
ask to test new daily builds and need time to investigate stuff, and more time to release once we have the fix.

Thank you all for helping in this situation, not giving up, for again testing another daily build, reporting back, trying again. That is really big.

Kraft Release 0.55

May 29, 2014 2 comments

Herewith I announce the availability of the new Kraft release 0.55.

It was finished today and fixes two issues that came up after the release of the previous version: A compile fix for compiling Kraft against the latest version of ctemplate, which did not work out of the box with Kraft 0.54. The other fix is a fail in generating PDF documents which is a pretty severe problem for Kraft. Both is now working well with the new version 0.55 which can be downloaded here.

Thanks a lot to the Kraft community for testing!

If you find other problems, want to give feedback or seek help, please see here how to proceed. Thanks!

Categories: KDE, Kraft, Release Tags: , , ,

New Kraft Release 0.54

May 13, 2014 10 comments

blogheadI am happy to tell about the new release 0.54 of Kraft which was released a couple of days ago.

It is not only a maintenance release but also comes with a couple of new features, the most outstandig is the ability to handle a new document type, the delivery note which prints no prices. That closes a gap for interesting use cases. Here is a more detailed log of what was added to this release.

Kraft is KDE software to help people driving a small business. Emphasis is on small and business. We are not talking CMS, ERP or any other monster. Kraft is about a handy alternative for people who wrote their first 25 invoices using Libre Office and now start to think of how they could could be more efficient in doing that: Using structured templates, being able to create an invoice based on a quote that was done before, no need to fiddle around with slipping paragraphs, a proper address book, such stuff. zollstockSoftware for people who have other things to do than sit in front of their computer. Hard to understand for geeks like us who enjoy this technology, but yes, there are a lot of people who do not, who just use computers because they must, because they have a business.

I started to work on Kraft in 2006, and worked on similar software before, well, we all have our dark history. I always enjoyed doing software for people who would prefer to not use the computer. And the more I got involved into KDE the more obvious it became to me how perfectly KDE is able to help with that. High level classes, components to reuse, other projects aiming the same direction, and a community of helpful, friendly and open minded people. Also I think software like Kraft is a good addition to the KDE family as it has potential to bring more and different users to KDE.

However, if measured by the number of known users of Kraft, this idea failed completely. Compared to other KDE software, Kraft has disappointing little (known) users. Also contributors: Apart from very few brave developers who spent some time on Kraft, I am the only contributor. The reasons for that can be discussed in another thread.

What still keeps me motivated to work on Kraft is that the few users often tell how happy they are with it. And that Kraft really helps them to drive their business and save time. Also that they found with Linux and KDE a computer “environment” that really helps them reliably instead of facing them with scary stuff. That is really cool, and the best is that this recently happened more often than the years before.

That is what keeps me around with Kraft.

For the future, there are enough ideas: “Combined Kraft” which means using one instance of Kraft from distributed home offices, with ownCloud as sync hub, or an easy to use project management and of course a port to KDE Frameworks 5 to be able to ship for Mac and and and…

Well, it’s a pet project, and my day unfortunately does not leave very much energy behind for that currently, so don’t expect big movement, but be sure that there will be small steps.

Categories: KDE, Kraft, Release Tags: ,

ownCloud @ Chemnitzer Linuxtage 2014

March 19, 2014 6 comments

Last weekend Daniel, Arthur, Morris and me were in Chemnitz where the Chemnitzer Linuxtage 2014 took place. We drove a booth during the two days, the CLT host around 60 boothes of companies and FOSS projects. I like to go to the CLT because it is perfectly organized with great enthusiasm of everybody involved from the organisation team. Food, schedules, the venue, everything is perfect.

Even on saturday morning, short after opening of the event, somebody from the orga team was showing up on the booth with chocolate for the volunteers, saying hello and asking if everything is in place for a successful weekend. A small detail, which shows how much effort is put into organization of the event.

As a result, visitors come to visit the event. It’s mostly a community centric event: Exhibitors are mostly representing FOSS projects such as openstreetmap.org, distributions like Fedora or openSUSE or companies from the free software market.

Morris in action on the booth

Morris in action on the booth

The majority of visitors are mostly interested in private use of the software. But, no rule without exception, we also had a remarkable number of people from companies, either executives or people working in the IT departments, who were interested in ownCloud.

Speaking about ownCloud, I want to say that it’s amazing to represent our project. People know it, people like it, people use it. In private, but also in professional space people work with ownCloud already or are planing to start with ownCloud. ownCloud already is the accepted solution for the problems that became so practical with the NSA scandal last year.

My talk with title A private Cloud with ownCloud on Saturday morning was very well received and went smooth. The room was too small, lots of people had to stand or sit on the stairs. It was a very positive atmosphere.

Something that changed compared to last year and the year before: Most discussions were around how ownCloud can be installed, integrated and used and not any more about which features are still missing or maybe also bugs.

So it were two very exhausting days, but big fun! Thanks to Daniel, Arthur and Morris for the work and fun we had on the booth, and thanks to the CLT team for CLT.

Categories: Event, FOSS, ownCloud Tags: , , ,

ownCloud 6 Releaseparty in Nuremberg

December 13, 2013 5 comments

oc6_releaseparty

The ownCloud community released ownCloud 6 a couple of days ago. That was another big release and we want to celebrate!

Please, everybody who is interested in ownCloud, like to learn more, give feedback or just want to meet other people from the community, you are invited to show up at Coworking Space in Nuremberg, Josephsplatz 8, on december 18th, 6pm.

We will have a relaxed evening with a little discussion, maybe short demos, cakes and stuff, and fun. No heavy talks and serious faces!

We are looking forward to meeting you.

Follow

Get every new post delivered to your Inbox.