View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
18856Bug reportsImport/Exportpublic2023-08-09 17:00
ReporterTonisOrmisson Assigned ToTonisOrmisson  
PrioritynoneSeverityminor 
Status resolvedResolutionfixed 
Product Version6.1.x 
Summary18856: buildXMLFromQuery fails to implement LIMIT
Description

export_helper::buildXMLFromQuery () is supposed 3000 chunk limit to process items in max 3000 chunks. The query limit is applied incorrectly and the limit is not applied to actual query if the Query is a raw string. This will result in failing to copy/export surveys that have items over that limit.

Steps To Reproduce

Steps to reproduce

  1. create a survey with some items (eg (subQuestions)) > 3000
  2. try to copy that survey

Expected result

survey is copied without error

Actual result

Chunk is bigger than expected and the XMLElement->startElement will sometimes fail to run. For example I have got an error "Memory allocation failed : growing buffer".

probably depends on specific memory context. Error is not thrown consistently always.

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)51fcdf9d94fc42c729b0e08e4508044143bb3804
I will donate to the project if issue is resolvedNo
Browser
Database type & version10.6.7-MariaDB-2ubuntu1.1
Server OS (if known)Ubuntu 22
Webserver software & version (if known)nginx
PHP Version8.0.21

Users monitoring this issue

There are no users monitoring this issue.

Activities

TonisOrmisson

TonisOrmisson

2023-06-01 16:25

developer   ~75311

A test file with a bunch of array questions with 100 subquestions each with a number of languages taking the limit >3000 in some items.
This file will not throw an error in all contexts, bit it did in some. Depends on what is memory status probably.

Will post a PR

limesurvey_survey_176664.lss (2,245,811 bytes)
TonisOrmisson

TonisOrmisson

2023-06-01 16:27

developer   ~75312

file? somehow cannot see it in prev note

TonisOrmisson

TonisOrmisson

2023-08-09 16:55

developer   ~76526

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=35338

tibor.pacalat

tibor.pacalat

2023-08-09 17:00

administrator   ~76527

Tested and merged.

Related Changesets

LimeSurvey: master bba1a66e

2023-08-09 16:51:48

TonisOrmisson


Committer: GitHub Details Diff
fixed 18856 - buildXMLFromQuery fails to implement LIMIT and can end up throwing an error (#3183) Affected Issues
18856
mod - application/helpers/export_helper.php Diff File

Issue History

Date Modified Username Field Change
2023-06-01 16:18 TonisOrmisson New Issue
2023-06-01 16:18 TonisOrmisson Assigned To => TonisOrmisson
2023-06-01 16:18 TonisOrmisson Status new => assigned
2023-06-01 16:25 TonisOrmisson Note Added: 75311
2023-06-01 16:25 TonisOrmisson File Added: limesurvey_survey_176664.lss
2023-06-01 16:25 TonisOrmisson Bug heat 0 => 2
2023-06-01 16:27 TonisOrmisson Note Added: 75312
2023-06-01 16:27 TonisOrmisson File Added: limesurvey_survey_176664-2.lss
2023-07-07 23:23 gabrieljenik Assigned To TonisOrmisson => gabrieljenik
2023-07-07 23:23 gabrieljenik Status assigned => ready for code review
2023-08-09 16:55 TonisOrmisson Changeset attached => LimeSurvey master bba1a66e
2023-08-09 16:55 TonisOrmisson Note Added: 76526
2023-08-09 16:55 TonisOrmisson Assigned To gabrieljenik => TonisOrmisson
2023-08-09 16:55 TonisOrmisson Resolution open => fixed
2023-08-09 17:00 tibor.pacalat Status ready for code review => resolved
2023-08-09 17:00 tibor.pacalat Note Added: 76527
2023-08-09 17:00 tibor.pacalat Bug heat 2 => 4