Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EBMNGR Crashing

Status
Not open for further replies.

falkor13

Programmer
Jan 14, 2002
10
0
0
US
I've written a windows toolbar to launch extra basic macros. Generally I use the shell / ebrun syntax. I see that all the macros are terminating, but sometimes their processes are not going away, and eventually I get the message "could not open file mapping for EBMNGR".

Has anyone else had this problem? Does anyone know the method for launching a macro using the extra objects - instead of shell-ing? Oh yeah, I need to use OLE with all late binding.
 
I'm not familiar with the second half of the question, but EBMNGR does crash if things don't go right for it. You may try to make sure that only 1 macro at a time is being run. Also, once the program crashes, try shutting down extra and all instances of EBMNGR and EBRUN before continuing. I've also gone so far as to re-start.

calculus
 
falkor13,

I've had ebmngr.exe crash on me also. Error Reading memory addresses. I usually have to open taskmgr.exe and find the Extra.exe or ebmngr.exe process that ends up staying open and end it.

Haven't seen much about this issue anywhere but here, but, I think it could be an issue with Win2k.

Just my 2 cents.
Scott
 
Thanks for your responses!

Unfortunately, my users are using both 2K and NT4. Although it's happening more on NT, it is happening on both. I was programmatically deleting all ebrun processes before executing a new macro, but that didn't solve the problem. Also I do have a few cases when two macros need to execute at the same time, but this problem isn't dependent on this situation.

I believe ebmngr is having a problem when I execute a macro from my vb app, not from an Extra session. Since I'm instantiating the extra objects in my vb code, I was hoping to find a 'RunMacro' method of the Session collection, but after exhausting my searching have gone the shell route. I might have been able to find something on the Attachmate website, if they didn't totally fubar the tech help section.

This is happening a couple of times an hour in a customer service center, so I'm trying to avoid 'Rebooting' as much as possible.
 
I didn't know you were using VB. Check this faq: faq99-4069

If you use VB to control Extra, you're problems will go away quickly. It's actually quite easy once you have the objects set up.

calculus
 
Any ideas on why this just won't work? I've tried both fully qualifing the macro name, and not. Oh, my session name is A.edp - that's why I'm looking for "A". The test macro was in my macros directory for these tests.

Set objSystem = CreateObject("Extra.System")
Set objSessions = objSystem.Sessions

For intSessionCtr = 1 To objSessions.Count
'To get the active session to "A"
objSessions.JumpNext
If UCase(objSystem.ActiveSession.Name) = "A" Then
'objSystem.ActiveSession.RunMacro "test"
objSystem.ActiveSession.RunMacro "d:\test.edp"
Exit For
End If
Next intSessionCtr

Set objSystem = Nothing
Set objSessions = Nothing
 
Quote "...I was hoping to find a 'RunMacro' method of the Session collection.." End Quote

I foundthe only way to have a macro call/run another macro was to take the called/run macro and make it an *.ebh (Header) file. You'll need to change that macro's Sub Main/End to a Function, but it works very well.

Then the calling macro needs a '$Include: "extra!.ebh" in the very top of the macro. After that you just call/run the second macro by calling it by name.

Scott
 
Ok, let me explain the application a bit. I've written a windows toolbar, which remains docked to the top of the screen, like the office toolbar. There are three combo boxes which are linked to a backend SQL Server database for catagorizing over 300+ Extra! basic macros. I've gone with an external application because turning on and off quickpads and toolbars for this many macros is both cumbersome, has corrupted sessions on many occasions, and quickpads get very confusing as to which session they belong to when the users move them around.

When a user selects a macro from my toolbar, it runs in the open sessions, using from 1 to 4 of them depending on the macro.

Although VB does do a better job of cleaning up after it's self then extra, In this case I am using VB to launch extra macros.
 
If I were in your shoes I'd be doing it the same way (if I understand correctly).

When a user makes a selection from your VB program, you fire

rc% = shell (...ebrun.exe MacroName.ebm)

Based on the example you gave, it looks like everything should run fine. I think you're just hitting the "glass ceiling" of what can be done with EBMENG.

Have you considered researching if your VB can determine what processes are in memory and terminate them?

calculus
 
I've had the application loop through all running processes and kill and ebrun 's that stay resident, but that seems to make EBMNGR even more unstable. I'm in the process of opening a ticket with Attachmate for a fix to EBMNGR, since we're now also getting division by 0 errors from it now too.

We also have a few macros which launch other macros with the shell syntax. Sometimes they develope the same issues. I had to jump through loops with Attachmate to get them to fix a stack issue with My Extra about a year ago, this should be just as fun.

Are you familiar with the syntax for the RunMacro method of the Session object? I could invoke the object, then run the macros with this method, but it doesn't seem to do anything, and it's not in the help files. Must be there though, 'cause it compiles and runs. Oh well, I'll keep this thread posted on any news.
 
The RunMacro is from a previous version of EB. I think it was 2 versions ago. I didn't know it would run in the object language. It just called a function in a header file in previous versions.

Good luck with the trouble ticket.

calculus
 
Quote>>> I've had the application loop through all running processes and kill and ebrun 's that stay resident, but that seems to make EBMNGR even more unstable. I'm in the process of opening a ticket with Attachmate for a fix to EBMNGR, since we're now also getting division by 0 errors from it now too.<<<

My users have experienced similar many similar errors regarding the message &quot;could not open file mapping to EBMNGR&quot; ... Eventually, I made a spot judgement call to abandon Extra BASIC in favor of an alternate solution that also used VB, however I'm writing this response based on your comment that you cycled through running processes to kill the EBRUNs.

If your app already did this anyway, you might glean some benefit from this observation: The message about not opening file mapping for EBMNGR seems, as best I can tell, to mean EBMNGR has shut down silently in the background. I found recently that be manually launching it again, the error goes away and macros become functional again without a restart. You might have your app check to see if EBMNGR is running, and if its shut down for any reason, shell it back up again before trying to launch the macros. Granted, I don't know the details of your app, but hopefully knowing this may help.

If it works, Attachmate should probably be advised. It seems to me that simply having Extra self-heal by relaunching a failed EBMNGR in the background is a cleaner solution than complaining to the end user about not being able to open file mapping (but then, I always prefer self healing apps to ones that &quot;whine&quot; to their users :) ).

Myself, I'll probably stick with our VB solution, as we do have a lot of memory problems with Extra BASIC under Windows 2000 (that's what eventually leads to the EBMNGR failure) that just went away with VB accessing the Extra Session externally, but hope the observation does something for ya, anyway. Cheers
 
Thanks for your feedback. Attachmate has applied some patches to My Extra for us, which have lessened the problem. I'm going to try your idea of re-launching ebmngr. I was killing of ebrun processes, I'm not sure if I can do it to ebmngr without closing the sessions. Our environment is customer service, with 4 - 6 emulators open at any given time, so I can't close the sessions on the users. We have over 300 eb macros now - although I would love to, converting them to VB would be too time consuming.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top