You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Aleksey Ignatenko <al...@gmail.com> on 2006/08/01 09:59:13 UTC

Re: [general]Snapshot cannot work on Win2K

Hi, it looks like your friend needs to install Microsoft Platform SDK on his
PC .
Another solution is to download and update version of dbghelp library from
msdn site.
I didn't check the second solution.
If you don't not succeed for some reason, simply modify
nt_exception_filter.cpp file excluding lines:
#include <dbghelp.h>,
#pragma comment(linker, "/defaultlib:dbghelp.lib"),
print_callstack function. It will disable call stack printing when crash
happens.

Aleksey.


On 7/31/06, Paulex Yang <pa...@gmail.com> wrote:
>
> Hi, all
>
> I tried the latest snapshot[1] today on Win2K server with SP4 and hotfix
> until 2005-08-23, (actually one friend wanted to use Harmony on his old
> machines, he also had some experience about Eclipse on Harmony month ago
> here[2]), but it failed even for "java -version", some error thrown as
> Windows error box with message like "Cannot locate SymFromAddr at
> dbghelp.dll" or so, while the latest classlib build with IBM VME works
> fine on it. He said he also tried to compile DRLVM on the Win2k, but it
> requires to download Eclipse 3.1.1(I guess only Eclipse compiler is
> needed?), so he gave up. Any ideas can help me to pull him back to
> Harmony from Sun JDK? :-D
>
> [1]
>
> http://people.apache.org/dist/incubator/harmony/snapshots/latest-hdk-windows.zip
> [2]
>
> http://my.donews.com/eclipse/2006/05/10/run-eclipse-32-sdk-under-apache-harmony/
>
> --
> Paulex Yang
> China Software Development Lab
> IBM
>
>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>

Re: [general]Snapshot cannot work on Win2K

Posted by Aleksey Ignatenko <al...@gmail.com>.
Hi, I have no Win2K to check the issue, but I checked that dbghelp works
fine on WinXP and  Windows Server 2003.
I see trivial solution here, we can simply disable dbghelp usage for systems
older than WinXp. It could be done by _WIN32_WINNT macros:
_WIN32_WINNT>=0x0501 means WinXP and Windows Server 2003 server only.
I also want to note that callstack print is caused by some crash in VM
handled with crash_handler.
Proposed fix:

Index: nt_exception_filter.cpp

===================================================================

--- nt_exception_filter.cpp     (revision 427015)

+++ nt_exception_filter.cpp     (working copy)

@@ -29,9 +29,11 @@

 // Windows specific

 #include <string>

 #include <excpt.h>

+#if _WIN32_WINNT >= 0x0501

 #include <dbghelp.h>

 #include <windows.h>

 #pragma comment(linker, "/defaultlib:dbghelp.lib")

+#endif



 static inline void nt_to_vm_context(PCONTEXT context, Registers* regs)

 {

@@ -86,6 +88,7 @@

 }



 // CallStack print

+#if _WIN32_WINNT >= 0x0501

 #define CALLSTACK_DEPTH_LIMIT 100 // max stack length is 100 to prevent
getting into loop



 static void print_callstack(LPEXCEPTION_POINTERS nt_exception)

@@ -148,6 +151,10 @@



     fflush(stderr);

 }

+#define PRINT_CALLSTACK(Exc) print_callstack(Exc)

+#else

+#define PRINT_CALLSTACK(Exc)

