General Troubleshooting (Magic xpa 3.x)

« Go Back


Created ByKnowledge Migration User
Approval Process StatusPublished

General Troubleshooting (Magic xpa 3.x)


Why won't my Online program run?


If there are no errors and the program won't run, try changing the Activate as Enterprise Server environment setting to No. The Activate as Enterprise Server is required for Web and RIA applications.


Why am I receiving the "Low level parser unexpected" error?


The problem is in the schema file itself, it uses a repeatable element with the following definition:

<xsd:element name="MyElement" minOccurs="0" maxOccurs="999999">

This definition reaches a limit in the XML parser.

You can solve this by changing the line to:

<xsd:element name="MyElement" minOccurs="0" maxOccurs="unbounded">


Why am I receiving the "Invalid Date" error?


If the DATE literal value is inconsistent with the value set in the Date Mode environment setting, the "Invalid Date" error appears on the status bar when you use the Syntax Checker.


Why am I getting the "Waiting for an Application Resource" error?


When running Batch programs marked for "parallel execution", it is only allowed to have two concurrent batch tasks run on the first license seat.

Trying to open a third parallel Batch task will result in the error message, when one of the two running task terminates, the waiting task will start execution.

To avoid this error, use a license with more available threads.


Why is the Call by Name operation not working?


The Call by Name operation may fail because:

  • The specified file is not a valid cabinet file.

  • You are using a project file or Magic flat file from a previous version that is not recognized in Magic xpa.

  • The cabinet file has been located, but the public program has not been located.


How come I'm getting a blank output from a merge program?


A merge tag with no name (< !$MG_) left by mistake in the HTML template causes it.

So, the solution is simple – look for all the merge tags and make sure all of them have names.


Why am I getting an error when I attempt to validate an admin connection to an LDAP server?


Connecting to an LDAP server, prefixing the host with ssl://, establishes an SSL connection. However, after doing this, the connection fails and gives the following error message:

[error 81] Can't connect to the LDAP server

The error message occurs because of the absence of the necessary SSL certificate in the certificate database, or because of the absence of the certificate database itself. The certificate database is required to enable an LDAP client library to establish an SSL connection. You need to manually create and populate the certificate database that contains the necessary certificate by following the procedure described at:


When I import a project, why am I getting an error stating that the CALL-MODAL is an unexpected token?


If you import your project and get an error stating that the CALL-MODAL is an unexpected token, just delete that text from the input file.


Why isn't my Browser Client program working when running it on a Windows 7 operating system?


Running a Browser Client program on a Windows 7 operating system defined with UAC = Always Notify may fail to work.

To make it work, you need to change the UAC to Never Notify and run the Browser Client application one time. After the Browser Client application runs once, you can then change the UAC back to the original setting and use the Browser Client application as much as you want.


Why is the broker monitor only showing two requests?


Sometimes, Internet Explorer creates several requests and the broker monitor shows that only two are executed at a time (even though there are more threads available).

There seems to be an Internet Explorer limitation as to the number of connections it is allowed to create.

You can read about it here:

There's a workaround described at:


When using the broker as a service, the MgxpaRuntime engine isn’t loaded. What can I do about this?


First, start the broker as an executable. You do this by shutting down the service and double clicking on the broker's .exe file, which is located in the Magic installation folder.

If you see any errors while loading the broker as an executable, fix those errors. They might be the reason why the engine isn't loaded because these errors happen but won't be shown when using a service.

If everything is loaded properly then the problem might be related to files that should load when the engine is loaded, such as the color, user or license files. Make sure that all of the locations of the files that you use don't use mapped drives.

Due to a Microsoft limitation, mapped drives can’t be used by a service. They are per user and do not exist unless the user is logged in. Therefore, they can’t be used. Correct all of the references to a regular network path (if needed) and start the service again.


Why are the Range, Locate and Sort screens not working in Magic xpa?


Add the End User Functionality component to your project.

The ECI file is named UserFunctionality.eci and is located in the Add_On\UserFunctionality folder. Once the ECI is loaded, the functionality becomes available.


When trying to connect to Microsoft Exchange 2007 or higher with the MailConnect function, why am I getting "error -67"?


In the last versions of the Exchange server, the Relay Connection option is turned off by default, which means you can’t send mails via applications that aren’t mail applications like outlook.

This default may be the reason that you are receiving error -67 from the MailConnect function. To solve the problem, set the Exchange server to enable relay connections.


Why am I getting “The visual and logical conversion dll is missing” error?


If you used the Logical or Visual function in an Offline task and did not previously use it in a non-Offline task, you will get this error. To solve this issue, you need to first execute these functions in a non-Offline task.


When using the MSG2MGIC.EXE utility, why am I getting the "A valid instance of Magic is not running at the moment" error?


The MSG2MGIC.EXE utility can send arguments to the Magic Runtime and raise an external event; however, if you deploy the application in Background mode, you might get this error.

The MSG2MGIC utility lets you raise an event in a Magic xpa program running on the current PC in foreground mode (Runtime). This utility will not work when the engine is running in Background mode, or if the engine is running on other machine. This is because this functionality needs the current window handle of the engine that is running, so this is not available in Background mode or when the engine is running on another machine.

To raise an event of the application running in Background mode, you need to use the requester functionality. You can use the Command Line Requester – MGRQCMDL.EXE (which can be used from any non-Magic xpa application) or use the Call Remote operation (if calling from a Magic xpa application). This will call a program when the application program is in Background mode, and can further raise the event in the application (Raise Event- operation statement).


Why am I getting a Windows Abnormal termination alert when using large BLOB variables?


If you are using the File2Blb function with a large file, a Windows Abnormal termination alert may appear due to insufficient memory. When Magic xpa loads a file into a BLOB, it first reads the entire file and then allocates memory to the BLOB variable. This results in a memory consumption that is larger than the file size itself, which may result in the Abnormal termination alert.

If you want to copy a file from the client to the server and vice versa, use the ServerFileToClient or ClientFileToServer function instead of BLOB variables.

When you want create or parse the file, split the file to avoid this error.


Why am I encountering Windows security permission limitations when installing Magic xpa?


To solve this issue, try the following actions:

  • Install Magic xpa to another folder other than the Program Files folder.

  • Run the installation as an administrator.

  • Make sure you have write permissions to the installation folder and project folder.


In Runtime, when I close the application using the Close Application option in the menu, the MgxpaRuntime.exe process is still running in the Task Manager. What can I do about this?


It is recommended not to use Open Application or Close Application events in the menu. To solve the issue, raise an Exit System event in the menu instead of the Close Application event.


I set the Invoke OS Cmd operation's Wait property to Yes, but the operation does not wait for the command to terminate. Why is this happening?


Setting the Wait property to Yes will not work when performing the Invoke OS on a file (without specifying the application that should open it) and the default viewer for the file is a single instance application (such as Windows Photo Viewer).

To solve this issue you should either define another default viewer in Windows or start the desired application directly in the command.


I set up my application so that the end users can print data to an Excel, but it's not working. Why?


This functionality might not be working for one of the following reasons:

  • It is possible to export the data to Excel only if Excel 2010 and above is installed on the machine. If it is not installed, you might see an error in the mgerror.log or components.log file.

  • On some machines, producing Excel files to Excel 2013 requires Microsoft .NET framework 4.5 to be installed.

Crash Fixes


Why is Magic xpa crashing after I rename the MgxpaRuntime.exe file?


If you have a .config file and you want to rename the MgxpaRuntime.exe, you also need to rename the .config file.


Why is Magic xpa crashing when I run the Automatic Program Generator on a Web Service database?


This happens when the data source definitions on the consumer and provider are different. To solve this issue, make sure to use the same data source definition on the consumer and the provider.