Re: gr_Win32Graphics.cpp:508 asserts using MinGW build on Win98SE

From: Stephen Viles (sviles_abi@iinet.net.au)
Date: Wed Sep 17 2003 - 23:51:24 EDT

  • Next message: msevior@physics.unimelb.edu.au: "commit: (HEAD) Implement Tomas Frydrych's suggestion."

    17/09/03 8:20:55 AM, Stephen Viles <sviles_abi@iinet.net.au> wrote:

    >Hi everyone,
    >
    >> msevior@physics.unimelb.edu.au Sun Sep 14 2003 - 02:56:13 EDT
    >>
    >> With my MINGW build of cvs 4 days ago. I don't see this at all. I'm running
    >> WinME. Jordi told me about an assert he was getting at around line 508 in
    >> the gr_Win32Graphics class. That assert shows that the characters are
    >> being placed at their zoomed sizes and not at the positions determined by
    >> the charwidths array. The assert can happen and maybe screen drawing bug
    >> can happen if you run a version of Windows with BiDi support. Which I guess
    >> is Windows 2000 or Win XP.
    >
    >I am also getting this assert with a MinGW HEAD build on Windows 98SE.
    >Will attempt to get info from gdb.

    Very strange results from gdb. Appears that GetCharacterPlacementW (wherever it
    is) is not called at all. Instead, a plugin destructor makes an appearance:

    Breakpoint 3, GR_Win32Graphics::drawChars(unsigned const*, int, int, int, int, i
    nt*) (this=<incomplete type>, pChars=0x80f740, iCharOffset=0, iLengthOrig=1,
        xoff=211, yoff=10, pCharWidths=0x0) at gr_Win32Graphics.cpp:499
    499 placementResult = GetCharacterPlacementW
    (m_hdc, (LPCWSTR) currentChars, iLength, 0, &gcpResult, GCP_REORDER);
    (gdb) s
    0x104218c0 in GetCharacterPlacementW@24 () at ut_spi.cpp:245
    245 }
    (gdb) s
    GR_Win32Graphics::drawChars(unsigned const*, int, int, int, int, int*) (
        this=<incomplete type>, pChars=0x80f740, iCharOffset=0, iLengthOrig=1,
        xoff=211, yoff=10, pCharWidths=0x0) at gr_Win32Graphics.cpp:502
    502 if(placementResult)
    (gdb) s
    508 UT_ASSERT(UT_SHOULD_NOT_HAPPEN);
    (gdb)

    (Apologies for wrapping to 80 chars.) Relevant section of ut_spi.cpp is:

    238 UT_SPI_v1::~UT_SPI_v1 ()
    239 {
    240 if (version () != 1) return;
    241
    242 if (m_field) delete m_field;
    243
    244 m_plugin_unregister (m_spi.plugin_data, SPI ());
    245 }

    Or am I misusing gdb or misinterpreting gdb output?

    Cheers - Stephen.



    This archive was generated by hypermail 2.1.4 : Thu Sep 18 2003 - 00:03:08 EDT