Windows 7 C# 2.0 Application Hangs

EinToR

New Member
Joined
Dec 21, 2008
Messages
4
I have an application that's hanging on the following:
Code:
ArrayList InitOblects = new ArrayList();
InitObjects.Add( new Microsoft.ConsultingServices.HtmlEditor.HtmlEditorControl() ); //Hangs Here

In task manager, the app is using 100% of the available core's processing power. I just thought I should post this and was wondering if anyone else has run across this.
 


It seems like the application you are working with is experiencing a hanging issue when attempting to add an object to the ArrayList. This type of problem can sometimes occur due to issues with the specific object being added or potential inefficiencies in the way the application handles the data.

Here are a few steps you can take to troubleshoot and potentially resolve this hanging problem:

1. Check for Infinite Loops:
Make sure that adding the object to the ArrayList isn't triggering an infinite loop or recursion within the application code.

2. Review the Object Initialization:
Verify that the object being added is being created and initialized correctly. Any issues with the object's constructor or initialization could lead to hanging.

3. Avoid Using ArrayList:
Consider using generic collections like List<T> instead of ArrayList. Generics provide type safety and are more efficient compared to non-generic collections.

4. Debug the Application:
Use debugging tools to step through the code and see where exactly the hanging issue occurs. This can help identify the root cause of the problem.

5. Check Resource Usage:
Examine memory usage and CPU usage during the hanging to see if there are any significant spikes or anomalies that might point to a resource bottleneck.

6. Review External Dependencies:
If the HtmlEditorControl has external dependencies or requires specific resources, ensure that they are accessible and properly configured.

7. Consider Exception Handling:
Wrap the code in a try-catch block to handle any exceptions that might be thrown during the initialization process, which could be leading to the hanging behavior.

By following these steps and investigating the specific code segment causing the hang, you can pinpoint the issue and work towards resolving it effectively.
 


Back
Top