eclipse-threadx / samples

A collection of complete sample workspaces and projects for popular development boards from ST, NXP, Renesas, Microchip and Microsoft using popular IDEs and toolchains, including IAR, ARM, STM32CubeIDE, MCUXpresso, MPLAB, Visual Studio, and Visual Studio Code.
131 stars 51 forks source link

Win32 sample - Access Violation Error #30

Closed tolgayilmaz86 closed 2 years ago

tolgayilmaz86 commented 2 years ago

In the below line I get "Unhandled exception at 0x74EBB1AF (combase.dll) in ProjectHelloWorld.exe: 0xC0000005: Access violation reading location 0x00000004. occured"

tx_thread_schedule.c line 156 tx_thread_schedule(VOID)::WaitForSingleObject(_tx_win32_scheduler_semaphore, INFINITE);

The project is cloned and built successfully and no change has been applied.

liydu commented 2 years ago

Hi @tolgayilmaz86 , can we know which version of Visual Studio were you using? I just tried on the latest VS2022 (used to test on VS2019) it launched okay. Thanks!

tolgayilmaz86 commented 2 years ago

Sure, I was on the VS2019 (&Windows 10) but it seems it worked on its own without changing anything. Maybe some conflict with my system but could be something to consider within code side just to prevent the issue.

liydu commented 2 years ago

@tolgayilmaz86 thanks for the further info. We will track this as an improvement.