You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Dave Meier (JIRA)" <ji...@apache.org> on 2008/01/19 02:40:34 UTC

[jira] Created: (AXIS2C-922) axis2_http_server.exe crashes in axis2_getopt

axis2_http_server.exe crashes in axis2_getopt
---------------------------------------------

                 Key: AXIS2C-922
                 URL: https://issues.apache.org/jira/browse/AXIS2C-922
             Project: Axis2-C
          Issue Type: Bug
          Components: build system (Windows)
    Affects Versions: 1.2.0
         Environment: Windows XP
            Reporter: Dave Meier


Crashes on this line:

if (optind >= __argc || *(pos = __argv[optind]) != '-')

I changed the makefile and was able to get it to work.  Changed to the following:

!if "$(DEBUG)" == "1"
CFLAGS = $(CFLAGS) /D "_DEBUG" /Od /Z7
LDFLAGS = $(LDFLAGS) /DEBUG /INCREMENTAL /NODEFAULTLIB:LIBCMTD.lib
!else
CFLAGS = $(CFLAGS) /D "NDEBUG" /O2 /MT
LDFLAGS = $(LDFLAGS)
!endif

Basically for the DEBUG case, I removed the  $(CRUNTIME)d from CFLAGS and added back the /NODEFAULTLIB:LIBCMTD.lib to LDFLAGS that was there in 1.1.  Also changed $(CRUNTIME) to /MT for the release mode CFLAGS.

In my configure.in, I had CRUNTIME=/MD


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Commented: (AXIS2C-922) axis2_http_server.exe crashes in axis2_getopt

Posted by "Senaka Fernando (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2C-922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12560702#action_12560702 ] 

Senaka Fernando commented on AXIS2C-922:
----------------------------------------

Hi Dave,

I believe that you are requesting a change in the build system, which would result in a fix in the server. I believe your workaround may solve this issue. But, I'd like to know the error message you got as well as debug information etc. so that it would be easier to figure out what went wrong there. Also please read through your axis2.log and find the relavant error message, if there were any. This would make it easier for the devs to pinpoint the blunder.

I'm asking you so, because I just ran axis2_http_server on Windows and did not run into such trouble.

BTW, I'd rather prefer /MD for the CRUNTIME. I believe you can change this in your configure.in. It is strongly adviced that you use either /MT or /MD at all locations and not a combination. This is ensured by leaving the $(CRUNTIME) intact.

In addition to that, you are infact trying to leave out the Multi Threaded Runtime's debug version, by /NODEFAULTLIB:LIBCMTD.lib.

Thanks for your input.

Regards,
Senaka

> axis2_http_server.exe crashes in axis2_getopt
> ---------------------------------------------
>
>                 Key: AXIS2C-922
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-922
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: build system (Windows)
>    Affects Versions: 1.2.0
>         Environment: Windows XP
>            Reporter: Dave Meier
>
> Crashes on this line:
> if (optind >= __argc || *(pos = __argv[optind]) != '-')
> I changed the makefile and was able to get it to work.  Changed to the following:
> !if "$(DEBUG)" == "1"
> CFLAGS = $(CFLAGS) /D "_DEBUG" /Od /Z7
> LDFLAGS = $(LDFLAGS) /DEBUG /INCREMENTAL /NODEFAULTLIB:LIBCMTD.lib
> !else
> CFLAGS = $(CFLAGS) /D "NDEBUG" /O2 /MT
> LDFLAGS = $(LDFLAGS)
> !endif
> Basically for the DEBUG case, I removed the  $(CRUNTIME)d from CFLAGS and added back the /NODEFAULTLIB:LIBCMTD.lib to LDFLAGS that was there in 1.1.  Also changed $(CRUNTIME) to /MT for the release mode CFLAGS.
> In my configure.in, I had CRUNTIME=/MD

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Commented: (AXIS2C-922) axis2_http_server.exe crashes in axis2_getopt

Posted by "Senaka Fernando (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2C-922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12561817#action_12561817 ] 

Senaka Fernando commented on AXIS2C-922:
----------------------------------------

Hi Dave,

I did not get any server crash. I'm building with Visual Studio .NET 2005. I don't see any reason to why this should not build on VS2003? These are some details from my configure.in.

ENABLE_SSL = 0          
ENABLE_LIBCURL= 0
ENABLE_GUTHTHILA = 0
WITH_TCP= 0
WITH_ARCHIVE = 1
APACHE_VERSION_2_0_X = 0
CRUNTIME=/MD
EMBED_MANIFEST = 1
DEBUG=1

By the way, I built axis2/c using build.bat after calling vcvars32.bat found in the VC\bin folder of Visual Studio 2005. My nmake version is 8.00.50727.762.

Regards,
Senaka


> axis2_http_server.exe crashes in axis2_getopt
> ---------------------------------------------
>
>                 Key: AXIS2C-922
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-922
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: build system (Windows)
>    Affects Versions: 1.2.0
>         Environment: Windows XP
>            Reporter: Dave Meier
>
> Crashes on this line:
> if (optind >= __argc || *(pos = __argv[optind]) != '-')
> I changed the makefile and was able to get it to work.  Changed to the following:
> !if "$(DEBUG)" == "1"
> CFLAGS = $(CFLAGS) /D "_DEBUG" /Od /Z7
> LDFLAGS = $(LDFLAGS) /DEBUG /INCREMENTAL /NODEFAULTLIB:LIBCMTD.lib
> !else
> CFLAGS = $(CFLAGS) /D "NDEBUG" /O2 /MT
> LDFLAGS = $(LDFLAGS)
> !endif
> Basically for the DEBUG case, I removed the  $(CRUNTIME)d from CFLAGS and added back the /NODEFAULTLIB:LIBCMTD.lib to LDFLAGS that was there in 1.1.  Also changed $(CRUNTIME) to /MT for the release mode CFLAGS.
> In my configure.in, I had CRUNTIME=/MD

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Commented: (AXIS2C-922) axis2_http_server.exe crashes in axis2_getopt

Posted by "Dave Meier (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2C-922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12561740#action_12561740 ] 

Dave Meier commented on AXIS2C-922:
-----------------------------------

I just got the latest source code from svn and built the debug version again.  If I put i/MDd in the CFLAGS I get the crash, and if I take it out everything works fine.  I am building with Visual Studio .NET 2003.  The axis2_http_server.exe program crashes immediately when it is started in getopt_windows.c as described in my last comment.

-Dave.

> axis2_http_server.exe crashes in axis2_getopt
> ---------------------------------------------
>
>                 Key: AXIS2C-922
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-922
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: build system (Windows)
>    Affects Versions: 1.2.0
>         Environment: Windows XP
>            Reporter: Dave Meier
>
> Crashes on this line:
> if (optind >= __argc || *(pos = __argv[optind]) != '-')
> I changed the makefile and was able to get it to work.  Changed to the following:
> !if "$(DEBUG)" == "1"
> CFLAGS = $(CFLAGS) /D "_DEBUG" /Od /Z7
> LDFLAGS = $(LDFLAGS) /DEBUG /INCREMENTAL /NODEFAULTLIB:LIBCMTD.lib
> !else
> CFLAGS = $(CFLAGS) /D "NDEBUG" /O2 /MT
> LDFLAGS = $(LDFLAGS)
> !endif
> Basically for the DEBUG case, I removed the  $(CRUNTIME)d from CFLAGS and added back the /NODEFAULTLIB:LIBCMTD.lib to LDFLAGS that was there in 1.1.  Also changed $(CRUNTIME) to /MT for the release mode CFLAGS.
> In my configure.in, I had CRUNTIME=/MD

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Issue Comment Edited: (AXIS2C-922) axis2_http_server.exe crashes in axis2_getopt

Posted by "Dave Meier (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2C-922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12561740#action_12561740 ] 

hoodoo99 edited comment on AXIS2C-922 at 1/23/08 9:17 AM:
------------------------------------------------------------

I just got the latest source code from svn and built the debug version again.  If I put /MDd in the CFLAGS I get the crash, and if I take it out everything works fine.  I am building with Visual Studio .NET 2003.  The axis2_http_server.exe program crashes immediately when it is started in getopt_windows.c as described in my last comment.

-Dave.

      was (Author: hoodoo99):
    I just got the latest source code from svn and built the debug version again.  If I put i/MDd in the CFLAGS I get the crash, and if I take it out everything works fine.  I am building with Visual Studio .NET 2003.  The axis2_http_server.exe program crashes immediately when it is started in getopt_windows.c as described in my last comment.

-Dave.
  
> axis2_http_server.exe crashes in axis2_getopt
> ---------------------------------------------
>
>                 Key: AXIS2C-922
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-922
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: build system (Windows)
>    Affects Versions: 1.2.0
>         Environment: Windows XP
>            Reporter: Dave Meier
>
> Crashes on this line:
> if (optind >= __argc || *(pos = __argv[optind]) != '-')
> I changed the makefile and was able to get it to work.  Changed to the following:
> !if "$(DEBUG)" == "1"
> CFLAGS = $(CFLAGS) /D "_DEBUG" /Od /Z7
> LDFLAGS = $(LDFLAGS) /DEBUG /INCREMENTAL /NODEFAULTLIB:LIBCMTD.lib
> !else
> CFLAGS = $(CFLAGS) /D "NDEBUG" /O2 /MT
> LDFLAGS = $(LDFLAGS)
> !endif
> Basically for the DEBUG case, I removed the  $(CRUNTIME)d from CFLAGS and added back the /NODEFAULTLIB:LIBCMTD.lib to LDFLAGS that was there in 1.1.  Also changed $(CRUNTIME) to /MT for the release mode CFLAGS.
> In my configure.in, I had CRUNTIME=/MD

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Commented: (AXIS2C-922) axis2_http_server.exe crashes in axis2_getopt

Posted by "Dave Meier (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2C-922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12561823#action_12561823 ] 

Dave Meier commented on AXIS2C-922:
-----------------------------------

Hi Senaka,

I just rebuilt with VS 2005 and verified that yes it does work on 2005, but fails on 2003.  I guess the /MDd flag results in different behaviour on 2003.

I'll just keep building my debug copy with 2003 and no /MDd flag as the 2005 version does not allow me to debug axis2c code from my 2003 project.

-Dave.

> axis2_http_server.exe crashes in axis2_getopt
> ---------------------------------------------
>
>                 Key: AXIS2C-922
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-922
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: build system (Windows)
>    Affects Versions: 1.2.0
>         Environment: Windows XP
>            Reporter: Dave Meier
>
> Crashes on this line:
> if (optind >= __argc || *(pos = __argv[optind]) != '-')
> I changed the makefile and was able to get it to work.  Changed to the following:
> !if "$(DEBUG)" == "1"
> CFLAGS = $(CFLAGS) /D "_DEBUG" /Od /Z7
> LDFLAGS = $(LDFLAGS) /DEBUG /INCREMENTAL /NODEFAULTLIB:LIBCMTD.lib
> !else
> CFLAGS = $(CFLAGS) /D "NDEBUG" /O2 /MT
> LDFLAGS = $(LDFLAGS)
> !endif
> Basically for the DEBUG case, I removed the  $(CRUNTIME)d from CFLAGS and added back the /NODEFAULTLIB:LIBCMTD.lib to LDFLAGS that was there in 1.1.  Also changed $(CRUNTIME) to /MT for the release mode CFLAGS.
> In my configure.in, I had CRUNTIME=/MD

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Resolved: (AXIS2C-922) axis2_http_server.exe crashes in axis2_getopt

Posted by "Senaka Fernando (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-922?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Senaka Fernando resolved AXIS2C-922.
------------------------------------

    Resolution: Won't Fix
      Assignee: Senaka Fernando

Hi Dave,

Axis2/C builds fine on VC98 when I used /MD, also, I believe this is a VS2003 specific issue. As we primarily target VS2005 and above in our distributions, you are advised to use alternate workarounds to get this solved. Also, we do not support /MD in some Axis2/C sub projects too. Thus, I believe that we could simply stick to /MT.

Regards,
Senaka

> axis2_http_server.exe crashes in axis2_getopt
> ---------------------------------------------
>
>                 Key: AXIS2C-922
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-922
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: build system (Windows)
>    Affects Versions: 1.2.0
>         Environment: Windows XP
>            Reporter: Dave Meier
>            Assignee: Senaka Fernando
>
> Crashes on this line:
> if (optind >= __argc || *(pos = __argv[optind]) != '-')
> I changed the makefile and was able to get it to work.  Changed to the following:
> !if "$(DEBUG)" == "1"
> CFLAGS = $(CFLAGS) /D "_DEBUG" /Od /Z7
> LDFLAGS = $(LDFLAGS) /DEBUG /INCREMENTAL /NODEFAULTLIB:LIBCMTD.lib
> !else
> CFLAGS = $(CFLAGS) /D "NDEBUG" /O2 /MT
> LDFLAGS = $(LDFLAGS)
> !endif
> Basically for the DEBUG case, I removed the  $(CRUNTIME)d from CFLAGS and added back the /NODEFAULTLIB:LIBCMTD.lib to LDFLAGS that was there in 1.1.  Also changed $(CRUNTIME) to /MT for the release mode CFLAGS.
> In my configure.in, I had CRUNTIME=/MD

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Commented: (AXIS2C-922) axis2_http_server.exe crashes in axis2_getopt

Posted by "Dave Meier (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2C-922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12561382#action_12561382 ] 

Dave Meier commented on AXIS2C-922:
-----------------------------------

Hi Senaka,

Okay, I will need to take another look at this.  Did you try the debug version of the code?  That's what was crashing for me.

I am using Visual Studio .NET 2003 to build.  I wonder if 2005 has different behaviour for the compiler flags.

It was crashing on the following line in getopt_windows.c:

        if (optind >= __argc || *(pos = __argv[optind]) != '-')

In the debugger, I could see __p___argc, but not __argc.  The __argc argument was shown as a pointer in the debugger where it showed the arguments to axis2_getopt(...) instead of an int.  The value was 1 which is correct, but apparently it crashed when it tried to use __argc in the if statement shown above, because on the call stack it showed that it was trying to extecute code at address of 1.

-Dave.

> axis2_http_server.exe crashes in axis2_getopt
> ---------------------------------------------
>
>                 Key: AXIS2C-922
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-922
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: build system (Windows)
>    Affects Versions: 1.2.0
>         Environment: Windows XP
>            Reporter: Dave Meier
>
> Crashes on this line:
> if (optind >= __argc || *(pos = __argv[optind]) != '-')
> I changed the makefile and was able to get it to work.  Changed to the following:
> !if "$(DEBUG)" == "1"
> CFLAGS = $(CFLAGS) /D "_DEBUG" /Od /Z7
> LDFLAGS = $(LDFLAGS) /DEBUG /INCREMENTAL /NODEFAULTLIB:LIBCMTD.lib
> !else
> CFLAGS = $(CFLAGS) /D "NDEBUG" /O2 /MT
> LDFLAGS = $(LDFLAGS)
> !endif
> Basically for the DEBUG case, I removed the  $(CRUNTIME)d from CFLAGS and added back the /NODEFAULTLIB:LIBCMTD.lib to LDFLAGS that was there in 1.1.  Also changed $(CRUNTIME) to /MT for the release mode CFLAGS.
> In my configure.in, I had CRUNTIME=/MD

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org