i have a problem with an addin which i have written in c# (.Net 2.0). I tested the addin in SolidEdge ST 4.
The addin adds a new page into the egebar. The page is a usercontrol which contains a System.Windows.Forms.Webbrowser.
The page is displayed and everything works fine the webbrowser is shown and i can navigate with it. But if the autohide button is activated and i'm trying to resize the page solidedge freezes.
For testing i removed all special functions and just added a usercontrol with a System.Windows.Forms.Webbrowser and resizing worked.
After that i set a "starturl" for the webbrowser and the resizeproblem was back. It seems that it doesn't matter how simple the site is wich is shown in the webbrowser cause i tried it with diffrent sites.
Did anyone know a solution for this problem?
Posted by: Patrick
Post date: 7/6/2012 2:59:42 AM
What resize event? Are you resizing your docking pane? When you create your page, set "nOptions" to zero and your client window will receive OnSize events. Implement WM_SIZE windows message handler to see if you get called when sizing your docking pane.
You might be able to deactivate the autohide button (not sure what you mean by that but I assume it is part of the webbrowser form), call the base class handler, and reactivate it.
When edge "freezes", is it chewing up cpu time? If you run in the debugger and you freeze, if you break into the process, what is going on? Are all the threads waiting on objects? The call frame for each event will show what is going on in each thread. Seeing some threads waiting is typical, but if all threads, especially the main thread is waiting on an object/event, you may have some sort of deadlock. I have seen deadlocks occur when calling back into an Edge API when Edge calls out to the add-in. But I have only seen that when working with events while trying to disconnect from an event set during a call out to an event handler for an event in the same event set.
The debugger can also lock up an application. The OS has a single file system mutex (or used to) and I have locked up Edge when the browser control's Navigate (IE control used in the Edge background/startup page, not .NET control) method is called if I try to load symbols from low-level Windows DLLs (user32.dll, kernel.dll etc.) But I have only seen that when I specificially stepped across the navigate call and right-clicked on an entry in the call stack to run the load symbols command. The debugger has to wait for the mutex to be available but the Navigate method has it locked down. And the thread is suspended while the symbols are loaded so the Navigate code is suspended while it has the mutex locked down.
Ever notice that Word can fail to launch and load a document you double-click on if you are stepping through code in the debugger? You have to "go" or stop debugging and then all of a sudden, Word appears and your document is loaded! I think that is due to mutex lockdowns in the OS (in this case one connected with DDE).
Posted by: R.D. Holland
Post date: 7/24/2012 10:37:17 AM