Project

General

Profile

Actions

Bug #2282

closed

Possible memory leak in WTableView

Added by Andreas Büchin about 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
Start date:
10/03/2013
Due date:
% Done:

0%

Estimated time:

Description

I use WT version 3.3.0.

During tests I observed that the memory of the webserver was increasing.

After a more detailed analysis it seems that the memory leak is related to the WTableView.

When adding data to a WStandardItemModel via insertColumn and removing this data with clear method of the model, it seems that the connected WTableView is not releasing memory when clear of the model is executed.

As soon as the model is not assinged to the view the memory doesn't increase.

see attached example.


Files

wittyTest_MVC.png (39.4 KB) wittyTest_MVC.png Andreas Büchin, 10/03/2013 03:36 PM
wittyTest2.cpp (3.42 KB) wittyTest2.cpp Andreas Büchin, 10/03/2013 03:36 PM
wittyTest2_3.3.1-rc2.png (36.3 KB) wittyTest2_3.3.1-rc2.png Andreas Büchin, 10/07/2013 03:01 PM
Actions #1

Updated by Koen Deforche about 11 years ago

  • Status changed from New to InProgress
  • Assignee set to Korneel Dumon
  • Target version set to 3.3.1

Korneel,

Can you see if this is still a problem with 3.3.1?

koen

Actions #2

Updated by Korneel Dumon about 11 years ago

I don't see any increase in memory usage running your example with Wt 3.3.1, it would be helpful if you can verify this with the release candidate.

Actions #3

Updated by Andreas Büchin about 11 years ago

I just tested it with Wt 3.3.1-rc2.

I stated the application in eclipse to be profiled with valgrind. After that I opened a browser and waited for about 5 min until I stopped the profiling (See attached log).

The memory is still increasing.

I used following cmake flags for building the Wt library:

-DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SHARED_LIBS=ON -DCONNECTOR_FCGI=OFF -DCONNECTOR_HTTP=ON -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DMULTI_THREADED=ON -DENABLE_SQLITE=OFF -DENABLE_POSTGRES=OFF -DENABLE_SSL=OFF

was checked with boost version 1.46 and gcc 4.6 and in addition with

gcc 4.7 and boost version 1.54

Actions #4

Updated by Korneel Dumon about 11 years ago

ok, thanks, I dismissed it too quickly.

It seems the problem is that we're always adding css-rules every time the table-view is rebuild and we never remove them. This is also visible in the browser, in firebug I see lots of identical css-rules.

The issues are in: WAbstractItemView::initDragDrop(), WAbstractItemView::ColumnInfo::ColumnInfo(const WAbstractItemView *view, int anId)

I will discuss a fix with Koen.

Korneel

Actions #5

Updated by Koen Deforche about 11 years ago

  • Target version changed from 3.3.1 to 3.3.2
Actions #6

Updated by Korneel Dumon about 11 years ago

  • Status changed from InProgress to Resolved
Actions #7

Updated by Koen Deforche almost 11 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF