Error 1067: The process terminated unexpectedly

85 views
Skip to first unread message

oleg.g...@apollo.lv

unread,
Jul 2, 2015, 10:26:33 AM7/2/15
to mongoos...@googlegroups.com
Hi. I use the Mongoose 5.6 as a base to develop my WEB Server.
If WEB Server registered as a COM object, it starts and stops correctly.
If it registered as a service, it starts and functions correctly, but when you stop the service (Stop in SCM) it fails (a diagnostic message - Windows could not stop ... service on Local Computer. Error 1067: The process terminated unexpectedly).
Binding WEB Server with SCM performed exactly the same functions, which are successfully used in the code of my other servers are not designed on the basis of Mongoose.
Where could be the problem?

Max Ignatenko

unread,
Jul 2, 2015, 10:52:32 AM7/2/15
to mongoos...@googlegroups.com
Hi Oleg,

Can you provide a stacktrace or pinpoint where it crashes in some other way? Without that and without your code it's pretty hard to speculate about what goes wrong.

That said, I doubt that the problem is in the Mongoose itself, official Windows binary registers itself as a service and runs without any problems.

--
You received this message because you are subscribed to the Google Groups "mongoose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongoose-user...@googlegroups.com.
To post to this group, send email to mongoos...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongoose-users.
For more options, visit https://groups.google.com/d/optout.

oleg.g...@apollo.lv

unread,
Jul 2, 2015, 12:05:47 PM7/2/15
to mongoos...@googlegroups.com

Hi Max,

 

See below for the finishing piece of  WebServer code (error occurs after the server code, after return 0;}) and the code of the standard communication function WebServer<==> SCM (CallBackSvcCtrlHandler).

=========

//…

                while (m_iExit_flag == 0)

                    mg_poll_server(server, 1000);

                // Cleanup, and free server instances

                mg_destroy_server(&server);

                return 0;

}//<==ERROR HEAR

==========

VOID WINAPI CallBackSvcCtrlHandler( DWORD dwCtrl )

{

                // Handle the requested control code.

                switch(dwCtrl)

                { 

                                case SERVICE_CONTROL_STOP:

                                                ReportSvcStatus(SERVICE_STOP_PENDING, NO_ERROR, 0);

                                                // Signal the service to stop.

                                                SetEvent(g_StopEvent);

                                                ReportSvcStatus(g_ServiceStatus.dwCurrentState, NO_ERROR, 0);

                                                m_iExit_flag = 1;

                                                return;

                                case SERVICE_CONTROL_INTERROGATE:

                                                break;

                                default:

                                                break;

                }

                SetServiceStatus (g_ServiceStatusHandle, &g_ServiceStatus);

                return;

--
You received this message because you are subscribed to a topic in the Google Groups "mongoose-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mongoose-users/VGh7Ll1fFhE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mongoose-user...@googlegroups.com.

oleg.g...@apollo.lv

unread,
Jul 3, 2015, 4:51:55 AM7/3/15
to mongoos...@googlegroups.com

Hi Max,

I take off my question as pinpointed - not really a problem inside the mongoose. Thank you for attention.

 

From: mongoos...@googlegroups.com [mailto:mongoos...@googlegroups.com] On Behalf Of Max Ignatenko


Sent: Thursday, July 02, 2015 5:52 PM
To: mongoos...@googlegroups.com

--
You received this message because you are subscribed to a topic in the Google Groups "mongoose-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mongoose-users/VGh7Ll1fFhE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mongoose-user...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages