Archived
This forum has been archived. Please start a new discussion on GitHub.
slice2cs crash
Hi, I am using slice2cs and getting reproducable crashes.
It seems to be something to do with directory lengths. Please take a look at the example - for self containment sake I have included the slice2cs.exe and its supporting files inside the example.
Please run \IceExample\git_repos\toil\Trading\Pricing\Comms\cs\reproduceCrash.bat to see the problem. Shortening the length of the directories in the location or in the --output-dir can stop the crash happening.
Note that in some situations running with the -d debug flag can also prevent crashes in similar examples.
Please get back to me if you have a patch for this.
Cheers
It seems to be something to do with directory lengths. Please take a look at the example - for self containment sake I have included the slice2cs.exe and its supporting files inside the example.
Please run \IceExample\git_repos\toil\Trading\Pricing\Comms\cs\reproduceCrash.bat to see the problem. Shortening the length of the directories in the location or in the --output-dir can stop the crash happening.
Note that in some situations running with the -d debug flag can also prevent crashes in similar examples.
Please get back to me if you have a patch for this.
Cheers
0
Comments
-
I have been unable to reproduce the crash with your example. Does it crash every time for you? What OS/compiler are you using? When it crashes does it provide any other information?0
-
We're running with .NET 3.5 SP1 on XP(32bit) with Ice 3.3.1.
When it crashes it gives the Windows dialog for a selecting whether or not to invoke the debugger. Choosing debug fires up VisualStudio but no stack trace is available.
I've been able to reproduce this in the office on 3 machines.0 -
I have been able to reproduce the issue and am currently trying to determine the nature of the problem. In the meantime there appear to be no problems if you do not pass multiple files to the slice compiler, but rather run slice2cs separately for each slice file. So you could try that as a workaround for now.0
-
I have determined that the issue is caused by a bug in mcpp, the third party preprocessor that we use. I will report the problem to the maintainer of mcpp. Until a new version of mcpp is released it is probably best that you use the workaround I suggested above.0
-
mcpp problem
Hi Dwayne, is there any update on this problem with the preprocessor? We are working around it for now.0 -
patch you supplied
I tried the patch you supplied and it seemed to work for some command lines, but it appeared to break others that were previously working. The command line it seemed to fix was about 8 files, while the previously working one that it seemed to break was 24 files.
There is also a chance that I didn't get a patched version built properly. Is there any chance I could get a step-by-step guide for the process to build mcpp and Ice properly on Windows(32-bit XP using Visual Studio 2008)? The documentation for doing that is a bit sparse, especially considering that I'm not really a Windows guy.
Thanks!
btw, we are currently using your suggested workaround and processing each file one at a time, but that means that we have external scripts to maintain for doing that. Something I'd rather avoid.0 -
I assume you are using visual studio? If so, I suggest you use our VS plugin, which avoids all external scripts.
http://www.zeroc.com/vsplugin.html0 -
To rebuild with the patched MCPP you will first have to download the source distributions for MCPP 2.7.2 and Ice 3.3.1, the Ice 3.3.1 third party binaries for VS 2008 (Ice-3.3.1-ThirdParty-VC90.msi) and the MCPP patch posted in the other thread.
Install the third party binaries.
Unpack the mcpp source distribution and apply the patchcd mcpp-2.7.2 patch -p0 < patch.mcpp.2.7.2.txt
If you do not already have it, for Windows the patch utility can be obtained here.
Now you need to rebuild mcppcd mcpp-2.7.2\src patch -p0 < ..\noconfig\vc2008.dif nmake MCPP_LIB=1 /f ..\noconfig\visualc.mak mcpplib copy mcpp.lib C:\Ice-3.3.1-ThirdParty-VC90\lib
Unpack the Ice 3.3.1 source distribution edit cpp\config\Make.rules.mak to set OPTIMIZE=yes and CPP_COMPILER=VC90. Now in a "Visual Studio 2008 Command Prompt" runcd Ice-3.3.1\cpp\src\IceUtil nmake /f Makefile.mak cd ..\Slice nmake /f Makefile.mak
Now replace slice33.dll in your Ice 3.3.1 binary distribution with the one in cpp/bin that you just compiled. There should be no need to rebuild slice2cs itself.0 -
Seems to work
Thanks for the help. The patch seems to work. I'll let you know if we see any other strange behavior.0