on 02-03-2005 5:08 PM
SBO 6.70.185 SP:00 PL:05
I encounter sporadic exceptions using SAPbouiCOM.ProgressBar:
During writing to ProgressBar.Text:
System.Runtime.InteropServices.COMException (0xFFFFE37B): Progress Bar - has stopped
..which is pretty bad since I can't release the ProgressBar anymore. Even setting it's reference to "nothing" (VB.NET) and calling GC.Collect() doesn't change anything.
Even though it's a stoppable ProgressBar I'm definitely sure noone has stopped it; neither manually nor programmatically. There is no other code in my addon which might stop it, and there's no other addons running.
I catch such events and try to perform StatusBar.CreateProgressBar, which then results in:
System.Runtime.InteropServices.COMException (0xFFFFE37C): Progress Bar - resource is occupied and can not be used at this time
Once the ProgressBar appears occupied SBO keeps it like that. Restart of Addon has no effect.
The class member which creates and accesses the ProgressBar runs in a separate thread. This has proven as a valid method to start functions from the ItemEvent routine yet allowing further event handling. Without this trick the ProgressBar Stop button could never get clicked.
Anyway, once the error occurs I cannot release the ProgressBar, which results in a complete lock-up of the SBO Client application.
Any experience or ideas?
Hi Phil,
Only one progress bar can be activated in the application. If the progress bar has already been activated by another program, you cannot use until it is released - pbet_ProgressBarReleased event occurred.
When creating a progress bar with a Stop button (StatusBar.CreateProgressBar(Stoppable=True)), clicking the Stop button does not release the progress bar for other programs.
To stop the progress bar after clicking the built-in Stop button:
Catch the SBO_Application_ProgressBarEvent.pbet_ProgressBarStopped event.
Call ProgressBar.Stop to release the progress bar and return the application to normal mode.
If you don't want to stop the progress bar, set BubbleEvent = False (when Before = True).
If you are absolutly sure that none other process has stopped the process. Please create a message to our development support in order to fix the problem.
Regards,
Felipe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> Only one progress bar can be activated in the
> application.
> Catch the
> SBO_Application_ProgressBarEvent.pbet_ProgressBarStopp
> ed event.
I know; the documentation is quite precise about this. I traced all calls to ProgressBarEvents: No stop calls arrive. Yes, debugging itself works since I can perfectly see creation events and, once I click "stop", the stop event.
> If you are absolutly sure that none other process has
> stopped the process. Please create a message to our
> development support in order to fix the problem.
Yes, I'm absolutely sure. I would have seen the debug output from ProgressBarEvents, and the one and only call to ProgressBar.stop() is carefully surrounded by debugging lines too.
<b>It might be due to threading</b>. In order to allow further SBO event handling the sub creating and managing the ProgressBar runs as a separate Thread. The sub runs for quite some time (10 to 30 minutes), but in the meantime I leave SBO untouched. Are there any known threading problems? Do I have to call DoEvents() or something like that?
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.