+#endif



 /*

  * Information about stack

@@ -367,7 +374,7 @@



         if (!vm_get_boolean_property_value_with_default("vm.assert_dialog"))
{

             print_state(nt_exception, msg);

-            print_callstack(nt_exception);

+            PRINT_CALLSTACK(nt_exception);

             LOGGER_EXIT(-1);



         }

Best regards,
Aleksey.

On 8/2/06, Geir Magnusson Jr <ge...@pobox.com> wrote:
>
>
>
> Paulex Yang wrote:
> > Geir Magnusson Jr wrote:
> >> Paulex Yang wrote:
> >>
> >>> Finally I found a stable win2k installation(still server edition with
> >>> SP4) , and installed Windows Platform SDK, but same error happens,
> then
> >>> I restarted it, but nothing changed:(, my Platform SDK was downloaded
> at
> >>> end of 2005, did I make any mistakes? Do I have to recompile DRLVM on
> >>> win2k?
> >>>
> >>>
> >>
> >> I think we need to find out whatever is requiring dbghelp and fix that.
>
> >>  I'm really hoping we don't need a separate snapshot for Win2k
> >>
> >> geir
> >>
> > +1 from me, from Aleksey's comments below, can I safely assume it is
> > done only by updating the nt_exception_filter.cpp? I did a search in
> > DRLVM trunk, this is the only file referring to dbghelp.h.
> >>
>
> Ooh.  Missed that.  Ok, so the problem is clear.  How do we want to
> handle this?
>
> I think it's important that on crashes, we get this info...
>
> geir
>
>
> >>> Aleksey Ignatenko wrote:
> >>>
> >>>> Hi, it looks like your friend needs to install Microsoft Platform SDK
> >>>> on his
> >>>> PC .
> >>>> Another solution is to download and update version of dbghelp library
> >>>> from
> >>>> msdn site.
> >>>> I didn't check the second solution.
> >>>> If you don't not succeed for some reason, simply modify
> >>>> nt_exception_filter.cpp file excluding lines:
> >>>> #include <dbghelp.h>,
> >>>> #pragma comment(linker, "/defaultlib:dbghelp.lib"),
> >>>> print_callstack function. It will disable call stack printing when
> >>>> crash
> >>>> happens.
> >>>>
> >>>> Aleksey.
> >>>>
> >>>>
> >>>>
> >>
> >>
> >
> >
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>

Re: [general]Snapshot cannot work on Win2K

Posted by Geir Magnusson Jr <ge...@pobox.com>.

Paulex Yang wrote:
> Geir Magnusson Jr wrote:
>> Paulex Yang wrote:
>>  
>>> Finally I found a stable win2k installation(still server edition with
>>> SP4) , and installed Windows Platform SDK, but same error happens, then
>>> I restarted it, but nothing changed:(, my Platform SDK was downloaded at
>>> end of 2005, did I make any mistakes? Do I have to recompile DRLVM on
>>> win2k?
>>>
>>>     
>>
>> I think we need to find out whatever is requiring dbghelp and fix that.
>>  I'm really hoping we don't need a separate snapshot for Win2k
>>
>> geir
>>   
> +1 from me, from Aleksey's comments below, can I safely assume it is
> done only by updating the nt_exception_filter.cpp? I did a search in
> DRLVM trunk, this is the only file referring to dbghelp.h.
>>  

Ooh.  Missed that.  Ok, so the problem is clear.  How do we want to
handle this?

I think it's important that on crashes, we get this info...

geir


>>> Aleksey Ignatenko wrote:
>>>    
>>>> Hi, it looks like your friend needs to install Microsoft Platform SDK
>>>> on his
>>>> PC .
>>>> Another solution is to download and update version of dbghelp library
>>>> from
>>>> msdn site.
>>>> I didn't check the second solution.
>>>> If you don't not succeed for some reason, simply modify
>>>> nt_exception_filter.cpp file excluding lines:
>>>> #include <dbghelp.h>,
>>>> #pragma comment(linker, "/defaultlib:dbghelp.lib"),
>>>> print_callstack function. It will disable call stack printing when
>>>> crash
>>>> happens.
>>>>
>>>> Aleksey.
>>>>
>>>>
>>>>       
>>
>>   
> 
> 

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [general]Snapshot cannot work on Win2K

Posted by Paulex Yang <pa...@gmail.com>.
Geir Magnusson Jr wrote:
> Paulex Yang wrote:
>   
>> Finally I found a stable win2k installation(still server edition with
>> SP4) , and installed Windows Platform SDK, but same error happens, then
>> I restarted it, but nothing changed:(, my Platform SDK was downloaded at
>> end of 2005, did I make any mistakes? Do I have to recompile DRLVM on
>> win2k?
>>
>>     
>
> I think we need to find out whatever is requiring dbghelp and fix that.
>  I'm really hoping we don't need a separate snapshot for Win2k
>
> geir
>   
+1 from me, from Aleksey's comments below, can I safely assume it is 
done only by updating the nt_exception_filter.cpp? I did a search in 
DRLVM trunk, this is the only file referring to dbghelp.h.
>   
>> Aleksey Ignatenko wrote:
>>     
>>> Hi, it looks like your friend needs to install Microsoft Platform SDK
>>> on his
>>> PC .
>>> Another solution is to download and update version of dbghelp library
>>> from
>>> msdn site.
>>> I didn't check the second solution.
>>> If you don't not succeed for some reason, simply modify
>>> nt_exception_filter.cpp file excluding lines:
>>> #include <dbghelp.h>,
>>> #pragma comment(linker, "/defaultlib:dbghelp.lib"),
>>> print_callstack function. It will disable call stack printing when crash
>>> happens.
>>>
>>> Aleksey.
>>>
>>>
>>>       
>
>   


-- 
Paulex Yang
China Software Development Lab
IBM



---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [general]Snapshot cannot work on Win2K

Posted by Geir Magnusson Jr <ge...@pobox.com>.

Paulex Yang wrote:
> Finally I found a stable win2k installation(still server edition with
> SP4) , and installed Windows Platform SDK, but same error happens, then
> I restarted it, but nothing changed:(, my Platform SDK was downloaded at
> end of 2005, did I make any mistakes? Do I have to recompile DRLVM on
> win2k?
> 

I think we need to find out whatever is requiring dbghelp and fix that.
 I'm really hoping we don't need a separate snapshot for Win2k

geir

> Aleksey Ignatenko wrote:
>> Hi, it looks like your friend needs to install Microsoft Platform SDK
>> on his
>> PC .
>> Another solution is to download and update version of dbghelp library
>> from
>> msdn site.
>> I didn't check the second solution.
>> If you don't not succeed for some reason, simply modify
>> nt_exception_filter.cpp file excluding lines:
>> #include <dbghelp.h>,
>> #pragma comment(linker, "/defaultlib:dbghelp.lib"),
>> print_callstack function. It will disable call stack printing when crash
>> happens.
>>
>> Aleksey.
>>
>>
>> On 7/31/06, Paulex Yang <pa...@gmail.com> wrote:
>>>
>>> Hi, all
>>>
>>> I tried the latest snapshot[1] today on Win2K server with SP4 and hotfix
>>> until 2005-08-23, (actually one friend wanted to use Harmony on his old
>>> machines, he also had some experience about Eclipse on Harmony month ago
>>> here[2]), but it failed even for "java -version", some error thrown as
>>> Windows error box with message like "Cannot locate SymFromAddr at
>>> dbghelp.dll" or so, while the latest classlib build with IBM VME works
>>> fine on it. He said he also tried to compile DRLVM on the Win2k, but it
>>> requires to download Eclipse 3.1.1(I guess only Eclipse compiler is
>>> needed?), so he gave up. Any ideas can help me to pull him back to
>>> Harmony from Sun JDK? :-D
>>>
>>> [1]
>>>
>>> http://people.apache.org/dist/incubator/harmony/snapshots/latest-hdk-windows.zip
>>>
>>> [2]
>>>
>>> http://my.donews.com/eclipse/2006/05/10/run-eclipse-32-sdk-under-apache-harmony/
>>>
>>>
>>> -- 
>>> Paulex Yang
>>> China Software Development Lab
>>> IBM
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>>> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>>>
>>>
>>
> 
> 

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [general]Snapshot cannot work on Win2K

Posted by Paulex Yang <pa...@gmail.com>.
Finally I found a stable win2k installation(still server edition with 
SP4) , and installed Windows Platform SDK, but same error happens, then 
I restarted it, but nothing changed:(, my Platform SDK was downloaded at 
end of 2005, did I make any mistakes? Do I have to recompile DRLVM on win2k?

Aleksey Ignatenko wrote:
> Hi, it looks like your friend needs to install Microsoft Platform SDK 
> on his
> PC .
> Another solution is to download and update version of dbghelp library 
> from
> msdn site.
> I didn't check the second solution.
> If you don't not succeed for some reason, simply modify
> nt_exception_filter.cpp file excluding lines:
> #include <dbghelp.h>,
> #pragma comment(linker, "/defaultlib:dbghelp.lib"),
> print_callstack function. It will disable call stack printing when crash
> happens.
>
> Aleksey.
>
>
> On 7/31/06, Paulex Yang <pa...@gmail.com> wrote:
>>
>> Hi, all
>>
>> I tried the latest snapshot[1] today on Win2K server with SP4 and hotfix
>> until 2005-08-23, (actually one friend wanted to use Harmony on his old
>> machines, he also had some experience about Eclipse on Harmony month ago
>> here[2]), but it failed even for "java -version", some error thrown as
>> Windows error box with message like "Cannot locate SymFromAddr at
>> dbghelp.dll" or so, while the latest classlib build with IBM VME works
>> fine on it. He said he also tried to compile DRLVM on the Win2k, but it
>> requires to download Eclipse 3.1.1(I guess only Eclipse compiler is
>> needed?), so he gave up. Any ideas can help me to pull him back to
>> Harmony from Sun JDK? :-D
>>
>> [1]
>>
>> http://people.apache.org/dist/incubator/harmony/snapshots/latest-hdk-windows.zip 
>>
>> [2]
>>
>> http://my.donews.com/eclipse/2006/05/10/run-eclipse-32-sdk-under-apache-harmony/ 
>>
>>
>> -- 
>> Paulex Yang
>> China Software Development Lab
>> IBM
>>
>>
>>
>> ---------------------------------------------------------------------
>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>>
>>
>


-- 
Paulex Yang
China Software Development Lab
IBM



---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [general]Snapshot cannot work on Win2K

Posted by Geir Magnusson Jr <ge...@pobox.com>.
Why is it needed?  Clearly something is wrong w/ the binary snapshot,
which is supposed to be a release build...

geir


Salikh Zakirov wrote:
> 
> Aleksey Ignatenko wrote:
>> Hi, it looks like your friend needs to install Microsoft Platform SDK on
>> his
>> PC .
>> Another solution is to download and update version of dbghelp library from
>> msdn site.
> 
> I vaguely remember that Microsoft license allows to include dbghelp.dll
> to binary distributions. Below is a quote from EULA (end user license agreement).
> May be we could put dbghelp.dll to binary snapshots?
> 
> 
> --- 8< --- 
> * Distribution Terms.  You may reproduce and distribute an unlimited number of copies of the Sample Code and/or 
> Redistributable Code (collectively "Redistributable Components") as described above in object code form, provided that (a) 
> you distribute the Redistributable Components only in conjunction with and as a part of your Application solely for use with a 
> Microsoft Operating System Product; (b) your Application adds significant and primary functionality to the Redistributable 
> Components; (c) you distribute your Application containing the Redistributable Components pursuant to an End-User License 
> Agreement (which may be "break-the-seal", "click-wrap" or signed), with terms no less protective than those contained herein; 
> (d) you do not permit further redistribution of the Redistributable Components by your end-user customers; (e) you do not use 
> Microsoft's name, logo, or trademarks to market your Application; (f) you include a valid copyright notice on your 
> Application; and (g) you agree to indemnify, hold harmless, and defend Microsoft from and against any claims or lawsuits, 
> including attorneys' fees, that arise or result from the use or distribution of your Application.  Contact Microsoft for the 
> applicable licensing terms for all other uses and/or distribution of the Redistributable Components.
> --- 8< ---
> 
> [1] http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=CD1FC4B2-0885-47F4-AF45-7FD5E14DB6C0
> 
> 
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> 
> 
> 

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [general]Snapshot cannot work on Win2K

Posted by Salikh Zakirov <Sa...@Intel.com>.

Aleksey Ignatenko wrote:
> Hi, it looks like your friend needs to install Microsoft Platform SDK on
> his
> PC .
> Another solution is to download and update version of dbghelp library from
> msdn site.

I vaguely remember that Microsoft license allows to include dbghelp.dll
to binary distributions. Below is a quote from EULA (end user license agreement).
May be we could put dbghelp.dll to binary snapshots?


--- 8< --- 
* Distribution Terms.  You may reproduce and distribute an unlimited number of copies of the Sample Code and/or 
Redistributable Code (collectively "Redistributable Components") as described above in object code form, provided that (a) 
you distribute the Redistributable Components only in conjunction with and as a part of your Application solely for use with a 
Microsoft Operating System Product; (b) your Application adds significant and primary functionality to the Redistributable 
Components; (c) you distribute your Application containing the Redistributable Components pursuant to an End-User License 
Agreement (which may be "break-the-seal", "click-wrap" or signed), with terms no less protective than those contained herein; 
(d) you do not permit further redistribution of the Redistributable Components by your end-user customers; (e) you do not use 
Microsoft's name, logo, or trademarks to market your Application; (f) you include a valid copyright notice on your 
Application; and (g) you agree to indemnify, hold harmless, and defend Microsoft from and against any claims or lawsuits, 
including attorneys' fees, that arise or result from the use or distribution of your Application.  Contact Microsoft for the 
applicable licensing terms for all other uses and/or distribution of the Redistributable Components.
--- 8< ---

[1] http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=CD1FC4B2-0885-47F4-AF45-7FD5E14DB6C0


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [general]Snapshot cannot work on Win2K

Posted by Paulex Yang <pa...@gmail.com>.
I've tried to update dbghelp yesterday, but it didn't work, will try 
after installing Platform SDK soon. Thank you very much, Aleksey.

Aleksey Ignatenko wrote:
> Hi, it looks like your friend needs to install Microsoft Platform SDK 
> on his
> PC .
> Another solution is to download and update version of dbghelp library 
> from
> msdn site.
> I didn't check the second solution.
> If you don't not succeed for some reason, simply modify
> nt_exception_filter.cpp file excluding lines:
> #include <dbghelp.h>,
> #pragma comment(linker, "/defaultlib:dbghelp.lib"),
> print_callstack function. It will disable call stack printing when crash
> happens.
>
> Aleksey.
>
>
> On 7/31/06, Paulex Yang <pa...@gmail.com> wrote:
>>
>> Hi, all
>>
>> I tried the latest snapshot[1] today on Win2K server with SP4 and hotfix
>> until 2005-08-23, (actually one friend wanted to use Harmony on his old
>> machines, he also had some experience about Eclipse on Harmony month ago
>> here[2]), but it failed even for "java -version", some error thrown as
>> Windows error box with message like "Cannot locate SymFromAddr at
>> dbghelp.dll" or so, while the latest classlib build with IBM VME works
>> fine on it. He said he also tried to compile DRLVM on the Win2k, but it
>> requires to download Eclipse 3.1.1(I guess only Eclipse compiler is
>> needed?), so he gave up. Any ideas can help me to pull him back to
>> Harmony from Sun JDK? :-D
>>
>> [1]
>>
>> http://people.apache.org/dist/incubator/harmony/snapshots/latest-hdk-windows.zip 
>>
>> [2]
>>
>> http://my.donews.com/eclipse/2006/05/10/run-eclipse-32-sdk-under-apache-harmony/ 
>>
>>
>> -- 
>> Paulex Yang
>> China Software Development Lab
>> IBM
>>
>>
>>
>> ---------------------------------------------------------------------
>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>>
>>
>


-- 
Paulex Yang
China Software Development Lab
IBM



---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org