After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 653985 - Pango 1.29.x make GTK3-demo.exe crashed in Windows
Pango 1.29.x make GTK3-demo.exe crashed in Windows
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
1.29.x
Other Windows
: Normal critical
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2011-07-05 05:17 UTC by ray_linn
Modified: 2011-07-12 02:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
call stack (69.68 KB, image/jpeg)
2011-07-05 05:17 UTC, ray_linn
  Details
Don't define PangoFallbackEngine as abstract type (985 bytes, patch)
2011-07-11 07:08 UTC, Kalev Lember
none Details | Review
basic-win32.c: Fix exported symbol names with autotools build (3.00 KB, patch)
2011-07-11 09:33 UTC, Kalev Lember
none Details | Review

Description ray_linn 2011-07-05 05:17:21 UTC
Today I upgraded Pango from 1.28.4 to 1.29.3, the make and make check reporting no error, but after compiled with GTK+-3.1.6, and try to run GTK3-demo.exe, this program crashed at once. Issue is the same for 1.29.1.

Overwrote the libpango-1.0.dll with the one from 1.28.4, the program could launch now. Looks the root cause is due to some change in 1.29.X.

WinDbg shows a write access vialotion happend in the code of pango

(1964.1454): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\msys\1.0\local\bin\libpango-1.0-0.dll - 
libpango_1_0_0!pango_engine_shape_get_type+0xd9:
00000000`6559375b 488b00          mov     rax,qword ptr [rax] ds:00000000`00000000=????????????????


assembly code:

00000000`65593719 55              push    rbp
00000000`6559371a 4889e5          mov     rbp,rsp
00000000`6559371d 48894d10        mov     qword ptr [rbp+10h],rcx
00000000`65593721 488b4510        mov     rax,qword ptr [rbp+10h]
00000000`65593725 488d15d7feffff  lea     rdx,[libpango_1_0_0!pango_engine_lang_get_type+0xa1 (00000000`65593603)]
00000000`6559372c 48899090000000  mov     qword ptr [rax+90h],rdx
00000000`65593733 5d              pop     rbp
00000000`65593734 c3              ret
00000000`65593735 55              push    rbp
00000000`65593736 4889e5          mov     rbp,rsp
00000000`65593739 4883ec30        sub     rsp,30h
00000000`6559373d 48894d10        mov     qword ptr [rbp+10h],rcx
00000000`65593741 48895518        mov     qword ptr [rbp+18h],rdx
00000000`65593745 4c894520        mov     qword ptr [rbp+20h],r8
00000000`65593749 44894d28        mov     dword ptr [rbp+28h],r9d
00000000`6559374d 488b4538        mov     rax,qword ptr [rbp+38h]
00000000`65593751 c70000000000    mov     dword ptr [rax],0
00000000`65593757 488b4510        mov     rax,qword ptr [rbp+10h]
00000000`6559375b 488b00          mov     rax,qword ptr [rax] ds:00000000`00000000=????????????????
00000000`6559375e 4c8b9088000000  mov     r10,qword ptr [rax+88h]
00000000`65593765 448b4528        mov     r8d,dword ptr [rbp+28h]
00000000`65593769 488b4d20        mov     rcx,qword ptr [rbp+20h]
00000000`6559376d 488b4518        mov     rax,qword ptr [rbp+18h]
00000000`65593771 488b5538        mov     rdx,qword ptr [rbp+38h]
00000000`65593775 4889542428      mov     qword ptr [rsp+28h],rdx
00000000`6559377a 488b5530        mov     rdx,qword ptr [rbp+30h]
00000000`6559377e 4889542420      mov     qword ptr [rsp+20h],rdx
00000000`65593783 4589c1          mov     r9d,r8d
00000000`65593786 4989c8          mov     r8,rcx
00000000`65593789 4889c2          mov     rdx,rax
00000000`6559378c 488b4d10        mov     rcx,qword ptr [rbp+10h]
00000000`65593790 41ffd2          call    r10
00000000`65593793 90              nop
00000000`65593794 4883c430        add     rsp,30h
00000000`65593798 5d              pop     rbp
00000000`65593799 c3              ret
00000000`6559379a 55              push    rbp

call statck is as attached.
Comment 1 ray_linn 2011-07-05 05:17:55 UTC
Created attachment 191265 [details]
call stack
Comment 2 ray_linn 2011-07-05 05:28:13 UTC
add some warning message which only appears on 1.29.x

$ gtk3-demo.exe

(gtk3-demo.exe:6012): Pango-WARNING **: failed to choose a font, expect ugly out
put. engine-type='PangoRenderWin32', script='latin'

(gtk3-demo.exe:6012): GLib-GObject-WARNING **: cannot create instance of abstrac
t (non-instantiatable) type `PangoFallbackEngine'

(gtk3-demo.exe:6012): GLib-GObject-WARNING **: cannot create instance of abstrac
t (non-instantiatable) type `PangoFallbackEngine'
Comment 3 Kalev Lember 2011-07-11 07:08:30 UTC
Created attachment 191682 [details] [review]
Don't define PangoFallbackEngine as abstract type

This patch should make the abstract PangoFallbackEngine warnings go away and fix the crash; ray_linn can you test if it makes it any better for you?
Comment 4 Kalev Lember 2011-07-11 09:33:47 UTC
Created attachment 191686 [details] [review]
basic-win32.c: Fix exported symbol names with autotools build

Similar to d9e254f which changed the rest of the modules, moved the
PANGO_MODULE_PREFIX define from basic-win32.c to the VS9 project file to
avoid breaking autotools build.

Fixes basic-win32 module loading when pango is built with autotools +
MinGW.
Comment 5 Kalev Lember 2011-07-11 09:38:10 UTC
ray_linn: If you are testing the patches, please test attachment #191682 [details] first as it fixes the fallback engine and that code path is hopefully never reached once you've applied attachment #191686 [details].
Comment 6 ray_linn 2011-07-11 11:54:29 UTC
Hi, Kalev

I have a quick pilot ,and the patch works, the program now could run correctly.

Thanks a lot for the effort.


Regards
Ray Linn
Comment 7 Behdad Esfahbod 2011-07-12 02:25:27 UTC
Both pushed to master.  Thanks!