Re: gdiplus crash with small source.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



The exception is an write violation, but that doesn't matter. It doesn't
matter either that I duplicate points. It should not crash. It's not my
responsibility to ensure that legal input doesn't crash the dll. I'm not
looking for a workaround, because the problem is hard to isolate. I'm
looking for a bugfix.

"Christian Kaiser" <bchk@xxxxxx> wrote in message
news:OS1hxqPbFHA.2124@xxxxxxxxxxxxxxxxxxxxxxx
> Question: what sort of GPF?
>
> If GPI somewhere calculates the distance between the points, giving the
> same
> point twice could result in a division by zero if GDI uses the distance as
> divisor in some code.
>
> Christian
>
> "Arnaud VALLAT" <vallat_a@xxxxxxxxxxx> wrote in message
> news:ujfsxiPbFHA.4040@xxxxxxxxxxxxxxxxxxxxxxx
>> Arnaud VALLAT wrote:
>>> Ben Harper wrote:
>>>
>>>> I have this small project consisting of legal (to the best of my
>>>> knowledge) source which causes a GPF in gdiplus.dll. Please could
>>>> somebody from Microsoft repond on this? I will continue to repost this
>>>> message until such time.
>>>>
>>>> Thanks,
>>>> Ben
>>>>
>>> Hi,
>>>
>>> I'm not from Microsoft but I have tested your code and I think I have
>>> found the problem : negative values ... I have just done that :
>>>
>>> srand((unsigned int)time(NULL));
>>>
>>> int criticalWidth = 612;
>>> int criticalHeight = 317;
>>>
>>> Point ptsb[NP];
>>> for ( int i = 0; i < NP; i++ )
>>> {
>>> ptsb[i].X = rand() % criticalWidth; //ptsa[i].x;
>>> ptsb[i].Y = rand() % criticalHeight; // ptsa[i].y;
>>> }
>>>
>>>
>>> And there is no more problem.
>>>
>>> Rno
>>
>> In fact it's not that ... My solution works but if I change this on
>> your original code :
>>
>> POINT ptsa[NP] = {
>> {552, -2},
>> {535, 5},
>> {527, -12},
>> {523, -11},
>> {520, -17},
>> {519, -16},
>> {517, -20},
>> {516, -19},
>> {507, -37},
>> {511, -47},
>> {518, -44},
>> {519, -43},
>> {533, -52},
>> {543, -58},
>> {545, -60},
>> {548, -61},
>> {553, -64},
>> {564, -71},
>> {585, -15},
>> {610, -26},
>> {611, -27},
>> {612, -27},
>> {615, -25},
>> {619, -21},
>> {627, -10},
>> {628, -10},//{627, -10}, // it was there twice
>> {622, -7},
>> {620, -7},
>> {610, -6},
>> {610, -4},
>> {609, -3},
>> {608, -1},
>> {606, 0},
>> {606, 2},
>> {605, 3},
>> {605, 5},
>> {604, 7},
>> {605, 25},
>> {605, 26},
>> {605, 28},
>> {592, 42},
>> {591, 45},
>> {586, 52},
>> {585, 53},
>> {581, 57},
>> {576, 63},
>> {552, -2} };
>>
>> There is no more problem.
>>
>> I don't understand too why it crashes.
>>
>> Sorry.
>>
>> Rno
>> --
>> Arnaud VALLAT
>
>


.



Relevant Pages

  • Trebons Nat Crash - opinions ?
    ... Nationals first-hand or via YouTube, I'm interested in your thoughts on ... this matter. ... Will this crash of a high profile racer usher in the need for heat & ...
    (rec.bicycles.racing)
  • Re: Hey Werner! Found one...
    ... but all we had to do was let Crash play with the ... heh. ... No matter how tight I thought ... CoinSpin ...
    (comp.sys.ibm.pc.games.rpg)
  • Drawing.dll "The object is currently in use elsewhere"
    ... I have an app which makes a number of calls to Drawing.DLL. ... crash at random points during program execution. ... No matter how I try to ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: How long to finish the race (Kyle petty)
    ... >> what would it matter. ... >> crossing the line isn't going to mean anything. ... >position he was in but if he was say 20th on the white flag lap. ... If he finishes but others, in the crash, don't he would finish 16th. ...
    (rec.autos.sport.nascar)