Code Monkey home page Code Monkey logo

Comments (10)

jcupitt avatar jcupitt commented on June 15, 2024

Oh dear, that looks bad. I'm sorry, I'm not sure what is generating the message either.

I think I would try with G_DEBUG set to fatal-criticals. This will make glib dump core on the first critical warning. You should then be able to get a backtrace from gdb. Build vips with -g and no optimization to make the backtrace more useful.

from php-vips-ext.

jcupitt avatar jcupitt commented on June 15, 2024

Notes on G_DEBUG settings:

https://developer.gnome.org/glib/stable/glib-running.html

If you build libvips with --enable-debug, it'll turn fatal on for you.

from php-vips-ext.

kleisauke avatar kleisauke commented on June 15, 2024

I did some debugging with gdb (breakpoint is set on g_log) in our test environment, here's the output:

#0  0x000077337affd643 in g_logv () at /lib64/libglib-2.0.so.0
#1  0x000077337affd7bf in g_log () at /lib64/libglib-2.0.so.0
#2  0x000077337bb59ccf in vips_php_zval_to_gval (match_image=0x7036cbe84d0, zvalue=zvalue@entry=0x77338f0a4f20, gvalue=gvalue@entry=0x7b921de2b2e0) at /usr/src/debug/php-pecl-vips-1.0.4/NTS/vips.c:424
#3  0x000077337bb5a6fa in vips_php_set_value (pspec=<optimized out>, flags=(VIPS_ARGUMENT_CONSTRUCT | VIPS_ARGUMENT_INPUT), zvalue=zvalue@entry=0x77338f0a4f20, call=<optimized out>, call=<optimized out>)
    at /usr/src/debug/php-pecl-vips-1.0.4/NTS/vips.c:578
#4  0x000077337bb5a9d7 in vips_php_call_array (options=<optimized out>, call=<optimized out>) at /usr/src/debug/php-pecl-vips-1.0.4/NTS/vips.c:692
#5  0x000077337bb5a9d7 in vips_php_call_array (operation_name=<optimized out>, instance=<optimized out>, option_string=option_string@entry=0x77337bb5b8eb "", argc=argc@entry=2, argv=argv@entry=0x77338f06a3a0, return_value=return_value@entry=0x7b921de2b540) at /usr/src/debug/php-pecl-vips-1.0.4/NTS/vips.c:1003
#6  0x000077337bb5ad00 in zif_vips_call (execute_data=<optimized out>, return_value=0x7b921de2b540) at /usr/src/debug/php-pecl-vips-1.0.4/NTS/vips.c:1086
#7  0x000007036a3b426a in zend_call_function (fci=fci@entry=0x7b921de2b580, fci_cache=<optimized out>, fci_cache@entry=0x7b921de2b550) at /usr/src/debug/php-7.1.2/Zend/zend_execute_API.c:842
#8  0x000007036a2faf62 in zif_call_user_func_array (execute_data=0x77338f013310, return_value=0x77338f013300) at /usr/src/debug/php-7.1.2/ext/standard/basic_functions.c:4852
#9  0x000007036a465dd2 in ZEND_DO_FCALL_BY_NAME_SPEC_RETVAL_USED_HANDLER () at /usr/src/debug/php-7.1.2/Zend/zend_vm_execute.h:876
#10 0x000007036a40d8bb in execute_ex (ex=<optimized out>) at /usr/src/debug/php-7.1.2/Zend/zend_vm_execute.h:429
#11 0x000007036a468c78 in zend_execute (op_array=op_array@entry=0x77338f076000, return_value=return_value@entry=0x77336acc1508) at /usr/src/debug/php-7.1.2/Zend/zend_vm_execute.h:474
#12 0x000007036a3c3e83 in zend_execute_scripts (type=-1895746960, type@entry=8, retval=0x77336acc1508, retval@entry=0x0, file_count=file_count@entry=3) at /usr/src/debug/php-7.1.2/Zend/zend.c:1475
#13 0x000007036a360c20 in php_execute_script (primary_file=primary_file@entry=0x7b921de2dc30) at /usr/src/debug/php-7.1.2/main/main.c:2537
#14 0x000007036a1f636a in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/php-7.1.2/sapi/fpm/fpm/fpm_main.c:1966

And the full output:

#0  0x000077337affd643 in g_logv () at /lib64/libglib-2.0.so.0
#1  0x000077337affd7bf in g_log () at /lib64/libglib-2.0.so.0
#2  0x000077337bb59ccf in vips_php_zval_to_gval (match_image=0x7036cbe84d0, zvalue=zvalue@entry=0x77338f0a4f20, gvalue=gvalue@entry=0x7b921de2b2e0) at /usr/src/debug/php-pecl-vips-1.0.4/NTS/vips.c:424
#3  0x000077337bb5a6fa in vips_php_set_value (pspec=<optimized out>, flags=(VIPS_ARGUMENT_CONSTRUCT | VIPS_ARGUMENT_INPUT), zvalue=zvalue@entry=0x77338f0a4f20, call=<optimized out>, call=<optimized out>)
    at /usr/src/debug/php-pecl-vips-1.0.4/NTS/vips.c:578
#4  0x000077337bb5a9d7 in vips_php_call_array (options=<optimized out>, call=<optimized out>) at /usr/src/debug/php-pecl-vips-1.0.4/NTS/vips.c:692
#5  0x000077337bb5a9d7 in vips_php_call_array (operation_name=<optimized out>, instance=<optimized out>, option_string=option_string@entry=0x77337bb5b8eb "", argc=argc@entry=2, argv=argv@entry=0x77338f06a3a0, return_value=return_value@entry=0x7b921de2b540) at /usr/src/debug/php-pecl-vips-1.0.4/NTS/vips.c:1003
#6  0x000077337bb5ad00 in zif_vips_call (execute_data=<optimized out>, return_value=0x7b921de2b540) at /usr/src/debug/php-pecl-vips-1.0.4/NTS/vips.c:1086
#7  0x000007036a3b426a in zend_call_function (fci=fci@entry=0x7b921de2b580, fci_cache=<optimized out>, fci_cache@entry=0x7b921de2b550) at /usr/src/debug/php-7.1.2/Zend/zend_execute_API.c:842
#8  0x000007036a2faf62 in zif_call_user_func_array (execute_data=0x77338f013310, return_value=0x77338f013300) at /usr/src/debug/php-7.1.2/ext/standard/basic_functions.c:4852
#9  0x000007036a465dd2 in ZEND_DO_FCALL_BY_NAME_SPEC_RETVAL_USED_HANDLER () at /usr/src/debug/php-7.1.2/Zend/zend_vm_execute.h:876
#10 0x000007036a40d8bb in execute_ex (ex=<optimized out>) at /usr/src/debug/php-7.1.2/Zend/zend_vm_execute.h:429
#11 0x000007036a468c78 in zend_execute (op_array=op_array@entry=0x77338f076000, return_value=return_value@entry=0x77336acc1508) at /usr/src/debug/php-7.1.2/Zend/zend_vm_execute.h:474
#12 0x000007036a3c3e83 in zend_execute_scripts (type=-1895746960, type@entry=8, retval=0x77336acc1508, retval@entry=0x0, file_count=file_count@entry=3) at /usr/src/debug/php-7.1.2/Zend/zend.c:1475
#13 0x000007036a360c20 in php_execute_script (primary_file=primary_file@entry=0x7b921de2dc30) at /usr/src/debug/php-7.1.2/main/main.c:2537
#14 0x000007036a1f636a in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/php-7.1.2/sapi/fpm/fpm/fpm_main.c:1966
(gdb) bt full
#0  0x000077337affd643 in g_logv () at /lib64/libglib-2.0.so.0
#1  0x000077337affd7bf in g_log () at /lib64/libglib-2.0.so.0
#2  0x000077337bb59ccf in vips_php_zval_to_gval (match_image=0x7036cbe84d0, zvalue=zvalue@entry=0x77338f0a4f20, gvalue=gvalue@entry=0x7b921de2b2e0) at /usr/src/debug/php-pecl-vips-1.0.4/NTS/vips.c:424
        type = 7711287688208
        fundamental = <optimized out>
        image = <optimized out>
        zstr = <optimized out>
        enum_value = <optimized out>
#3  0x000077337bb5a6fa in vips_php_set_value (pspec=<optimized out>, flags=(VIPS_ARGUMENT_CONSTRUCT | VIPS_ARGUMENT_INPUT), zvalue=zvalue@entry=0x77338f0a4f20, call=<optimized out>, call=<optimized out>)
    at /usr/src/debug/php-pecl-vips-1.0.4/NTS/vips.c:578
        name = 0x7036ca8df25 "interpolate"
        pspec_type = 7711287688208
        gvalue =
              {g_type = 7711287688208, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
#4  0x000077337bb5a9d7 in vips_php_call_array (options=<optimized out>, call=<optimized out>) at /usr/src/debug/php-pecl-vips-1.0.4/NTS/vips.c:692
        name = 0x77336a431630 "interpolate"
        pspec = 0x7036cbc2f40
        argument_class = 0x7036cbc7400
        argument_instance = 0x7036cc052a0
        _z = 0x77338f0a4f20
        _p = 0x77338f0a4f20
        _end = 0x77338f0a4f40
        key = 0x77336a431618
        value = 0x77338f0a4f20
        i = <optimized out>
#5  0x000077337bb5a9d7 in vips_php_call_array (operation_name=<optimized out>, instance=<optimized out>, option_string=option_string@entry=0x77337bb5b8eb "", argc=argc@entry=2, argv=argv@entry=0x77338f06a3a0, return_value=return_value@entry=0x7b921de2b540) at /usr/src/debug/php-pecl-vips-1.0.4/NTS/vips.c:1003
        i = <optimized out>
#6  0x000077337bb5ad00 in zif_vips_call (execute_data=<optimized out>, return_value=0x7b921de2b540) at /usr/src/debug/php-pecl-vips-1.0.4/NTS/vips.c:1086
        argc = 4
        argv = 0x77338f06a380
        operation_name = 0x77336a431610 "affine"
        operation_name_len = 6
        instance = 0x77338f06a390
#7  0x000007036a3b426a in zend_call_function (fci=fci@entry=0x7b921de2b580, fci_cache=<optimized out>, fci_cache@entry=0x7b921de2b550) at /usr/src/debug/php-7.1.2/Zend/zend_execute_API.c:842
        call_via_handler = 0
        i = <optimized out>
        call = 0x77338f013380
        dummy_execute_data =
          {opline = 0x7b921de2b4b0, call = 0x0, return_value = 0x200000000, func = 0x77336acc10e8, This = {value = {lval = 131063326523944, dval = 6.4753887065154571e-310, counted = 0x77338f054228, str = 0x77338f054228, arr = 0x77338f054228, obj = 0x77338f054228, res = 0x77338f054228, ref = 0x77338f054228, ast = 0x77338f054228, zv = 0x77338f054228, ptr = 0x77338f054228, ce = 0x77338f054228, func = 0x77338f054228, ww = {w1 = 2399486504, w2 = 30515}}, u1 = {v = {type = 216 '\330', type_flags = 50 '2', const_flags = 10 '\n', reserved = 143 '\217'}, type_info = 2399810264}, u2 = {next = 30515, cache_slot = 30515, lineno = 30515, num_args = 30515, fe_pos = 30515, fe_iter_idx = 30515, access_flags = 30515, property_guard = 30515, extra = 30515}}, prev_execute_data = 0x77338f0a30e0, symbol_table = 0x77338f013370, run_time_cache = 0x7b921de2b580, literals = 0x0}
        fci_cache_local = {initialized = 2 '\002', function_handler = 0x77338f013360, calling_scope = 0x0, called_scope = 0x7036a3cb183 <zend_is_callable_ex+915>, object = 0xc08}
        func = 0x7036c907c60
#8  0x000007036a2faf62 in zif_call_user_func_array (execute_data=0x77338f013310, return_value=0x77338f013300) at /usr/src/debug/php-7.1.2/ext/standard/basic_functions.c:4852
        params = 0x77338f013370
        retval =
            {value = {lval = 0, dval = 0, counted = 0x0, str = 0x0, arr = 0x0, obj = 0x0, res = 0x0, ref = 0x0, ast = 0x0, zv = 0x0, ptr = 0x0, ce = 0x0, func = 0x0, ww = {w1 = 0, w2 = 0}}, u1 = {v = {type = 1 '\001', type_flags = 0 '\000', const_flags = 0 '\000', reserved = 0 '\000'}, type_info = 1}, u2 = {next = 0, cache_slot = 0, lineno = 0, num_args = 0, fe_pos = 0, fe_iter_idx = 0, access_flags = 0, property_guard = 0, extra = 0}}
        fci =
          {size = 56, function_name = {value = {lval = 131062709206264, dval = 6.4753582069696312e-310, counted = 0x77336a39bcf8, str = 0x77336a39bcf8, arr = 0x77336a39bcf8, obj = 0x77336a39bcf8, res = 0x77336a39bcf8, ref = 0x77336a39bcf8, ast = 0x77336a39bcf8, zv = 0x77336a39bcf8, ptr = 0x77336a39bcf8, ce = 0x77336a39bcf8, func = 0x77336a39bcf8, ww = {w1 = 1782168824, w2 = 30515}}, u1 = {v = {type = 6 '\006', type_flags = 0 '\000', const_flags = 0 '\000', reserved = 0 '\000'}, type_info = 6}, u2 = {next = 30515, cache_slot = 30515, lineno = 30515, num_args = 30515, fe_pos = 30515, fe_iter_idx = 30515, access_flags = 30515, property_guard = 30515, extra = 30515}}, retval = 0x7b921de2b540, params = 0x77338f06a480, object = 0x0, no_separation = 1 '\001', param_count = 4}
        fci_cache = {initialized = 1 '\001', function_handler = 0x7036c907c60, calling_scope = 0x0, called_scope = 0x0, object = 0x0}
#9  0x000007036a465dd2 in ZEND_DO_FCALL_BY_NAME_SPEC_RETVAL_USED_HANDLER () at /usr/src/debug/php-7.1.2/Zend/zend_vm_execute.h:876
        call = 0x77338f013310
        fbc = 0x7036c8781b0
        ret = <optimized out>
#10 0x000007036a40d8bb in execute_ex (ex=<optimized out>) at /usr/src/debug/php-7.1.2/Zend/zend_vm_execute.h:429

Looks like there is something wrong with the affine operation? Source code: https://github.com/andrieslouw/imagesweserv/blob/3.x/src/Manipulators/Size.php#L520-L528

from php-vips-ext.

kleisauke avatar kleisauke commented on June 15, 2024

Update:
When I remove the ['interpolate' => 'bicubic'] options array from our affine operation then it seems that this issue is gone.

I'm not sure yet how I should override the interpolate to bicubic in PHP (there's no VInterpolate::new_from_name).

from php-vips-ext.

kleisauke avatar kleisauke commented on June 15, 2024

@jcupitt Should I close this issue? The assertion error occurs because the interpolate parameter in the affine operation doesn't work with strings (it expects a VInterpolate).

from php-vips-ext.

jcupitt avatar jcupitt commented on June 15, 2024

Hello @kleisauke sorry, I dropped the ball here. Let's turn this into an enhancement issue and add vips_interpolate_new().

from php-vips-ext.

jcupitt avatar jcupitt commented on June 15, 2024

I added vips_interpolate_new() to the binary module. Do you fancy interpolate support to the php layer?

from php-vips-ext.

jcupitt avatar jcupitt commented on June 15, 2024

I've held off pushing 1.0.7 with this addition to pecl until we've done some testing.

from php-vips-ext.

kleisauke avatar kleisauke commented on June 15, 2024

Pull request for the php layer has been made: libvips/php-vips#42

I'll do some tests on our test environment.

from php-vips-ext.

jcupitt avatar jcupitt commented on June 15, 2024

OK, I've pushed 1.0.7 to pecl with this fix. Thanks @kleisauke !

from php-vips-ext.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.