Menu

#27 Opening View Settings in Vista crashes Frhed

trunk
closed-fixed
None
6
2009-06-18
2009-01-13
Kimmo Varis
No

Frhed 1.3.4, current trunk.

Just starting Frhed, then opening View Settings -dialog from Options-menu crashes the Frhed.

This happens only in Vista Home Premium. Same SVN rev works good in Windows XP.

Discussion

  • Kimmo Varis

    Kimmo Varis - 2009-01-13

    The culprit seems to be the
    EnumSystemLocales(EnumLocalesProc, LCID_SUPPORTED);
    call in ViewSettingsDlg::OnInitDialog(). If I comment out that line, the dialog works ok.

     
  • Kimmo Varis

    Kimmo Varis - 2009-01-13
    • priority: 8 --> 6
     
  • Kimmo Varis

    Kimmo Varis - 2009-01-13

    Weird. I added the breakpoint to begin of ViewSettingsDlg::EnumLocalesProc(). And just continued the excution right after the breakpoint was hit. Now the dialog appeared Ok. And seems the dialog appears every time now, without crashes.

    So this is some kind of initialization/first run problem?

     
  • Kimmo Varis

    Kimmo Varis - 2009-02-04

    The patch

     
  • Kimmo Varis

    Kimmo Varis - 2009-02-04

    I started getting similar crash with WinXP too. And now I got the stack too! So this appears to be a problem with formatting the offset in hex edit view.

    I fixed this by simple checking the return value of sprintf() before using that return value for memset(). This fixes the crash, but is not the "real" fix.

    Attaching patch (Fix_offset_format_crash.patch).
    File Added: Fix_offset_format_crash.patch

     
  • Kimmo Varis

    Kimmo Varis - 2009-02-04
    • assigned_to: nobody --> kimmov
     
  • Kimmo Varis

    Kimmo Varis - 2009-02-04

    Fix committed to SVN trunk:
    Completed: At revision: 365

     
  • Kimmo Varis

    Kimmo Varis - 2009-02-04
    • status: open --> open-fixed
     
  • Kimmo Varis

    Kimmo Varis - 2009-02-04

    I don't believe that is the fix for these crashes though. This time it crashed in different place than previous times. So I think we have some other corruption elsewhere. But somehow it relates to opening View Settings -dialog.

     
  • Kimmo Varis

    Kimmo Varis - 2009-06-18

    Closing as I haven't seen this happen for recent versions.

     
  • Kimmo Varis

    Kimmo Varis - 2009-06-18
    • status: open-fixed --> closed-fixed