Bug 68300 - GTK3 - Crash when moving window on Windows XP
Summary: GTK3 - Crash when moving window on Windows XP
Status: RESOLVED DUPLICATE of bug 70348
Alias: None
Product: pixman
Classification: Unclassified
Component: pixman (show other bugs)
Version: other
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Søren Sandmann Pedersen
QA Contact: Søren Sandmann Pedersen
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-20 05:40 UTC by Mikkel Kruse Johnsen
Modified: 2013-10-17 15:17 UTC (History)
5 users (show)

See Also:
i915 platform:
i915 features:


Attachments
quick hack (850 bytes, patch)
2013-09-17 10:08 UTC, Massimo
Details | Splinter Review

Description Mikkel Kruse Johnsen 2013-08-20 05:40:00 UTC
Gtk app crashes when window is moved.

1)  Launch any gtk-win32 app
2)  Right-click the application's title bar and select 'Move'
3)  Without clicking your mouse yet, move the mouse, then left-click it, anywhere outside of the app
4)  Right-click the title bar again and your app will crash

See this bug report: https://bugzilla.redhat.com/show_bug.cgi?id=995059


I recompiled pixman 0.30.2 with "--disable-sse2" and it now works on Windows XP.
Comment 1 Søren Sandmann Pedersen 2013-08-23 15:42:39 UTC
This bug likely needs to be debugged by someone who uses Windows. There is another report here, which is probably the same bug:

    http://lists.freedesktop.org/archives/cairo/2013-June/024436.html

Also here:

    http://lists.freedesktop.org/archives/cairo/2013-May/024300.html
Comment 2 Kalev Lember 2013-09-04 18:09:42 UTC
Paweł Forysiuk bisected this to a regression in http://cgit.freedesktop.org/pixman/commit/?id=934c9d8546b71ddea91ac16b0928101903e2608e

I'm just posting on behalf of him as he doesn't have a bugzilla account here.
Comment 3 Massimo 2013-09-17 10:08:20 UTC
Created attachment 85961 [details] [review]
quick hack

Nightly builds of GIMP on Windows (32 bits) suffer from this same problem:

https://bugzilla.gnome.org/show_bug.cgi?id=707653


The attached patch fixes the crash in the cases I was able
to repeatedly trigger.

But judging from the output of

i686-w64-mingw32-objdump -d .libs/*pixman-sse2.o | grep '\(movdqa.*esp\|>:\)'

it is possible that other functions would better be tagged like that,
or, alternatively, you could add -mstackrealign to 
libpixman_sse2_la_CFLAGS in pixman/Makefile.am on Win32.
Comment 4 Søren Sandmann Pedersen 2013-09-17 20:57:27 UTC
(In reply to comment #3)

> The attached patch fixes the crash in the cases I was able
> to repeatedly trigger.
> 
> But judging from the output of
> 
> i686-w64-mingw32-objdump -d .libs/*pixman-sse2.o | grep '\(movdqa.*esp\|>:\)'
> 
> it is possible that other functions would better be tagged like that,
> or, alternatively, you could add -mstackrealign to 
> libpixman_sse2_la_CFLAGS in pixman/Makefile.am on Win32.

The old unaligned stack pointer issue. This is basically a GCC bug, IMO:

1. movdqa requires aligned stack
2. The Windows ABI doesn't guarantee aligned stack

Therefore GCC should not emit movdqa unless it makes sure to realign the stack. Yet when compiled with -msse2, it does.

At this point, it's probably simpler to just require GCC >= 4.5.0 for SSE2 and SSSE3, and then use -mstackrealign when compiling pixman-sse2.c. The reason we didn't in the past is that 4.5 was too new to depend on.

The alternative would be to duplicate the force-align stuff anywhere we end up calling into SSE2 compositing routines; that is, at least:

   pixman_image_composite32,
   pixman_composite_glyphs,
   pixman_composite_glyphs_no_mask,
   pixman_composite_trapezoids,
   pixman_composite_triangles,

If someone decides to write a patch to fix this, please use

    git send-email

or

    git format-patch

to send it to the mailing list at pixman@lists.freedesktop.org.
Comment 5 Søren Sandmann Pedersen 2013-10-03 00:38:10 UTC
If someone can test this branch on Windows:

    http://cgit.freedesktop.org/~sandmann/pixman/log/?h=stackrealign

I'd appreciate it. I believe the bug should be fixed there.
Comment 6 Yaakov Selkowitz 2013-10-03 02:04:04 UTC
(In reply to comment #5)
> If someone can test this branch on Windows:
> 
>     http://cgit.freedesktop.org/~sandmann/pixman/log/?h=stackrealign
> 
> I'd appreciate it. I believe the bug should be fixed there.

Confirmed for Cygwin.
Comment 7 Søren Sandmann Pedersen 2013-10-17 15:17:40 UTC

*** This bug has been marked as a duplicate of bug 70348 ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.