public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* NullPointerException in a win32 application
@ 2003-07-26 17:22 Thijs Cadier
  2003-07-26 17:37 ` Tom Tromey
  2003-07-28  9:59 ` Ranjit Mathew
  0 siblings, 2 replies; 5+ messages in thread
From: Thijs Cadier @ 2003-07-26 17:22 UTC (permalink / raw)
  To: gcc

Hi,

After quit a lot of hassle I've compiled a SWT application for windows. This
application uses the Hessian lib from caucho ( www.caucho.com/hessian ).
I've put the sources in my project and compiled them along with my own
sources. The application runs fine. But when a class in the lib is used the
application throws this Exception:

java.lang.NullPointerException
   at 0x00613380 (D:\datal\gcc\gcc\gcc\libgcc2.c)
   at 0x00612d64 (D:\datal\gcc\gcc\gcc\libgcc2.c)
   at 0x00612d35 (D:\datal\gcc\gcc\gcc\libgcc2.c)
   at 0x005f6da3 (D:\datal\gcc\gcc\gcc\libgcc2.c)
   at 0x0066536a (D:\datal\gcc\gcc\gcc\libgcc2.c)
   at 0x77eab45b (Unknown Source)

The application runs fine in Sun J2SE 1.4.

Now I'm wondering about 2 things:

- Would you say it's the responsibity of the Lib vendor to test their
software with GCJ?

- What would be a way to solve a problem like this? I'm a quite experienced
java developer. But I've got no clue about these kind of things.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: NullPointerException in a win32 application
  2003-07-26 17:22 NullPointerException in a win32 application Thijs Cadier
@ 2003-07-26 17:37 ` Tom Tromey
  2003-07-26 17:59   ` Thijs Cadier
  2003-07-28  9:59 ` Ranjit Mathew
  1 sibling, 1 reply; 5+ messages in thread
From: Tom Tromey @ 2003-07-26 17:37 UTC (permalink / raw)
  To: Thijs Cadier; +Cc: GCC Hackers

>>>>> "Thijs" == Thijs Cadier <thijs@cadier.net> writes:

Thijs> - Would you say it's the responsibity of the Lib vendor to test their
Thijs> software with GCJ?

We'd love it if they did.

Thijs> - What would be a way to solve a problem like this? I'm a quite
Thijs> experienced java developer. But I've got no clue about these
Thijs> kind of things.

You can use gdb to debug your application.

Tom

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: NullPointerException in a win32 application
  2003-07-26 17:37 ` Tom Tromey
@ 2003-07-26 17:59   ` Thijs Cadier
  2003-07-29 18:06     ` Tom Tromey
  0 siblings, 1 reply; 5+ messages in thread
From: Thijs Cadier @ 2003-07-26 17:59 UTC (permalink / raw)
  To: tromey; +Cc: GCC Hackers

Would the cause for an error like this lie in the Java code? Or would
something have to be compiled in another way?

----- Original Message ----- 
From: "Tom Tromey" <tromey@redhat.com>
To: "Thijs Cadier" <thijs@cadier.net>
Cc: "GCC Hackers" <gcc@gcc.gnu.org>
Sent: Saturday, July 26, 2003 4:51 PM
Subject: Re: NullPointerException in a win32 application


> >>>>> "Thijs" == Thijs Cadier <thijs@cadier.net> writes:
>
> Thijs> - Would you say it's the responsibity of the Lib vendor to test
their
> Thijs> software with GCJ?
>
> We'd love it if they did.
>
> Thijs> - What would be a way to solve a problem like this? I'm a quite
> Thijs> experienced java developer. But I've got no clue about these
> Thijs> kind of things.
>
> You can use gdb to debug your application.
>
> Tom
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: NullPointerException in a win32 application
  2003-07-26 17:22 NullPointerException in a win32 application Thijs Cadier
  2003-07-26 17:37 ` Tom Tromey
@ 2003-07-28  9:59 ` Ranjit Mathew
  1 sibling, 0 replies; 5+ messages in thread
From: Ranjit Mathew @ 2003-07-28  9:59 UTC (permalink / raw)
  To: gcc; +Cc: java

Thijs Cadier wrote:
> After quit a lot of hassle I've compiled a SWT application for windows. This
> application uses the Hessian lib from caucho ( www.caucho.com/hessian ).
> I've put the sources in my project and compiled them along with my own
> sources. The application runs fine. But when a class in the lib is used the
> application throws this Exception:
> 
> java.lang.NullPointerException
>    at 0x00613380 (D:\datal\gcc\gcc\gcc\libgcc2.c)
>    at 0x00612d64 (D:\datal\gcc\gcc\gcc\libgcc2.c)
>    at 0x00612d35 (D:\datal\gcc\gcc\gcc\libgcc2.c)
>    at 0x005f6da3 (D:\datal\gcc\gcc\gcc\libgcc2.c)
>    at 0x0066536a (D:\datal\gcc\gcc\gcc\libgcc2.c)
>    at 0x77eab45b (Unknown Source)
> 
> The application runs fine in Sun J2SE 1.4.

If you aren't already, you should compile everything
with "-g".

You should also ensure that "c++filt" and "addr2line"
are in your PATH when you run this application. These
ensure that you get a proper stacktrace at times
like these.

Lastly, we should probably carry further discussion
on this to "java@gcc.gnu.org".

Ranjit.

-- 
Ranjit Mathew          Email: rmathew AT hotmail DOT com

Bangalore, INDIA.      Web: http://ranjitmathew.tripod.com/


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: NullPointerException in a win32 application
  2003-07-26 17:59   ` Thijs Cadier
@ 2003-07-29 18:06     ` Tom Tromey
  0 siblings, 0 replies; 5+ messages in thread
From: Tom Tromey @ 2003-07-29 18:06 UTC (permalink / raw)
  To: Thijs Cadier; +Cc: GCC Hackers

>>>>> "Thijs" == Thijs Cadier <thijs@cadier.net> writes:

[ NullPointerException ]

Thijs> Would the cause for an error like this lie in the Java code? Or
Thijs> would something have to be compiled in another way?

It is most likely in the java code.  Sometimes this can be a libgcj
bug, sometimes it is a bug in application code that makes invalid
assumptions about the VM it is running on.  You have to debug to find
out.

Tom

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-07-29 17:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-26 17:22 NullPointerException in a win32 application Thijs Cadier
2003-07-26 17:37 ` Tom Tromey
2003-07-26 17:59   ` Thijs Cadier
2003-07-29 18:06     ` Tom Tromey
2003-07-28  9:59 ` Ranjit Mathew

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).