My program is working on Windows 10 but not on Windows 11

Victor Rodríguez Noguera 0 Reputation points
2024-12-20T09:33:10.5333333+00:00

I have a wpf application that is working on Windows 10 but when i try executing or debbugging it on Windows 11 it crashes, its driving me Crazy... The error code I find is this: Excepción no controlada en 0x00007FFE232D3B3F (combase.dll) en Mupi.Desktop.exe: 0xC0000602:  Se produjo una excepción con error inmediato. No se invocarán los controladores de excepciones y el proceso se terminará inmediatamente.

I am going to be honest, I haven't got a lot of WPF Experiencie, i had to take this project and migrate it because who originally built it can't do it anymore. I leave there the installer of the app that i can create from the code, in case that can help someone help me ^^: https://wetransfer.com/downloads/ca1d562083ea6f42d2b331eb7511739f20250106152716/5c61be9c75c59c51b6509c694d46a90320250106152733/2f797c?t_exp=1736436436&t_lsid=2a21fe6b-b634-4cdd-a8c2-76ef9fa88bb5&t_network=email&t_rid=ZW1haWx8Njc3YmY2NTU0ZGZkZTcwNmYwM2QyODY3&t_s=download_link&t_ts=1736177253

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,981 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,060 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,368 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,216 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,481 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Daisy Zhou 28,161 Reputation points Microsoft Vendor
    2024-12-23T08:18:47.42+00:00

    Hello

    Thank you for posting in Q&A forum.

    The error you're encountering with combase.dll on Windows 11 can be due to several reasons. Here are some steps you can try:

    1. Run System File Checker (SFC) and DISM:

    • Open Command Prompt as an administrator.

    • Run the following commands one by one:

    sfc /scannow

    dism.exe /online /cleanup-image /scanhealth

    dism.exe /online /cleanup-image /restorehealth

    • Restart your computer and check if the issue persists.

    1. Re-register the combase.dll file:

    • Open Command Prompt as an administrator.

    • Run the following command:

    regsvr32 combase.dll

    • Restart your computer.

    1. Update Windows and Drivers:

    • Ensure your Windows 11 is up to date with the latest patches and updates.

    • Update your graphics drivers and any other relevant drivers.

    1. Check for Compatibility Issues:

    • Sometimes, certain applications or libraries might not be fully compatible with Windows 11. Check if there are any updates or patches available for your WPF application or any third-party libraries it uses.

    1. Debugging Tools:

    • Use debugging tools like WinDbg to get more detailed information about the crash. This can help identify the root cause of the issue.

    I hope the information above is helpful.

    If you have any questions or concerns, please feel free to let us know.

    Best Regards,

    Daisy Zhou

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.


  2. MotoX80 35,136 Reputation points
    2025-01-03T15:27:04.9+00:00

    I see a number of hits on the net for "0xC0000602 combase".

    Some like this one point to bugs within the Windows UI.

    https://github.com/microsoft/microsoft-ui-xaml/issues/3954

    That entry is from 2021, so I would hope that the fix has made its way to general release by now. On the pc where you are compiling the program, is Visual Studio up to date? Is Windows up to date? On the pc where you are trying to run the program, is Windows up to date? (All updates in Windows Update installed?)

    I don't do much programming anymore but one technique that I found useful was to make sure that I had a try/catch in most routines (at least in my main entry point) and to write "here's what I'm doing" entries to a log file. That allows me to understand what sections of my code have been called and if they encountered any errors.

    If your program crashes before any log file entries get written, then that would point to a problem with the environment. OS, Dot Net framework, other dll's, etc, etc.

    In psuedo-code.

    dim trace as string = ""           // global variable 
    sub Main { 
    	try {                          // have at least 1 try/catch 
    		trace = "Initializing"
    		Logit "Starting up."
    		initialize variables
    		trace = "Calling DoSomething" 
    		call DoSomething
    		trace = "DoSomething has finished, closing files"
    		close data files 
    		trace 
    		close DB connections 
    		Logit "Exiting."
    		return
    	} catch {
    		Logit "We crashed in Main."
    		Logit "I was working on: " & trace
    		Logit exception.info
    	}
    }
    Sub DoSomething {
    	try {                                // optional            
    		trace = "Calculating a"
    		a = b + c
    		trace = "Done doing something"
    	} catch {
    		Logit "We crashed in DoSomething."
    		Logit "I was working on: " & trace
    		Logit exception.info
    	}
    }
    Sub Logit(msg) {
    	debug = read flag from registry	
    	if (debug) {Write msg to log file}
    }
    
    
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.