Re: Java call on object causes segfault.
| From: | Philip Olson | Date: | Sun, 26 Jan 2003 21:08:03 +0000 |
| Subject: | Re: Java call on object causes segfault. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-133194@lists.php.net to get a copy of this message | ||
Whenever you get a segfault, try the latest
stable release and during compile be sure to
use --enable-debug
:
http://snaps.php.net/
If the segfault exists here, write a bug report
and include the backtrace:
http://bugs.php.net/how-to-report.php
http://bugs.php.net/
This will be of great help to the php-dev team. Also
I believe many changes to the Java extension went
into 4.3.0 so maybe it'll work for you.
Regards,
Philip
On Sun, 26 Jan 2003, John Wells wrote:
> Working on getting Java integration going. I was able to get it to work
> with the online example and can create an object of java.lang.System and
> print various properties returned from there.
>
> However, if I create my own class, I can instantiate it, but if I call a
> method on that class it causes a SIGSEV.
>
> Could anyone provide some insight?
>
> Here's the code and backtrace:
>
> This is with Sun jdk 1.4.1_1, php-4.2.3 on Red Hat 8.0.
>
> <?
>
> $obj = new Java('com.x.reports.Serv');
>
> print $obj->getMsg();
> ?>
>
> --- java code stored off of class path in com/x/reports ---
> package com.x.reports;
>
> class Serv
> {
> public String msg = "THIS IS A TEST MESSAGE";
>
> Serv()
> {
>
> }
>
> public String getMsg()
> {
> return this.msg;
> }
>
> }
>
> ------------------ BACKTRACE -------------------
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 8192 (LWP 9303)]
> 0x402da2cb in java_call_function_handler (ht=0, return_value=0x8114d14,
> this_ptr=0x810d604, return_value_used=1, property_reference=0xbfffdf54)
> at java.c:464
> 464 obj = zend_list_find(Z_LVAL_PP(handle), &type);
> (gdb) bt
> #0 0x402da2cb in java_call_function_handler (ht=0,
> return_value=0x8114d14, this_ptr=0x810d604, return_value_used=1,
> property_reference=0xbfffdf54) at java.c:464
> #1 0x40191553 in call_overloaded_function (T=0xbfffdf48, arg_count=0,
> return_value=0x8114d14) at zend_execute.c:953
> #2 0x40194636 in execute (op_array=0x8114b6c) at zend_execute.c:1660
> #3 0x401a40a3 in zend_execute_scripts (type=8, retval=0x0,
> file_count=3) at zend.c:812
> #4 0x401b5aaf in php_execute_script (primary_file=0xbffff450) at
> main.c:1383
> #5 0x401b0aba in apache_php_module_main (r=0x8107004,
> display_source_mode=0) at sapi_apache.c:90
> #6 0x401b18ea in send_php (r=0x8107004, display_source_mode=0,
> filename=0x8107b34 "/opt/apache_1.3.27/htdocs/t.php") at mod_php4.c:575
> #7 0x401b1963 in send_parsed_php (r=0x8107004) at mod_php4.c:590
> #8 0x08074880 in ap_invoke_handler ()
> #9 0x08088c76 in process_request_internal ()
> #10 0x08088cd6 in ap_process_request ()
> #11 0x0807ff9a in child_main ()
> #12 0x0808013a in make_child ()
> #13 0x080802a1 in startup_children ()
> #14 0x080808ce in standalone_main ()
> #15 0x080810ec in main ()
> #16 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>