Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Unhandled Exception when Using Execute Calculator Code

Featured Replies

Thanks for the offer but no thanks. If I were to seek tuition I'd find some one (a) whose answer to the question "Do you mean, for example, that if a process has 3 threads and Thread 1 is in a critical section and Thread 2 is suspended waiting for the critical section that Thread 3 has no access to the program's memory" isn't "In essence, correct. A critical lock will suspend other process threads until it's removed." and(:( who doesn't state the obvious - "I know what the EnterCriticalSection does and what can go seriously wrong if you don't release it." If you make an elementary programming error by not matching EnterCriticalSection() and LeaveCriticalSection() calls then, of course, things will go seriously wrong. Also Borland doesn't cheat. It provides a class TThread to facilitate using threads, in the same way as Visual C++ provides the class Thread. One of the properties of TThread is Handle which provides access to all WinAPI thread functions that require a handle.

Gerry Howard

  • Commercial Member
Thanks for the offer but no thanks. If I were to seek tuition I'd find some one (a) whose answer to the question "Do you mean, for example, that if a process has 3 threads and Thread 1 is in a critical section and Thread 2 is suspended waiting for the critical section that Thread 3 has no access to the program's memory" isn't "In essence, correct. A critical lock will suspend other process threads until it's removed." and(:( who doesn't state the obvious - "I know what the EnterCriticalSection does and what can go seriously wrong if you don't release it." If you make an elementary programming error by not matching EnterCriticalSection() and LeaveCriticalSection() calls then, of course, things will go seriously wrong. Also Borland doesn't cheat. It provides a class TThread to facilitate using threads, in the same way as Visual C++ provides the class Thread. One of the properties of TThread is Handle which provides access to all WinAPI thread functions that require a handle.
A critical lock will suspend any thread that could have access to the same process memory space as the thread initiating the lock. Which, in this discussion, includes the main FS thread.Borland does cheat.... it's a good cheat, but it's a cheat. I have the source to all of Borland's classes... I've used their products for years as well as Microsoft's. Borland's TThread object is efficient and hides the 'terror' of threading... however, the way they actually implement the physical creation and execution of individual threads isn't the best approach and in fact does cheat.

Ed Wilson

Mindstar Aviation
My Playland - I69

A critical cection does not "suspend any thread that could have access..." When a critical section object is owned, the only other threads affected are the threads that are waiting for ownership in a call to EnterCriticalSection. Threads that are not waiting are free to continue running.The Compact Oxford Dictionary defines cheat as 1 act dishonestly or unfairly in order to gain an advantage. 2 deprive of something by deceitful or unfair means. 3 avoid (something undesirable) by luck or skill: How is Borland being dishonest, unfair, or deceitful?

Gerry Howard

  • Commercial Member
A critical cection does not "suspend any thread that could have access..." When a critical section object is owned, the only other threads affected are the threads that are waiting for ownership in a call to EnterCriticalSection. Threads that are not waiting are free to continue running.
If that were correct... then execute_calculator_code would never cause crashes... as it's simply a function address. However... your next statement (below) ends the conversation permanently. You're still a troll.
The Compact Oxford Dictionary defines cheat as 1 act dishonestly or unfairly in order to gain an advantage. 2 deprive of something by deceitful or unfair means. 3 avoid (something undesirable) by luck or skill: How is Borland being dishonest, unfair, or deceitful?
Clearly you're a troll and not a software developer of any calibre. Those who actually make a living writing software would understand clearly the term 'cheat' in regards to how someone writes code. I have never, ever used the ignore user feature in these forums... until just now.

Ed Wilson

Mindstar Aviation
My Playland - I69

If that were correct... then execute_calculator_code would never cause crashes... as it's simply a function address. However... your next statement (below) ends the conversation permanently. You're still a troll.
You may not see this but it's worth posting for the benefit of others.The sentences "When a critical section object is owned, the only other threads affected are the threads that are waiting for ownership in a call to EnterCriticalSection. Threads that are not waiting are free to continue running." which you say are not correct are from Microsoft: see the last sentence on the link below.http://msdn.microsoft.com/en-us/library/ms682530(VS.85).aspx

Gerry Howard

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.