Re: Strange crash in Player server

Geoff Biggs <[email protected]>
Newsgroups gmane.science.robotics.playerstage
Message-ID <[email protected]>
There are few like that sprinkled around the code. For a long time, 
people were using assert to check error returns all over the place, 
especially in drivers, and never finding the problem with doing that 
because Player didn't have a release build until the CMake build system. 
:) I thought we had got them all, but apparently not.

Geoff

On 03/07/10 12:44, Rich Mattes wrote:
> Changing
>
> assert(sortedlist = (char**)malloc(numdrivers*sizeof(char*)));
>
>
> to
>
> sortedlist = (char**)malloc(numdrivers*sizeof(char*));
>
> assert(sortedlist);
>
>
> fixes the crash. With DNDEBUG enabled, sortedlist never gets allocated
> because the assertion is skipped. I think. Anyway, with that out the
> way, the Windows build should be up soon (once I test it on some other
> machines)
>
> Rich
>
> On 07/01/2010 09:35 AM, Rich Mattes wrote:
>>
>> Hi guys,
>>
>> I finally managed to get the Windows version of release 3.0.2 built
>> last night (woo hoo!). Or so I thought. I installed and tested it, and
>> ran in to the error reported here:
>>
>> http://sourceforge.net/tracker/?func=detail&aid=3000451&group_id=42445&atid=433164
>>
>> I was able to re-create that error last week on Linux by setting the
>> build type to Release. Since Release sets some cflags to use –O3, I
>> tried changing them back to –O2, but to no avail. The only other cflag
>> being set is DNDEBUG, which I didn’t think too much about at the time.
>> I eventually got busy with other things and didn’t investigate any
>> further.
>>
>> Fast forward to yesterday, the Windows build is crashing in the same
>> place in all build configurations (Release, Debug). It happens right
>> at the call to DriverTable::SortDrivers() in server/server.cc,
>> PrintUsage(). I set a breakpoint there and tried to step into the
>> code, but it immediately errors and jumps to some file-handle related
>> function. The Windows error message has something to do with an access
>> violation; I don’t have the exact message in front of me but I can
>> post it later today. I think it has something to do with char**
>> sortedlist being uninitialized, but it gets allocated in SortDrivers
>> before anything happens.
>>
>> server.cc and drivertable.cc haven’t been changed in 8 or more months,
>> I am just wondering if anyone has any ideas before I dig deeper into
>> the problem.
>>
>> Thanks,
>>
>> Rich
>>
>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
>
>
>
> _______________________________________________
> Playerstage-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/playerstage-developers

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.