Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fontforge crashing when close kerning pairs window on windows #2681

Closed
zoghal opened this issue Apr 6, 2016 · 9 comments · Fixed by #2683
Closed

fontforge crashing when close kerning pairs window on windows #2681

zoghal opened this issue Apr 6, 2016 · 9 comments · Fixed by #2683

Comments

@zoghal
Copy link

zoghal commented Apr 6, 2016

When reporting a bug/issue:

  • [ x] The FontForge version and the operating system you're using : fontforge April 20160404 release; windows 7 x64

When you open an issue for a change/improvement/feature request:

  • [x ] A description of the problem you're trying to solve, including why you think this is a problem :
    fontforge is crash when i do save any changes kerning pairs

debug console :


warning: section .gnu_debuglink not found in F:\FontForgeBuilds\bin\.debug\fontforge.debug
[New Thread 14624.0x34d0]
warning: section .gnu_debuglink not found in F:\FontForgeBuilds\bin\.debug\libfontforgeexe-2.debug
warning: section .gnu_debuglink not found in F:\FontForgeBuilds\bin\.debug\libgdraw-5.debug
warning: section .gnu_debuglink not found in F:\FontForgeBuilds\bin\.debug\libgutils-2.debug
warning: section .gnu_debuglink not found in F:\FontForgeBuilds\bin\.debug\libgunicode-4.debug
warning: section .gnu_debuglink not found in F:\FontForgeBuilds\bin\.debug\libuninameslist-0.debug
warning: section .gnu_debuglink not found in F:\FontForgeBuilds\bin\.debug\libcairo-2.debug
warning: section .gnu_debuglink not found in F:\FontForgeBuilds\bin\.debug\libX11-xcb-1.debug
warning: section .gnu_debuglink not found in F:\FontForgeBuilds\bin\.debug\libX11-6.debug
warning: section .gnu_debuglink not found in F:\FontForgeBuilds\bin\.debug\libxcb-1.debug
warning: section .gnu_debuglink not found in F:\FontForgeBuilds\bin\.debug\libXau-6.debug
warning: section .gnu_debuglink not found in F:\FontForgeBuilds\bin\.debug\libxcb-render-0.debug
warning: section .gnu_debuglink not found in F:\FontForgeBuilds\bin\.debug\libpango-1.0-0.debug
warning: section .gnu_debuglink not found in F:\FontForgeBuilds\bin\.debug\libpangocairo-1.0-0.debug
warning: section .gnu_debuglink not found in F:\FontForgeBuilds\bin\.debug\libpangoft2-1.0-0.debug
warning: section .gnu_debuglink not found in F:\FontForgeBuilds\bin\.debug\libpangowin32-1.0-0.debug
warning: section .gnu_debuglink not found in F:\FontForgeBuilds\bin\.debug\libpangoxft-1.0-0.debug
warning: section .gnu_debuglink not found in F:\FontForgeBuilds\bin\.debug\libXft-2.debug
warning: section .gnu_debuglink not found in F:\FontForgeBuilds\bin\.debug\libXrender-1.debug
warning: section .gnu_debuglink not found in F:\FontForgeBuilds\bin\.debug\libfontforge-2.debug
warning: section .gnu_debuglink not found in F:\FontForgeBuilds\bin\.debug\libspiro-0.debug
warning: Python failed to load the default activation context

[New Thread 14624.0x3740]
[New Thread 14624.0x35cc]
[New Thread 14624.0x3050]
warning: Invalid parameter passed to C runtime function.


Program received signal SIGSEGV, Segmentation fault.
0x77d02372 in ntdll!RtlEnterCriticalSection () from C:\Windows\SysWOW64\ntdll.dll
#0  0x77d02372 in ntdll!RtlEnterCriticalSection () from C:\Windows\SysWOW64\ntdll.dll
#1  0x61ed5eb7 in lock_file () from F:\FontForgeBuilds\bin\libintl-8.dll
#2  0x61eceb81 in libintl-8!bind_textdomain_codeset () from F:\FontForgeBuilds\bin\libintl-8.dll
#3  0x61ecad38 in libintl_vfprintf () from F:\FontForgeBuilds\bin\libintl-8.dll
#4  0x61ecad5f in libintl_fprintf () from F:\FontForgeBuilds\bin\libintl-8.dll
#5  0x00a20db9 in SFD_DumpLookup (sfd=0x0, sf=0x34468a8) at sfd.c:2137
#6  0x63701f90 in SFDCreateUndoForLookup (sf=0x34468a8, lookup_type=258) at lookupui.c:3742
#7  0x63702e26 in PSTKD_Ok (g=0x48cd9d0, e=0x28df48) at lookupui.c:4074
#8  0x6ef8b7e1 in GButtonInvoked (b=0x48cd9d0, ev=0x28e244) at gbuttons.c:255
#9  0x6ef8c40b in gbutton_mouse (g=0x48cd9d0, event=0x28e244) at gbuttons.c:483
#10 0x6ef94566 in _GWidget_Container_eh (gw=0x37a06c8, event=0x28e244) at gcontainer.c:302
#11 0x6ef95c70 in _GWidget_TopLevel_eh (gw=0x37a06c8, event=0x28e244) at gcontainer.c:745
#12 0x6eff7e38 in dispatchEvent (gdisp=0x6999a8, event=0x28e2ec) at gxdraw.c:3297
#13 0x6eff7f31 in GXDrawProcessOneEvent (gdisp=0x6999a8) at gxdraw.c:3329
#14 0x6ef9866d in GDrawProcessOneEvent (gdisp=0x6999a8) at gdraw.c:771
#15 0x6370688e in PSTKernD (sf=0x34468a8, sub=0x3423ed0, def_layer=1) at lookupui.c:4965
#16 0x6370a571 in _LookupSubtableContents (sf=0x34468a8, sub=0x3423ed0, sd=0x0, def_layer=1) at lookupui.c:5951
#17 0x636aa4b0 in LookupSubtableContents (gfi=0x370b8f0, isgpos=1) at fontinfo.c:6005
#18 0x636afc29 in LookupMouse (gfi=0x370b8f0, isgpos=1, event=0x28f784) at fontinfo.c:7400
#19 0x636afee1 in lookups_e_h (gw=0x3793da8, event=0x28f784, isgpos=1) at fontinfo.c:7444
#20 0x636aff6b in gposlookups_e_h (gw=0x3793da8, event=0x28f784) at fontinfo.c:7459
#21 0x6f00a8fd in drawable_e_h (pixmap=0x3793da8, event=0x28f784) at gdrawable.c:215
#22 0x6ef94b9c in _GWidget_Container_eh (gw=0x3793da8, event=0x28f784) at gcontainer.c:403
#23 0x6eff7e38 in dispatchEvent (gdisp=0x6999a8, event=0x28f828) at gxdraw.c:3297
#24 0x6eff81b9 in GXDrawEventLoop (gd=0x6999a8) at gxdraw.c:3405
#25 0x6ef98712 in GDrawEventLoop (gdisp=0x6999a8) at gdraw.c:791
#26 0x63798381 in fontforge_main (argc=2, argv=0x3b7e20) at startui.c:1373
#27 0x00401650 in main (argc=2, argv=0x3b7e20) at main.c:39
$1 = "locals..."
No symbol table info available.
#1  0x61ed5eb7 in lock_file () from F:\FontForgeBuilds\bin\libintl-8.dll
No symbol table info available.
#2  0x61eceb81 in libintl-8!bind_textdomain_codeset () from F:\FontForgeBuilds\bin\libintl-8.dll
No symbol table info available.
#3  0x61ecad38 in libintl_vfprintf () from F:\FontForgeBuilds\bin\libintl-8.dll
No symbol table info available.
#4  0x61ecad5f in libintl_fprintf () from F:\FontForgeBuilds\bin\libintl-8.dll
No symbol table info available.
#5  0x00a20db9 in SFD_DumpLookup (sfd=0x0, sf=0x34468a8) at sfd.c:2137
2137    sfd.c: No such file or directory.
isgpos = 0
otl = 0x34451e8
sub = 0x8
fl = 0x28dd20
sl = 0x6c0817ec <copy+23>
i = 57837784
#6  0x63701f90 in SFDCreateUndoForLookup (sf=0x34468a8, lookup_type=258) at lookupui.c:3742
3742    lookupui.c: No such file or directory.
gid = 0
sc = 0x0
pst = 0x0
sfd = 0x0
str = 0xa <error: Cannot access memory at address 0xa>
#7  0x63702e26 in PSTKD_Ok (g=0x48cd9d0, e=0x28df48) at lookupui.c:4074
4074    in lookupui.c
A debugging session is active.

    Inferior 1 [process 14624] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]


@jtanx
Copy link
Contributor

jtanx commented Apr 6, 2016

Hi @zoghal, just to clarify some details:

  • Did this happen with previous versions of FF?
  • Could you list the exact steps you did to make this issue occur?
  • Could you provide a sample font for which this happens on?

Thanks!

@IvanDoganov
Copy link

Same problem here.
OS WIndows 10 Pro x64 - FF release 04.04.2016
Did not happen with previous build from 25.08.2016

  1. Open a font
  2. font info -> Lookups/GPOS/'kern' Horizontal Kerinng in Cyrillic Lookup 1-1 / Select Subtable / Edit Metadata.
  3. When click OK to save changes FF crashes.
    Same happens when creating new lookup / kern / subtable.

I can reproduce the problem on two different systems. On one of them I have the new 04.04.2016 and the 'old' 25.08.2015 builds, and the new one crashes every time I try to edit a lookup, but the old one works fine.

@jtanx jtanx changed the title fontforge craching when close kerning pairs window on windows fontforge crashing when close kerning pairs window on windows Apr 7, 2016
@jtanx jtanx added the I-bug label Apr 7, 2016
@jtanx
Copy link
Contributor

jtanx commented Apr 7, 2016

Hmm interesting.

I've found the issue. https://github.com/jtanx/fontforge/blob/august-release/fontforge/sfd.c#L2083

MakeTemporaryFile is failing, returning a NULL file pointer. Somewhere down the track, fprintf is called on that file pointer causing the crash. Interestingly I tried debugging the older version and although the file pointer is NULL, it doesn't crash when fprintf is called.

  • Cause: MakeTemporaryFile is failing and returning a NULL file pointer
  • Cause: NULL file pointer is used in calls to fprintf
  • Why this happens now but not before: libintl was upgraded, which changed how printf calls were made. If you see the traceback above, the segfault is in locking code. My guess is that previously the locking code in libintl didn't exist. Calling the CRT fprintf with a NULL file handle will not segfault the program. If you replace libintl-8.dll with an older version from the August release, it will not crash.

@jtanx
Copy link
Contributor

jtanx commented Apr 7, 2016

So... this was more annoying that I'd like to fix. See jtanx/fontforge@efd18a4

I'll push a test build and PR soon...

@jtanx
Copy link
Contributor

jtanx commented Apr 7, 2016

@zoghal
Copy link
Author

zoghal commented Apr 7, 2016

@jtanx thanks , is done and very speed up to save changes lockups ❤️

@zoghal zoghal closed this as completed Apr 7, 2016
@davelab6
Copy link
Member

davelab6 commented Apr 7, 2016

THANK YOU @jtanx !! :D

@davelab6
Copy link
Member

davelab6 commented Apr 7, 2016

@jtanx should we update the release with that test build?

jtanx added a commit to fontforge/fontforge.github.io that referenced this issue Apr 9, 2016
@jtanx
Copy link
Contributor

jtanx commented Apr 9, 2016

@davelab6 yep, I've just done it - seems like there was another occurrence on #2686.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants