Re: [Qgis-developer] Map canvas flickers

2012-08-09 Thread Kuhn Matthias, Vermessung
Done

On X11: Show backbuffer checkbox / enable disable incremental rendering 
spinbox according to availability
On Mac: Disable backbuffer option (but check so user knows it's enabled) / 
disable incremental rendering spinbox
On Windows: Disable backbuffer option (but check so user knows it's enabled) / 
enable incremental rendering spinbox

I hope Windows doesn't care either about PaintOnScreen neither, because it's 
not set there any more now. But no problems on this win-system here. Couldn't 
test mac though, but the changes there where minimal.

--
Matthias Kuhn
 

 -Original Message-
 From: Marco Hugentobler [mailto:marco.hugentob...@sourcepole.ch] 
 Sent: Wednesday, August 08, 2012 11:16 AM
 To: Kuhn Matthias, Vermessung
 Cc: qgis-developer@lists.osgeo.org
 Subject: Re: [Qgis-developer] Map canvas flickers
 
 If there is a good reason to leave it this way, I would hide 
 the incremental drawing option for mac completely as I'm 
 working on this code anyway.
 
 Yes, good point. Please hide that option for Mac.
 
 Marco
 
 Am 08.08.2012 10:36, schrieb Kuhn Matthias, Vermessung:
  I'll disable this option and remove it from the dialog on 
 any other 
  than
  Q_WS_X11 or do you think this can be useful for Mac as well?
  Disabling is fine for Mac as well (Qt::WA_PaintOnScreen 
 has no effect 
  on Mac).
  I was more thinking about incremental drawing.
  At the moment processEvents is not called inside the vector 
 renderer on Mac, so on this platform neither keytrokes (esc) 
 nor incremental rendering is possible as far as I can see. If 
 there is a good reason to leave it this way, I would hide the 
 incremental drawing option for mac completely as I'm working 
 on this code anyway.
 
  --
  Matthias Kuhn

 
 
 --
 Dr. Marco Hugentobler
 Sourcepole -  Linux  Open Source Solutions Weberstrasse 5, 
 CH-8004 Zürich, Switzerland marco.hugentob...@sourcepole.ch 
 http://www.sourcepole.ch Technical Advisor QGIS Project 
 Steering Committee
 
 
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-09 Thread Marco Hugentobler

Applied to master branch. Thanks, Matthias!


I hope Windows doesn't care either about PaintOnScreen neither


According to the docs, PaintOnScreen has no effect on windows.

Regards,
Marco

Am 09.08.2012 09:48, schrieb Kuhn Matthias, Vermessung:

Done

On X11: Show backbuffer checkbox / enable disable incremental rendering 
spinbox according to availability
On Mac: Disable backbuffer option (but check so user knows it's enabled) / disable 
incremental rendering spinbox
On Windows: Disable backbuffer option (but check so user knows it's enabled) / enable 
incremental rendering spinbox

I hope Windows doesn't care either about PaintOnScreen neither, because it's 
not set there any more now. But no problems on this win-system here. Couldn't 
test mac though, but the changes there where minimal.

--
Matthias Kuhn
  


-Original Message-
From: Marco Hugentobler [mailto:marco.hugentob...@sourcepole.ch]
Sent: Wednesday, August 08, 2012 11:16 AM
To: Kuhn Matthias, Vermessung
Cc: qgis-developer@lists.osgeo.org
Subject: Re: [Qgis-developer] Map canvas flickers


If there is a good reason to leave it this way, I would hide

the incremental drawing option for mac completely as I'm
working on this code anyway.

Yes, good point. Please hide that option for Mac.

Marco

Am 08.08.2012 10:36, schrieb Kuhn Matthias, Vermessung:

I'll disable this option and remove it from the dialog on

any other

than
Q_WS_X11 or do you think this can be useful for Mac as well?

Disabling is fine for Mac as well (Qt::WA_PaintOnScreen

has no effect

on Mac).

I was more thinking about incremental drawing.
At the moment processEvents is not called inside the vector

renderer on Mac, so on this platform neither keytrokes (esc)
nor incremental rendering is possible as far as I can see. If
there is a good reason to leave it this way, I would hide the
incremental drawing option for mac completely as I'm working
on this code anyway.

--
Matthias Kuhn
   


--
Dr. Marco Hugentobler
Sourcepole -  Linux  Open Source Solutions Weberstrasse 5,
CH-8004 Zürich, Switzerland marco.hugentob...@sourcepole.ch
http://www.sourcepole.ch Technical Advisor QGIS Project
Steering Committee




--
Dr. Marco Hugentobler
Sourcepole -  Linux  Open Source Solutions
Weberstrasse 5, CH-8004 Zürich, Switzerland
marco.hugentob...@sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-08 Thread Kuhn Matthias, Vermessung
 I'll disable this option and remove it from the dialog on any other 
 than
 Q_WS_X11 or do you think this can be useful for Mac as well?
 
 Disabling is fine for Mac as well (Qt::WA_PaintOnScreen has 
 no effect on Mac).

I was more thinking about incremental drawing.
At the moment processEvents is not called inside the vector renderer on Mac, so 
on this platform neither keytrokes (esc) nor incremental rendering is possible 
as far as I can see. If there is a good reason to leave it this way, I would 
hide the incremental drawing option for mac completely as I'm working on this 
code anyway.

--
Matthias Kuhn
 
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-08 Thread Marco Hugentobler

If there is a good reason to leave it this way, I would hide the incremental 
drawing option for mac completely as I'm working on this code anyway.


Yes, good point. Please hide that option for Mac.

Marco

Am 08.08.2012 10:36, schrieb Kuhn Matthias, Vermessung:

I'll disable this option and remove it from the dialog on any other
than
Q_WS_X11 or do you think this can be useful for Mac as well?

Disabling is fine for Mac as well (Qt::WA_PaintOnScreen has
no effect on Mac).

I was more thinking about incremental drawing.
At the moment processEvents is not called inside the vector renderer on Mac, so 
on this platform neither keytrokes (esc) nor incremental rendering is possible 
as far as I can see. If there is a good reason to leave it this way, I would 
hide the incremental drawing option for mac completely as I'm working on this 
code anyway.

--
Matthias Kuhn
  



--
Dr. Marco Hugentobler
Sourcepole -  Linux  Open Source Solutions
Weberstrasse 5, CH-8004 Zürich, Switzerland
marco.hugentob...@sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-07 Thread Matthias Kuhn
Hi Salvatore,

What do you mean with run QGIS by shell? Is there another way you can
run your self-compiled version and it works?

I started working on a git repo, based on 1.8. So far only the patch
adjusted by Ivan for 1.8 is applied.

https://github.com/matthias-kuhn/Quantum-GIS.git release-1_8
(Watch out: it's not on the master branch!)

Matthias

On Mon, 2012-08-06 at 22:43 +0200, Salvatore Larosa wrote:
 2012/8/6 Ivan Mincik ivan.min...@gmail.com
 
 
  Sorry, but my test was without patch!
  Anyway I did try the patch in current master and the
 flickering is
  disappear, but when run QGIS I get an exception:
 std::bad_alloc.
 
  can it is avoid?
 
 
 It could be some another problem with master. Are You sure it
 happens
 only with the patch? Did You applied correct version (mine
 version is
 for 1.8, Matthias's is for master) ?
 
 
 Yes, it only occurs with the patch and when I run QGIS by shell!
 I applied the patch as in attached, is it correct?
 
  
 
 
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-07 Thread Salvatore Larosa
Hi,

2012/8/7 Matthias Kuhn matthias.k...@gmx.ch

 Hi Salvatore,

 What do you mean with run QGIS by shell?


I mean, running QGIS by CL interface (shell bash linux).
Also I noticed that the exception does not always occur!
Oddly, if I run QGIS (CLI) by the following command: $ qgis --lang us
(adding option --lang),
everythings works fine, while by typing $ qgis, it raises to the Exception.



 Is there another way you can
 run your self-compiled version and it works?


Yes, by clicking on shortcut icon on my dashboard,
simply because in my shortcut I set the command qgis --lang us



 I started working on a git repo, based on 1.8. So far only the patch
 adjusted by Ivan for 1.8 is applied.

 https://github.com/matthias-kuhn/Quantum-GIS.git release-1_8
 (Watch out: it's not on the master branch!)


I was aware of what, but it is very annoying issue and I wanted test it!

All the Best,

-SL


 Matthias

 On Mon, 2012-08-06 at 22:43 +0200, Salvatore Larosa wrote:
  2012/8/6 Ivan Mincik ivan.min...@gmail.com
 
 
   Sorry, but my test was without patch!
   Anyway I did try the patch in current master and the
  flickering is
   disappear, but when run QGIS I get an exception:
  std::bad_alloc.
  
   can it is avoid?
 
 
  It could be some another problem with master. Are You sure it
  happens
  only with the patch? Did You applied correct version (mine
  version is
  for 1.8, Matthias's is for master) ?
 
 
  Yes, it only occurs with the patch and when I run QGIS by shell!
  I applied the patch as in attached, is it correct?
 
 
 
 
  ___
  Qgis-developer mailing list
  Qgis-developer@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/qgis-developer



___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-07 Thread Matthias Kuhn
Hi all,

There is now a config option to turn this fix on and off
( Setting=Options=Rendering: Enable backbuffer )

The more people that test it, the better are the chances to get this
into the main code.

Thanks to everybody who is participating in this discussion and testing!

On Fre, 2012-07-27 at 13:08 +0200, Matthias Kuhn wrote:
 Hi all,
 
 there is this issue report #4011 Map canvas flickers when content is
 dragged which is actually pretty annoying and doesn't get much
 attention. ( http://hub.qgis.org/issues/4011 ) I think the solution
 would be pretty simple. Please read on.
 
 It was introduced by f4d26d6211830a866030a333236dcfbf15e077aa Fix for
 resize crash, ticket #2714.
 This bugfix disables backbuffering, what fixes the crash but leads to
 the beforementioned flickering.
 
 The crash seems to be related to Qt versions (probably 4.6 and 4.7
 affected). When I tried to reproduce the crash in 4.8.1 (by reverting
 abovementioned patch) I couldn't reproduce the crash. So it is well
 possible that this problem has been fixed in Qt upstreams.
 
 But: I myself never could reproduce this crash (due to the lack of a
 system with old Qt libs). So, I would be happy if someone familiar with
 this problem could confirm that this is fixed with Qt 4.8.
 
 Then there are two possibilities (unless you come up with a third one):
 
 1. Check for qVersion upon every repaint as suggested by Martin Dobias
 and then enable/disable the workaround accordingly.
 
 2. Switch the workaround on/off by a pre-compiler constant. This way,
 any new distro with Qt=4.8 could be shipped without the workaround-code
 being compiled into the binaries.
 
 Any comments on this issue are very welcome, as it makes QGIS look a lot
 sweeter :)
 
 Regards
 
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-07 Thread Marco Hugentobler

Hi Matthias

I didn't try it yet, but from a first look at the patch source, it seems 
to me backbuffering is enabled by default:


settings.value( /Map/enableBackbuffer, 1 ).toBool();

That would be ok on X11. But the windows users (who are not affected by 
the flickering) would loose the paint update / esc key interrupt without 
having an advantage. So either always execute processEvents() in vector 
layer for windows or disable backbuffer by default.


Apart from that, the patch looks fine and I'm happy to apply it.

Regards,
Marco

Am 07.08.2012 11:02, schrieb Matthias Kuhn:

Hi all,

There is now a config option to turn this fix on and off
( Setting=Options=Rendering: Enable backbuffer )

The more people that test it, the better are the chances to get this
into the main code.

Thanks to everybody who is participating in this discussion and testing!

On Fre, 2012-07-27 at 13:08 +0200, Matthias Kuhn wrote:

Hi all,

there is this issue report #4011 Map canvas flickers when content is
dragged which is actually pretty annoying and doesn't get much
attention. ( http://hub.qgis.org/issues/4011 ) I think the solution
would be pretty simple. Please read on.

It was introduced by f4d26d6211830a866030a333236dcfbf15e077aa Fix for
resize crash, ticket #2714.
This bugfix disables backbuffering, what fixes the crash but leads to
the beforementioned flickering.

The crash seems to be related to Qt versions (probably 4.6 and 4.7
affected). When I tried to reproduce the crash in 4.8.1 (by reverting
abovementioned patch) I couldn't reproduce the crash. So it is well
possible that this problem has been fixed in Qt upstreams.

But: I myself never could reproduce this crash (due to the lack of a
system with old Qt libs). So, I would be happy if someone familiar with
this problem could confirm that this is fixed with Qt 4.8.

Then there are two possibilities (unless you come up with a third one):

1. Check for qVersion upon every repaint as suggested by Martin Dobias
and then enable/disable the workaround accordingly.

2. Switch the workaround on/off by a pre-compiler constant. This way,
any new distro with Qt=4.8 could be shipped without the workaround-code
being compiled into the binaries.

Any comments on this issue are very welcome, as it makes QGIS look a lot
sweeter :)

Regards

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer



--
Dr. Marco Hugentobler
Sourcepole -  Linux  Open Source Solutions
Weberstrasse 5, CH-8004 Zürich, Switzerland
marco.hugentob...@sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-07 Thread Matthias Kuhn
Thanks for the review and good point.

I'll disable this option and remove it from the dialog on any other than
Q_WS_X11 or do you think this can be useful for Mac as well? (You
diabled some code and mentioned resizing as cause for this)

Regards

On Die, 2012-08-07 at 17:37 +0200, Marco Hugentobler wrote:
 Hi Matthias
 
 I didn't try it yet, but from a first look at the patch source, it seems 
 to me backbuffering is enabled by default:
 
 settings.value( /Map/enableBackbuffer, 1 ).toBool();
 
 That would be ok on X11. But the windows users (who are not affected by 
 the flickering) would loose the paint update / esc key interrupt without 
 having an advantage. So either always execute processEvents() in vector 
 layer for windows or disable backbuffer by default.
 
 Apart from that, the patch looks fine and I'm happy to apply it.
 
 Regards,
 Marco
 
 Am 07.08.2012 11:02, schrieb Matthias Kuhn:
  Hi all,
 
  There is now a config option to turn this fix on and off
  ( Setting=Options=Rendering: Enable backbuffer )
 
  The more people that test it, the better are the chances to get this
  into the main code.
 
  Thanks to everybody who is participating in this discussion and testing!
 
  On Fre, 2012-07-27 at 13:08 +0200, Matthias Kuhn wrote:
  Hi all,
 
  there is this issue report #4011 Map canvas flickers when content is
  dragged which is actually pretty annoying and doesn't get much
  attention. ( http://hub.qgis.org/issues/4011 ) I think the solution
  would be pretty simple. Please read on.
 
  It was introduced by f4d26d6211830a866030a333236dcfbf15e077aa Fix for
  resize crash, ticket #2714.
  This bugfix disables backbuffering, what fixes the crash but leads to
  the beforementioned flickering.
 
  The crash seems to be related to Qt versions (probably 4.6 and 4.7
  affected). When I tried to reproduce the crash in 4.8.1 (by reverting
  abovementioned patch) I couldn't reproduce the crash. So it is well
  possible that this problem has been fixed in Qt upstreams.
 
  But: I myself never could reproduce this crash (due to the lack of a
  system with old Qt libs). So, I would be happy if someone familiar with
  this problem could confirm that this is fixed with Qt 4.8.
 
  Then there are two possibilities (unless you come up with a third one):
 
  1. Check for qVersion upon every repaint as suggested by Martin Dobias
  and then enable/disable the workaround accordingly.
 
  2. Switch the workaround on/off by a pre-compiler constant. This way,
  any new distro with Qt=4.8 could be shipped without the workaround-code
  being compiled into the binaries.
 
  Any comments on this issue are very welcome, as it makes QGIS look a lot
  sweeter :)
 
  Regards
 
  ___
  Qgis-developer mailing list
  Qgis-developer@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/qgis-developer
 
  ___
  Qgis-developer mailing list
  Qgis-developer@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/qgis-developer
 
 


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-07 Thread Marco Hugentobler

I'll disable this option and remove it from the dialog on any other than
Q_WS_X11 or do you think this can be useful for Mac as well?


Disabling is fine for Mac as well (Qt::WA_PaintOnScreen has no effect on 
Mac).


Am 07.08.2012 17:45, schrieb Matthias Kuhn:

Thanks for the review and good point.

I'll disable this option and remove it from the dialog on any other than
Q_WS_X11 or do you think this can be useful for Mac as well? (You
diabled some code and mentioned resizing as cause for this)

Regards

On Die, 2012-08-07 at 17:37 +0200, Marco Hugentobler wrote:

Hi Matthias

I didn't try it yet, but from a first look at the patch source, it seems
to me backbuffering is enabled by default:

settings.value( /Map/enableBackbuffer, 1 ).toBool();

That would be ok on X11. But the windows users (who are not affected by
the flickering) would loose the paint update / esc key interrupt without
having an advantage. So either always execute processEvents() in vector
layer for windows or disable backbuffer by default.

Apart from that, the patch looks fine and I'm happy to apply it.

Regards,
Marco

Am 07.08.2012 11:02, schrieb Matthias Kuhn:

Hi all,

There is now a config option to turn this fix on and off
( Setting=Options=Rendering: Enable backbuffer )

The more people that test it, the better are the chances to get this
into the main code.

Thanks to everybody who is participating in this discussion and testing!

On Fre, 2012-07-27 at 13:08 +0200, Matthias Kuhn wrote:

Hi all,

there is this issue report #4011 Map canvas flickers when content is
dragged which is actually pretty annoying and doesn't get much
attention. ( http://hub.qgis.org/issues/4011 ) I think the solution
would be pretty simple. Please read on.

It was introduced by f4d26d6211830a866030a333236dcfbf15e077aa Fix for
resize crash, ticket #2714.
This bugfix disables backbuffering, what fixes the crash but leads to
the beforementioned flickering.

The crash seems to be related to Qt versions (probably 4.6 and 4.7
affected). When I tried to reproduce the crash in 4.8.1 (by reverting
abovementioned patch) I couldn't reproduce the crash. So it is well
possible that this problem has been fixed in Qt upstreams.

But: I myself never could reproduce this crash (due to the lack of a
system with old Qt libs). So, I would be happy if someone familiar with
this problem could confirm that this is fixed with Qt 4.8.

Then there are two possibilities (unless you come up with a third one):

1. Check for qVersion upon every repaint as suggested by Martin Dobias
and then enable/disable the workaround accordingly.

2. Switch the workaround on/off by a pre-compiler constant. This way,
any new distro with Qt=4.8 could be shipped without the workaround-code
being compiled into the binaries.

Any comments on this issue are very welcome, as it makes QGIS look a lot
sweeter :)

Regards

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer




___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer



--
Dr. Marco Hugentobler
Sourcepole -  Linux  Open Source Solutions
Weberstrasse 5, CH-8004 Zürich, Switzerland
marco.hugentob...@sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-07 Thread Ivan Mincik
On 08/07/2012 05:45 PM, Matthias Kuhn wrote:
 Thanks for the review and good point.
 
 I'll disable this option and remove it from the dialog on any other than
 Q_WS_X11 or do you think this can be useful for Mac as well? (You
 diabled some code and mentioned resizing as cause for this)

Maybe I would disable it also for older QT versions to avoid strange
resizing crashes as we suffer yesterday.

Thanks for Your work.

-- 
Ivan Mincik
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-06 Thread Ivan Mincik
On 08/06/2012 12:10 PM, Matthias Kuhn wrote:
 Hi Ivan,
 
 thank you for testing.
 
 Did you also check if qgis does not crash (as described earlier in this 
 thread, big vector layer, resizing of window)?
 
 I'm considering releasing a configure option as proposed by Marco.


I am getting segfault at window resizing. GDB log and backtrace here [1].

1 - http://pastebin.com/DVYJEKNC



-- 
Ivan Mincik
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-06 Thread Kuhn Matthias, Vermessung
Which patch did you test?

The first one is known to be broken. Are you sure you didn't test this one?


-Ursprüngliche Nachricht-
Von: qgis-developer-boun...@lists.osgeo.org 
[mailto:qgis-developer-boun...@lists.osgeo.org] Im Auftrag von Ivan Mincik
Gesendet: Montag, 6. August 2012 12:25
An: Matthias Kuhn; qgis-developer@lists.osgeo.org
Betreff: Re: [Qgis-developer] Map canvas flickers

On 08/06/2012 12:10 PM, Matthias Kuhn wrote:
 Hi Ivan,
 
 thank you for testing.
 
 Did you also check if qgis does not crash (as described earlier in this 
 thread, big vector layer, resizing of window)?
 
 I'm considering releasing a configure option as proposed by Marco.


I am getting segfault at window resizing. GDB log and backtrace here [1].

1 - http://pastebin.com/DVYJEKNC



--
Ivan Mincik
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-06 Thread Ivan Mincik
On 08/06/2012 01:31 PM, Kuhn Matthias, Vermessung wrote:
 Which patch did you test?
 
 The first one is known to be broken. Are you sure you didn't test this one?

I did my test against second one. I am attaching my backported version
to QGIS 1.8


-- 
Ivan Mincik
diff --git a/src/core/qgsvectorlayer.cpp b/src/core/qgsvectorlayer.cpp
index f2589c3..6922dea 100644
--- a/src/core/qgsvectorlayer.cpp
+++ b/src/core/qgsvectorlayer.cpp
@@ -731,7 +731,7 @@ void QgsVectorLayer::drawRendererV2( QgsRenderContext rendererContext, bool lab
   {
 break;
   }
-
+#if 0 // MK: disable this totally as it breaks QT painting engine (can result in recursive repaint)
 #ifndef Q_WS_MAC //MH: disable this on Mac for now to avoid problems with resizing
   if ( mUpdateThreshold  0  0 == featureCount % mUpdateThreshold )
   {
@@ -745,6 +745,7 @@ void QgsVectorLayer::drawRendererV2( QgsRenderContext rendererContext, bool lab
 qApp-processEvents();
   }
 #endif //Q_WS_MAC
+#endif
 
   bool sel = mSelectedFeatureIds.contains( fet.id() );
   bool drawMarker = ( mEditable  ( !vertexMarkerOnlyForSelection || sel ) );
diff --git a/src/gui/qgsmapcanvas.cpp b/src/gui/qgsmapcanvas.cpp
index ed160aa..5d258f9 100644
--- a/src/gui/qgsmapcanvas.cpp
+++ b/src/gui/qgsmapcanvas.cpp
@@ -84,6 +84,8 @@ QgsMapCanvas::QgsMapCanvas( QWidget * parent, const char *name )
 , mAntiAliasing( false )
 {
   Q_UNUSED( name );
+
+#if 0
   //disable the update that leads to the resize crash
   if ( viewport() )
   {
@@ -91,6 +93,7 @@ QgsMapCanvas::QgsMapCanvas( QWidget * parent, const char *name )
 viewport()-setAttribute( Qt::WA_PaintOnScreen, true );
 #endif //ANDROID
   }
+#endif
 
   mScene = new QGraphicsScene();
   setScene( mScene );
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-06 Thread Kuhn Matthias, Vermessung
If that one still crashes, I'm out of ideas.

The strange thing is, that the warnings you posted on pastebin still appear for 
you. I'm pretty sure they disappeared on my machine. I'm currently working on a 
windows system, so I'm unable to verify right now.

-Ursprüngliche Nachricht-
Von: Ivan Mincik [mailto:ivan.min...@gmail.com] 
Gesendet: Montag, 6. August 2012 14:01
An: Kuhn Matthias, Vermessung; qgis-developer@lists.osgeo.org
Betreff: Re: AW: [Qgis-developer] Map canvas flickers

On 08/06/2012 01:31 PM, Kuhn Matthias, Vermessung wrote:
 Which patch did you test?
 
 The first one is known to be broken. Are you sure you didn't test this one?

I did my test against second one. I am attaching my backported version to QGIS 
1.8


--
Ivan Mincik
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-06 Thread Ivan Mincik
On 08/06/2012 02:11 PM, Kuhn Matthias, Vermessung wrote:
 If that one still crashes, I'm out of ideas.
 
 The strange thing is, that the warnings you posted on pastebin still appear 
 for you. I'm pretty sure they disappeared on my machine. I'm currently 
 working on a windows system, so I'm unable to verify right now.
Maybe a different QT versions. what kind of Qt, Linux distro do You use
? (Debian Squeeze is with 4.6.3 which is quite old)



-- 
Ivan Mincik
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-06 Thread Kuhn Matthias, Vermessung
I'm on Fedora Core 17, Qt 4.8.
But it seems odd to me, that qt changed these warnings, as there is a good 
reason for them to appear in the unpatched code and in the case they still 
appear with the patched code there would be a second call that can result in a 
paint event somewhere.
Just to be sure: is you qgis loading the correct qgis_core library (i.e. 
LD_LIBRARY_PATH is set or equivalent other measures taken)

-Ursprüngliche Nachricht-
Von: Ivan Mincik [mailto:ivan.min...@gmail.com] 
Gesendet: Montag, 6. August 2012 14:26
An: Kuhn Matthias, Vermessung; qgis-developer@lists.osgeo.org
Betreff: Re: AW: AW: [Qgis-developer] Map canvas flickers

On 08/06/2012 02:11 PM, Kuhn Matthias, Vermessung wrote:
 If that one still crashes, I'm out of ideas.
 
 The strange thing is, that the warnings you posted on pastebin still appear 
 for you. I'm pretty sure they disappeared on my machine. I'm currently 
 working on a windows system, so I'm unable to verify right now.
Maybe a different QT versions. what kind of Qt, Linux distro do You use ? 
(Debian Squeeze is with 4.6.3 which is quite old)



--
Ivan Mincik
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-06 Thread Ivan Mincik
On 08/06/2012 03:00 PM, Kuhn Matthias, Vermessung wrote:
 I'm on Fedora Core 17, Qt 4.8.
 But it seems odd to me, that qt changed these warnings, as there is a good 
 reason for them to appear in the unpatched code and in the case they still 
 appear with the patched code there would be a second call that can result in 
 a paint event somewhere.
 Just to be sure: is you qgis loading the correct qgis_core library (i.e. 
 LD_LIBRARY_PATH is set or equivalent other measures taken)


Yes I set export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/ivo/apps/lib/

And I have:
~/apps/bin$ ldd qgis | grep qgis
libqgis_core.so.1.8.0 = /home/ivo/apps/lib/libqgis_core.so.1.8.0
(0xb57b3000)
libqgis_gui.so.1.8.0 = /home/ivo/apps/lib/libqgis_gui.so.1.8.0
(0xb54fb000)
libqgis_analysis.so.1.8.0 =
/home/ivo/apps/lib/libqgis_analysis.so.1.8.0 (0xb5472000)


I will try a clean build.


-- 
Ivan Mincik
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-06 Thread Ivan Mincik
On Mon, 2012-08-06 at 14:34 +, Kuhn Matthias, Vermessung wrote:
 I don't think that's the problem.
 I'll try to reproduce as soon as I'm back on my machine

I have a good news. When building on Debian Wheezy with Gnome 3 and QT
4.8.2 I have no QPainter warnings and no resize crashes. Strange, but
maybe a newer QT has fixed something.

Thanks for You work Matthias.



-- 
Ivan Mincik ivan.min...@gmail.com


signature.asc
Description: This is a digitally signed message part
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-06 Thread Matthias Kuhn
Thank you for the information Ivan,
I was already setting up a virtual machine on Squeeze to verify.

if I understand correctly, you tested a patched 1.8?

I'll fork 1.8 and commit a configurable fix for this, so hopefully we
can get this as a quickfix to be released with the next 1.8 upgrade on
the distros.


On Mon, 2012-08-06 at 20:49 +0200, Ivan Mincik wrote:
 On Mon, 2012-08-06 at 14:34 +, Kuhn Matthias, Vermessung wrote:
  I don't think that's the problem.
  I'll try to reproduce as soon as I'm back on my machine
 
 I have a good news. When building on Debian Wheezy with Gnome 3 and QT
 4.8.2 I have no QPainter warnings and no resize crashes. Strange, but
 maybe a newer QT has fixed something.
 
 Thanks for You work Matthias.
 
 
 
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-06 Thread Salvatore Larosa
2012/8/6 Ivan Mincik ivan.min...@gmail.com

 On Mon, 2012-08-06 at 14:34 +, Kuhn Matthias, Vermessung wrote:
  I don't think that's the problem.
  I'll try to reproduce as soon as I'm back on my machine

 I have a good news. When building on Debian Wheezy with Gnome 3 and QT
 4.8.2 I have no QPainter warnings and no resize crashes. Strange, but
 maybe a newer QT has fixed something.

 Thanks for You work Matthias.


Do you mean with or without the patch?
I am on Debian/weezy (GNOME 3) with QGIS (current master) compiled against
QT 4.8.2 and I get QPainter warnings on resize!
Are you sure you compiled with CMAKE_BUILD_TYPE = Debug?
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-06 Thread Ivan Mincik
On Mon, 2012-08-06 at 21:20 +0200, Salvatore Larosa wrote:
 2012/8/6 Ivan Mincik ivan.min...@gmail.com
 On Mon, 2012-08-06 at 14:34 +, Kuhn Matthias, Vermessung
 wrote:
  I don't think that's the problem.
  I'll try to reproduce as soon as I'm back on my machine
 
 
 I have a good news. When building on Debian Wheezy with Gnome
 3 and QT
 4.8.2 I have no QPainter warnings and no resize crashes.
 Strange, but
 maybe a newer QT has fixed something.
 
 Thanks for You work Matthias.
 
 
 Do you mean with or without the patch?
I mean WITH patch (on release-1_8 branch, with little adjusting to fit
to this version).

 I am on Debian/weezy (GNOME 3) with QGIS (current master) compiled
 against QT 4.8.2 and I get QPainter warnings on resize!
Did You applied patch ?

 Are you sure you compiled with CMAKE_BUILD_TYPE = Debug?
I am not sure I really need CMAKE_BUILD_TYPE = Debug, but I am building
it with debug option set now to be sure.


-- 
Ivan Mincik ivan.min...@gmail.com


signature.asc
Description: This is a digitally signed message part
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-06 Thread Salvatore Larosa
2012/8/6 Ivan Mincik ivan.min...@gmail.com

 On Mon, 2012-08-06 at 21:20 +0200, Salvatore Larosa wrote:
  2012/8/6 Ivan Mincik ivan.min...@gmail.com
  On Mon, 2012-08-06 at 14:34 +, Kuhn Matthias, Vermessung
  wrote:
   I don't think that's the problem.
   I'll try to reproduce as soon as I'm back on my machine
 
 
  I have a good news. When building on Debian Wheezy with Gnome
  3 and QT
  4.8.2 I have no QPainter warnings and no resize crashes.
  Strange, but
  maybe a newer QT has fixed something.
 
  Thanks for You work Matthias.
 
 
  Do you mean with or without the patch?
 I mean WITH patch (on release-1_8 branch, with little adjusting to fit
 to this version).

  I am on Debian/weezy (GNOME 3) with QGIS (current master) compiled
  against QT 4.8.2 and I get QPainter warnings on resize!
 Did You applied patch ?

  Are you sure you compiled with CMAKE_BUILD_TYPE = Debug?
 I am not sure I really need CMAKE_BUILD_TYPE = Debug, but I am building
 it with debug option set now to be sure.


Sorry, but my test was without patch!
Anyway I did try the patch in current master and the flickering is
disappear, but when run QGIS I get an exception: std::bad_alloc.

can it is avoid?
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-06 Thread Ivan Mincik

 Are you sure you compiled with CMAKE_BUILD_TYPE = Debug?

No warnings with CMAKE_BUILD_TYPE = Debug. No crashes on resize.


-- 
Ivan Mincik ivan.min...@gmail.com


signature.asc
Description: This is a digitally signed message part
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-06 Thread Ivan Mincik
 if I understand correctly, you tested a patched 1.8?

Yes.


-- 
Ivan Mincik ivan.min...@gmail.com


signature.asc
Description: This is a digitally signed message part
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-06 Thread Ivan Mincik


 Sorry, but my test was without patch!
 Anyway I did try the patch in current master and the flickering is
 disappear, but when run QGIS I get an exception: std::bad_alloc.
 
 can it is avoid?

It could be some another problem with master. Are You sure it happens
only with the patch? Did You applied correct version (mine version is
for 1.8, Matthias's is for master) ?


-- 
Ivan Mincik ivan.min...@gmail.com


signature.asc
Description: This is a digitally signed message part
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-06 Thread Salvatore Larosa
2012/8/6 Ivan Mincik ivan.min...@gmail.com



  Sorry, but my test was without patch!
  Anyway I did try the patch in current master and the flickering is
  disappear, but when run QGIS I get an exception: std::bad_alloc.
 
  can it is avoid?

 It could be some another problem with master. Are You sure it happens
 only with the patch? Did You applied correct version (mine version is
 for 1.8, Matthias's is for master) ?


Yes, it only occurs with the patch and when I run QGIS by shell!
I applied the patch as in attached, is it correct?


diff_qgis_master.patch
Description: Binary data
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-06 Thread Ivan Mincik
On Mon, 2012-08-06 at 22:43 +0200, Salvatore Larosa wrote:
 2012/8/6 Ivan Mincik ivan.min...@gmail.com
 
 
  Sorry, but my test was without patch!
  Anyway I did try the patch in current master and the
 flickering is
  disappear, but when run QGIS I get an exception:
 std::bad_alloc.
 
  can it is avoid?
 
 
 It could be some another problem with master. Are You sure it
 happens
 only with the patch? Did You applied correct version (mine
 version is
 for 1.8, Matthias's is for master) ?
 
 
 Yes, it only occurs with the patch and when I run QGIS by shell!
 I applied the patch as in attached, is it correct?
 
Seems a good one.

 
 
 


-- 
Ivan Mincik ivan.min...@gmail.com


signature.asc
Description: This is a digitally signed message part
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-04 Thread Matthias Kuhn
Hi Ivan,

As far as I can see, it is very likely that these issues are related.

If you want to be sure and you are able to compile qgis by yourself, you
can check the patch I attached in the other thread.

Regards


On Fri, 2012-08-03 at 22:05 +0200, Ivan Mincik wrote:
 Hi Matthias,
 do you think that this problem is the same as discussed it this [1]
 thread ?
 
 Thanks for interest to this issue.
 
 
 1 -
 http://lists.osgeo.org/pipermail/qgis-developer/2012-August/021472.html
 
 
 


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-03 Thread Ivan Mincik
Hi Matthias,
do you think that this problem is the same as discussed it this [1]
thread ?

Thanks for interest to this issue.


1 -
http://lists.osgeo.org/pipermail/qgis-developer/2012-August/021472.html



-- 
Ivan Mincik ivan.min...@gmail.com


signature.asc
Description: This is a digitally signed message part
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-08-03 Thread Marco Hugentobler

I could still invest a little more time to resolv this issue, but if the threading 
branch will be ready for the next release anyway (and this surely is the way 
to go) there is probably more important work to be done now.


Yes, I also think it is not worth to invest too much time for a 
short-term fix. Maybe it would be good to have a user option to choose 
between flickering  vs no interuption and no incremental update on X11. 
That would be a very quick thing to implement.


Marco

On 03.08.2012 08:56, Kuhn Matthias, Vermessung wrote:

Hi Marco,

I start to see the real problem. It's a pretty tough one to solve without the 
threading branch.

One solution I could think of is to ignore certain (problematic) events while 
rendering vector layers. This would enable us to still process key events (e.g. 
for esc) but I think partial drawing of vector layers will remain problematic 
(as this implies triggering a repaint afaics).

As I'm not sure a) if this approach really works and b) it has no side-effects 
and c) it does only solve part of the problem I'm really wondering if it's 
worth it.

I could still invest a little more time to resolv this issue, but if the 
threading branch will be ready for the next release anyway (and this surely is 
the way to go) there is probably more important work to be done now.

Regards,
Matthias
  


-Ursprüngliche Nachricht-
Von: qgis-developer-boun...@lists.osgeo.org 
[mailto:qgis-developer-boun...@lists.osgeo.org] Im Auftrag von Marco Hugentobler
Gesendet: Donnerstag, 2. August 2012 16:33
Cc: qgis-developer@lists.osgeo.org
Betreff: Re: [Qgis-developer] Map canvas flickers

Hi Matthias

Disabling that piece of code means there is no possibility to interrupt long 
rendering with the 'esc' key. Also the possibility to have an incremental 
screen update will be gone (e.g. every 1 features).

Regards,
Marco

Am 01.08.2012 17:59, schrieb Matthias Kuhn:

Hi Marco,

You're right, this patch does not work. I don't really know it passed
the tests I did here. My environment was pretty messy.

I had a look at it again today and tracked down the warning that
appeared before the crashes (QWidget::repaint: Recursive repaint
detected).
This led me to the code in qgsvectorlayer I changed in the attached
patch. It looks to me as if this patch really fixes the problem.
Still, I'd be happy if you could review the patch, because I don't
know, what side-effects it could cause. I think you know what the code
I removed did (The initials MH probably say that you already disabled
this for
Mac)

Regards,
Matthias


On Fri, 2012-07-27 at 16:19 +0200, Marco Hugentobler wrote:

I still have the crash with the patch (Qt::WA_NativeWindow) on my
machine (Qt 4.8.1).

Regards,
Marco

Am 27.07.2012 15:10, schrieb Matthias Kuhn:


Hi Marco,

thank you for verifying and advises on how to reproduce. I missed
the part with without releasing the mouse

I have created a patch that resolves the issue here. Can you please
check the patch and commit it if it works for you as well.

Thank you,
Matthias


On Fri, 2012-07-27 at 13:28 +0200, Marco Hugentobler wrote:

Hi Matthias

I still have the resize crash with Qt 4.8.1. To reproduce, load a
layer with many objects. Go with the mouse to the right corner and
resize several times without releasing the mouse. After the mouse
release, the crash occures.
Note: this problem (and the flicker with the workaround) is X11 only.
But still, Linux is the most important platform.
Btw, the threading branch would be the clean solution for the
issue. But if you have another workaround in the short-term, let me know.

Regards,
Marco


Am 27.07.2012 13:08, schrieb Matthias Kuhn:

Hi all,

there is this issue report #4011 Map canvas flickers when content
is dragged which is actually pretty annoying and doesn't get much
attention. ( http://hub.qgis.org/issues/4011 ) I think the
solution would be pretty simple. Please read on.

It was introduced by f4d26d6211830a866030a333236dcfbf15e077aa Fix
for resize crash, ticket #2714.
This bugfix disables backbuffering, what fixes the crash but leads
to the beforementioned flickering.

The crash seems to be related to Qt versions (probably 4.6 and 4.7
affected). When I tried to reproduce the crash in 4.8.1 (by
reverting abovementioned patch) I couldn't reproduce the crash. So
it is well possible that this problem has been fixed in Qt upstreams.

But: I myself never could reproduce this crash (due to the lack of
a system with old Qt libs). So, I would be happy if someone
familiar with this problem could confirm that this is fixed with Qt 4.8.

Then there are two possibilities (unless you come up with a third one):

1. Check for qVersion upon every repaint as suggested by Martin
Dobias and then enable/disable the workaround accordingly.

2. Switch the workaround on/off by a pre-compiler constant. This
way, any new distro with Qt=4.8 could be shipped without the
workaround-code being compiled into the binaries.

Any comments

Re: [Qgis-developer] Map canvas flickers

2012-07-27 Thread Marco Hugentobler

Hi Matthias

I still have the resize crash with Qt 4.8.1. To reproduce, load a layer 
with many objects. Go with the mouse to the right corner and resize 
several times without releasing the mouse. After the mouse release, the 
crash occures.
Note: this problem (and the flicker with the workaround) is X11 only. 
But still, Linux is the most important platform.
Btw, the threading branch would be the clean solution for the issue. But 
if you have another workaround in the short-term, let me know.


Regards,
Marco


Am 27.07.2012 13:08, schrieb Matthias Kuhn:

Hi all,

there is this issue report #4011 Map canvas flickers when content is
dragged which is actually pretty annoying and doesn't get much
attention. ( http://hub.qgis.org/issues/4011 ) I think the solution
would be pretty simple. Please read on.

It was introduced by f4d26d6211830a866030a333236dcfbf15e077aa Fix for
resize crash, ticket #2714.
This bugfix disables backbuffering, what fixes the crash but leads to
the beforementioned flickering.

The crash seems to be related to Qt versions (probably 4.6 and 4.7
affected). When I tried to reproduce the crash in 4.8.1 (by reverting
abovementioned patch) I couldn't reproduce the crash. So it is well
possible that this problem has been fixed in Qt upstreams.

But: I myself never could reproduce this crash (due to the lack of a
system with old Qt libs). So, I would be happy if someone familiar with
this problem could confirm that this is fixed with Qt 4.8.

Then there are two possibilities (unless you come up with a third one):

1. Check for qVersion upon every repaint as suggested by Martin Dobias
and then enable/disable the workaround accordingly.

2. Switch the workaround on/off by a pre-compiler constant. This way,
any new distro with Qt=4.8 could be shipped without the workaround-code
being compiled into the binaries.

Any comments on this issue are very welcome, as it makes QGIS look a lot
sweeter :)

Regards

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer



--
Dr. Marco Hugentobler
Sourcepole -  Linux  Open Source Solutions
Weberstrasse 5, CH-8004 Zürich, Switzerland
marco.hugentob...@sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Map canvas flickers

2012-07-27 Thread Marco Hugentobler
I still have the crash with the patch (Qt::WA_NativeWindow) on my 
machine (Qt 4.8.1).


Regards,
Marco

Am 27.07.2012 15:10, schrieb Matthias Kuhn:

Hi Marco,

thank you for verifying and advises on how to reproduce. I missed the
part with without releasing the mouse

I have created a patch that resolves the issue here. Can you please
check the patch and commit it if it works for you as well.

Thank you,
Matthias


On Fri, 2012-07-27 at 13:28 +0200, Marco Hugentobler wrote:

Hi Matthias

I still have the resize crash with Qt 4.8.1. To reproduce, load a layer
with many objects. Go with the mouse to the right corner and resize
several times without releasing the mouse. After the mouse release, the
crash occures.
Note: this problem (and the flicker with the workaround) is X11 only.
But still, Linux is the most important platform.
Btw, the threading branch would be the clean solution for the issue. But
if you have another workaround in the short-term, let me know.

Regards,
Marco


Am 27.07.2012 13:08, schrieb Matthias Kuhn:

Hi all,

there is this issue report #4011 Map canvas flickers when content is
dragged which is actually pretty annoying and doesn't get much
attention. ( http://hub.qgis.org/issues/4011 ) I think the solution
would be pretty simple. Please read on.

It was introduced by f4d26d6211830a866030a333236dcfbf15e077aa Fix for
resize crash, ticket #2714.
This bugfix disables backbuffering, what fixes the crash but leads to
the beforementioned flickering.

The crash seems to be related to Qt versions (probably 4.6 and 4.7
affected). When I tried to reproduce the crash in 4.8.1 (by reverting
abovementioned patch) I couldn't reproduce the crash. So it is well
possible that this problem has been fixed in Qt upstreams.

But: I myself never could reproduce this crash (due to the lack of a
system with old Qt libs). So, I would be happy if someone familiar with
this problem could confirm that this is fixed with Qt 4.8.

Then there are two possibilities (unless you come up with a third one):

1. Check for qVersion upon every repaint as suggested by Martin Dobias
and then enable/disable the workaround accordingly.

2. Switch the workaround on/off by a pre-compiler constant. This way,
any new distro with Qt=4.8 could be shipped without the workaround-code
being compiled into the binaries.

Any comments on this issue are very welcome, as it makes QGIS look a lot
sweeter :)

Regards

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer





___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer



--
Dr. Marco Hugentobler
Sourcepole -  Linux  Open Source Solutions
Weberstrasse 5, CH-8004 Zürich, Switzerland
marco.hugentob...@sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer