Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8658275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:43:29+00:00 2026-06-12T15:43:29+00:00

I am working with a fairly large and complicated codebase I am not familiar

  • 0

I am working with a fairly large and complicated codebase I am not familiar with, which uses DirectWrite for text rendering. I don’t know whether if it matters, but this is a WinRT (Windows Store) application.

The app is multi threaded, and some DirectX calls are done from a background (not UI) thread. All the BeginDraw and EndDraw calls are made from the UI thread, and some of the DrawText calls are made from background threads. I made sure that none of these calls overlap, and DrawText is only called between BeginDraw and EndDraw pairs.

However, sometimes I get a SEHException when calling the DrawText method. It never happens when it is called from the UI thread, only when called from a background thread.
This does not happen on every computer. It very often happens on some, and can not be reproduced at all on others.
The exact message the VS Debugger says is this: “A first chance exception of type ‘System.Runtime.InteropServices.SEHException’ occurred in x.DLL”, and it happens when I call the ID2D1DeviceContext.DrawText() function, and the debugger breaks in the d2d1.h header file at the DrawText call.

Is there any way to debug or diagnose what is going wrong when a SEHException is thrown? (It is clearly connected to calling the DrawText function from a background thread.)
And apart from this, are there any general rules of calling DirectX functions from background threads? (I made sure that the D2D1Factory gets created with D2D1_FACTORY_TYPE_MULTI_THREADED option.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T15:43:30+00:00Added an answer on June 12, 2026 at 3:43 pm

    The problem only occurred on a single computer, and couldn’t be reproduced on others. And after a video card driver update it ceased on that computer as well, so it might have been some driver issue (there have already been some problems with the Nvidia drivers for Windows 8).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a fairly large C++ project which unfortunately doesn't really use
I've been working on a fairly large C++ project that surprisingly uses MS Access
I'm working on a fairly large project in (object oriented) PHP which includes a
I'm working on a fairly large web app in which I am going to
I'm debugging a fairly large project I've been working on (but did not originally
I'm working on a fairly large project for a trading company in Philadelphia. The
I'm working on a fairly large web site built in PHP that will potentially
I'm working on a fairly large site and am having trouble managing z-indexes. Is
I'm working on a fairly large project in Python that requires one of the
I am working with a fairly old web app that uses MySQL as the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.