php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63844 php-gtk out of memory error
Submitted: 2012-12-24 09:36 UTC Modified: 2017-10-24 23:13 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: gianluca dot faieta at gmail dot com Assigned:
Status: Suspended Package: PHP-GTK related
PHP Version: Irrelevant OS: Windows
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2012-12-24 09:36 UTC] gianluca dot faieta at gmail dot com
Description:
------------
Test script crashes after "eating" over 1GB of RAM.
php-cli.ini has memory_limit = -1
The script was run on Windows Server 2008 SP2 and Windows XP SP2 with same 
error. Multiple PHP binaries were tested, with same outcome:

- http://emsmith.net/gtk/php-5.3.15-nts-php-gtk-snapshot.zip
- http://emsmith.net/gtk/php-5.4.5-nts-php-gtk-snapshot.zip
- http://emsmith.net/gtk/php-gtk-2012-5.4-snapshot.zip
- php-gtk compiled from latest https://github.com/auroraeosrose/php-gtk-src in 
conjunction with PHP 5.4.10-nts binary package

The problem is not in strpos: simply accessing the data (ex. $a=$item['descr']) 
crashes the script.

Older php-gtk package works (http://gtk.php.net/do_download.php?
download_file=php-gtk-2.0.1-win32-nts.zip), even with 100k elements.

Reducing the number of elements to 5000 solves the bug, but my real application 
uses 100k elements.

Using connect_simple() on every button (instead of connect_signals()) solves the 
bug in the test script but not in the complete application.

Test script:
---------------
http://www.faieta.net/wp/wp-content/uploads/2012/12/php_outofmem.phps


Expected result:
----------------
Press button "Foo" -> "Search OK"
 then
Press button "Bar" -> "Bar was clicked"
 then
Press button "Foo" -> "Search OK"


Actual result:
--------------
Press button "Foo" -> "Search OK"
 then
Press button "Bar" -> "Bar was clicked"
 then 
Press button "Foo" -> Out of memory


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-10-24 23:13 UTC] kalle@php.net
-Status: Open +Status: Suspended
 [2017-10-24 23:13 UTC] kalle@php.net
I'm gonna suspend this report as the PHP GTK project activity seems halted, if the activity picks backup for the project then this report should be re-opened.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Dec 02 17:03:35 2021 UTC