I'm modifying the nicecharts extension to make more charts and 'improve' some aspects. It now reads many lines and columns in a csv file to make several graphs at the same time.
Its going very well except for this one problem: - when I feed it too much data inkscape locks up and does not respond. The amount of data is suspiciously low.
Can anyone help me to debug it. What am I doing wrong ? - I have fixed a problem where lots of unused filters were being made. - I'm pretty sure I've got my layers and groups being made correctly. - The log shows the file runs to completion without errors but control never returns to the users. - To show the problem, 2 data files are available. one is good one is not.
Code logs to file for examination. You will need to modify the logfile location at top of nicecharts.py for your system.
Code is here: http://pastebin.com/6b8jcanU inx is here: http://pastebin.com/u3znJNrR you also need support code: http://pastebin.com/YKCdWJYS
datafiles: good - http://pastebin.com/7xL4cf8b failure - http://pastebin.com/sqTXb8bd
rename the files: nicechart.py nicechart.inx nicechart_colors.py
On 03/10/2012 00:11, Mark Schafer wrote:
I'm modifying the nicecharts extension to make more charts and 'improve' some aspects. It now reads many lines and columns in a csv file to make several graphs at the same time.
Its going very well except for this one problem:
- when I feed it too much data inkscape locks up and does not respond.
The amount of data is suspiciously low.
Can't reproduce with Inkscape 0.48.3.1 and 0.48+devel r11725 on OS X 10.7.4 and Ubuntu 12.10: both csv files render as charts without locking up inkscape.
Python version: 2.7.3 Extension options used for test (taken from preferences.xml):
<group id="extensions" org.ekips.filter.hello_world.col_key="0" org.ekips.filter.hello_world.col_val="1" org.ekips.filter.hello_world.font-size="10" org.ekips.filter.hello_world.bar-height="100" org.ekips.filter.hello_world.bar-width="10" org.ekips.filter.hello_world.bar-offset="5" org.ekips.filter.hello_world.stroke-width="2" org.ekips.filter.hello_world.pie-radius="100" org.ekips.filter.hello_world.pie-offset="0" org.ekips.filter.hello_world.text-offset="5" org.ekips.filter.hello_world.type="bar" org.ekips.filter.hello_world.filename="/tmp/nicechart_failure.csv" org.ekips.filter.hello_world.__live_effect__="0" org.ekips.filter.hello_world.delimiter="," org.ekips.filter.hello_world.labels="1" org.ekips.filter.hello_world.input_type="file" org.ekips.filter.hello_world.input_sections="data_settings" org.ekips.filter.hello_world.font="Sans" />
Can anyone help me to debug it. What am I doing wrong ?
- I have fixed a problem where lots of unused filters were being made.
- I'm pretty sure I've got my layers and groups being made correctly.
- The log shows the file runs to completion without errors but control
never returns to the users.
- To show the problem, 2 data files are available. one is good one is not.
Code logs to file for examination. You will need to modify the logfile location at top of nicecharts.py for your system.
Code is here: http://pastebin.com/6b8jcanU inx is here: http://pastebin.com/u3znJNrR you also need support code: http://pastebin.com/YKCdWJYS
datafiles: good - http://pastebin.com/7xL4cf8b failure - http://pastebin.com/sqTXb8bd
rename the files: nicechart.py nicechart.inx nicechart_colors.py
Can you try adding some more columns to the csv file. Editing it in a simple text editor is best. Maybe there is some memory requirement which makes my system different to yours.
Also try to run the extension twice in a row to see if that causes problems.
Thanks for testing. I appreciate it. I am using the windows binary for 0.48.3.1 from sourceforge on a win7 64bit machine. I see the same problem with an earlier build from 0.48.2
Mark...
On 10/3/2012 3:50 PM, ~suv wrote:
On 03/10/2012 00:11, Mark Schafer wrote:
I'm modifying the nicecharts extension to make more charts and 'improve' some aspects. It now reads many lines and columns in a csv file to make several graphs at the same time.
Its going very well except for this one problem:
- when I feed it too much data inkscape locks up and does not respond.
The amount of data is suspiciously low.
Can't reproduce with Inkscape 0.48.3.1 and 0.48+devel r11725 on OS X 10.7.4 and Ubuntu 12.10: both csv files render as charts without locking up inkscape.
Python version: 2.7.3 Extension options used for test (taken from preferences.xml):
<group id="extensions" org.ekips.filter.hello_world.col_key="0" org.ekips.filter.hello_world.col_val="1" org.ekips.filter.hello_world.font-size="10" org.ekips.filter.hello_world.bar-height="100" org.ekips.filter.hello_world.bar-width="10" org.ekips.filter.hello_world.bar-offset="5" org.ekips.filter.hello_world.stroke-width="2" org.ekips.filter.hello_world.pie-radius="100" org.ekips.filter.hello_world.pie-offset="0" org.ekips.filter.hello_world.text-offset="5" org.ekips.filter.hello_world.type="bar" org.ekips.filter.hello_world.filename="/tmp/nicechart_failure.csv" org.ekips.filter.hello_world.__live_effect__="0" org.ekips.filter.hello_world.delimiter="," org.ekips.filter.hello_world.labels="1" org.ekips.filter.hello_world.input_type="file" org.ekips.filter.hello_world.input_sections="data_settings" org.ekips.filter.hello_world.font="Sans" />
Can anyone help me to debug it. What am I doing wrong ?
- I have fixed a problem where lots of unused filters were being made.
- I'm pretty sure I've got my layers and groups being made correctly.
- The log shows the file runs to completion without errors but control
never returns to the users.
- To show the problem, 2 data files are available. one is good one is not.
Code logs to file for examination. You will need to modify the logfile location at top of nicecharts.py for your system.
Code is here: http://pastebin.com/6b8jcanU inx is here: http://pastebin.com/u3znJNrR you also need support code: http://pastebin.com/YKCdWJYS
datafiles: good - http://pastebin.com/7xL4cf8b failure - http://pastebin.com/sqTXb8bd
rename the files: nicechart.py nicechart.inx nicechart_colors.py
On 03/10/2012 06:06, Mark Schafer wrote:
Can you try adding some more columns to the csv file. Editing it in a simple text editor is best. Maybe there is some memory requirement which makes my system different to yours.
Works with 4 or 12 additional rows just as fine…
I forgot to add - use Pie chart.
Doesn't make a difference AFAICT (bar or pie chart)
Also try to run the extension twice in a row to see if that causes problems.
Works ok within the same instance of Inkscape: 1) launch inkscape, run extension 2) open new file (menu 'File > New'), run 'Extensions > Previous Extension' 3) repeat step 2 4) repeat step 2
Sometimes, the extension system can fail, most often seen when editing values while 'Live preview' is checked: it doesn't hang or lock up inkscape though, just that repeated runs of the extension produce no more output. Console message if this happens looks e.g. like this:
** (inkscape:34529): CRITICAL **: int Inkscape::Extension::Implementation::Script::execute(const std::list<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, const std::list<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, const Glib::ustring&, Inkscape::Extension::Implementation::Script::file_listener&): assertion `!in_command.empty()' failed
similar e.g. to issues reported here https://bugs.launchpad.net/inkscape/+bug/433860
Thanks for testing. I appreciate it. I am using the windows binary for 0.48.3.1 from sourceforge on a win7 64bit machine. I see the same problem with an earlier build from 0.48.2
On 10/3/2012 3:50 PM, ~suv wrote:
On 03/10/2012 00:11, Mark Schafer wrote:
I'm modifying the nicecharts extension to make more charts and 'improve' some aspects. It now reads many lines and columns in a csv file to make several graphs at the same time.
Its going very well except for this one problem:
- when I feed it too much data inkscape locks up and does not respond.
The amount of data is suspiciously low.
Can't reproduce with Inkscape 0.48.3.1 and 0.48+devel r11725 on OS X 10.7.4 and Ubuntu 12.10: both csv files render as charts without locking up inkscape.
Python version: 2.7.3 Extension options used for test (taken from preferences.xml):
<group id="extensions" org.ekips.filter.hello_world.col_key="0" org.ekips.filter.hello_world.col_val="1" org.ekips.filter.hello_world.font-size="10" org.ekips.filter.hello_world.bar-height="100" org.ekips.filter.hello_world.bar-width="10" org.ekips.filter.hello_world.bar-offset="5" org.ekips.filter.hello_world.stroke-width="2" org.ekips.filter.hello_world.pie-radius="100" org.ekips.filter.hello_world.pie-offset="0" org.ekips.filter.hello_world.text-offset="5" org.ekips.filter.hello_world.type="bar" org.ekips.filter.hello_world.filename="/tmp/nicechart_failure.csv" org.ekips.filter.hello_world.__live_effect__="0" org.ekips.filter.hello_world.delimiter="," org.ekips.filter.hello_world.labels="1" org.ekips.filter.hello_world.input_type="file" org.ekips.filter.hello_world.input_sections="data_settings" org.ekips.filter.hello_world.font="Sans" />
Can anyone help me to debug it. What am I doing wrong ?
- I have fixed a problem where lots of unused filters were being made.
- I'm pretty sure I've got my layers and groups being made correctly.
- The log shows the file runs to completion without errors but control
never returns to the users.
- To show the problem, 2 data files are available. one is good one is not.
Code logs to file for examination. You will need to modify the logfile location at top of nicecharts.py for your system.
Code is here: http://pastebin.com/6b8jcanU inx is here: http://pastebin.com/u3znJNrR you also need support code: http://pastebin.com/YKCdWJYS
datafiles: good - http://pastebin.com/7xL4cf8b failure - http://pastebin.com/sqTXb8bd
rename the files: nicechart.py nicechart.inx nicechart_colors.py
Thanks for the testing.
One thing I thought of is my system has 16 cores. Maybe inkscape has a race condition but I'm not sure its using threads anyway... So I tried process affinity and locked inkscape to a single core. but the problem persists and I get the following screenshot showing control never returns to the user :-( http://i46.tinypic.com/v2r8l0.jpg
I am frustrated and mystified... I've also tried a full uninstall of all inkscape directories and preferences in case there was cruft from an older version. Still get same error.
Maybe I should try an older build of inkscape: Tried 0.47-3 got very similar result but get additional command line window. http://i45.tinypic.com/2ufsz04.jpg
Checking the logfile - I see the process does run to completion and seems to have made all graphs. But control does not return to user :-(
Stumped !! and confused...
Mark...
On 10/3/2012 5:31 PM, ~suv wrote:
On 03/10/2012 06:06, Mark Schafer wrote:
Can you try adding some more columns to the csv file. Editing it in a simple text editor is best. Maybe there is some memory requirement which makes my system different to yours.
Works with 4 or 12 additional rows just as fine…
I forgot to add - use Pie chart.
Doesn't make a difference AFAICT (bar or pie chart)
Also try to run the extension twice in a row to see if that causes problems.
Works ok within the same instance of Inkscape:
- launch inkscape, run extension
- open new file (menu 'File > New'), run 'Extensions > Previous Extension'
- repeat step 2
- repeat step 2
Sometimes, the extension system can fail, most often seen when editing values while 'Live preview' is checked: it doesn't hang or lock up inkscape though, just that repeated runs of the extension produce no more output. Console message if this happens looks e.g. like this:
** (inkscape:34529): CRITICAL **: int Inkscape::Extension::Implementation::Script::execute(const std::list<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, const std::list<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, const Glib::ustring&, Inkscape::Extension::Implementation::Script::file_listener&): assertion `!in_command.empty()' failed
similar e.g. to issues reported here https://bugs.launchpad.net/inkscape/+bug/433860
Thanks for testing. I appreciate it. I am using the windows binary for 0.48.3.1 from sourceforge on a win7 64bit machine. I see the same problem with an earlier build from 0.48.2
On 10/3/2012 3:50 PM, ~suv wrote:
On 03/10/2012 00:11, Mark Schafer wrote:
I'm modifying the nicecharts extension to make more charts and 'improve' some aspects. It now reads many lines and columns in a csv file to make several graphs at the same time.
Its going very well except for this one problem:
- when I feed it too much data inkscape locks up and does not respond.
The amount of data is suspiciously low.
Can't reproduce with Inkscape 0.48.3.1 and 0.48+devel r11725 on OS X 10.7.4 and Ubuntu 12.10: both csv files render as charts without locking up inkscape.
Python version: 2.7.3 Extension options used for test (taken from preferences.xml):
<group id="extensions" org.ekips.filter.hello_world.col_key="0" org.ekips.filter.hello_world.col_val="1" org.ekips.filter.hello_world.font-size="10" org.ekips.filter.hello_world.bar-height="100" org.ekips.filter.hello_world.bar-width="10" org.ekips.filter.hello_world.bar-offset="5" org.ekips.filter.hello_world.stroke-width="2" org.ekips.filter.hello_world.pie-radius="100" org.ekips.filter.hello_world.pie-offset="0" org.ekips.filter.hello_world.text-offset="5" org.ekips.filter.hello_world.type="bar" org.ekips.filter.hello_world.filename="/tmp/nicechart_failure.csv" org.ekips.filter.hello_world.__live_effect__="0" org.ekips.filter.hello_world.delimiter="," org.ekips.filter.hello_world.labels="1" org.ekips.filter.hello_world.input_type="file" org.ekips.filter.hello_world.input_sections="data_settings" org.ekips.filter.hello_world.font="Sans" />
Can anyone help me to debug it. What am I doing wrong ?
- I have fixed a problem where lots of unused filters were being made.
- I'm pretty sure I've got my layers and groups being made correctly.
- The log shows the file runs to completion without errors but control
never returns to the users.
- To show the problem, 2 data files are available. one is good one is not.
Code logs to file for examination. You will need to modify the logfile location at top of nicecharts.py for your system.
Code is here: http://pastebin.com/6b8jcanU inx is here: http://pastebin.com/u3znJNrR you also need support code: http://pastebin.com/YKCdWJYS
datafiles: good - http://pastebin.com/7xL4cf8b failure - http://pastebin.com/sqTXb8bd
rename the files: nicechart.py nicechart.inx nicechart_colors.py
On 03-10-12 12:36, Mark Schafer wrote:
Thanks for the testing.
One thing I thought of is my system has 16 cores. Maybe inkscape has a race condition but I'm not sure its using threads anyway... So I tried process affinity and locked inkscape to a single core. but the problem persists and I get the following screenshot showing control never returns to the user :-( http://i46.tinypic.com/v2r8l0.jpg
Haven't tried running it yet, but it looks like the plugin can use filters (blur for example). Is it indeed using filters in your case? If so, could you try disabling this? (So that the output of the plugin does not contain any filters.) The filter code is the one piece of Inkscape that does use threads, and although the chance of a race condition in this code is very small, I must admit that it does sound a bit like a race condition.
Thanks Jasper - good point. Alas I removed all reference to filters and the problem persists :-(
On 10/4/2012 12:19 AM, Jasper van de Gronde wrote:
On 03-10-12 12:36, Mark Schafer wrote:
Thanks for the testing.
One thing I thought of is my system has 16 cores. Maybe inkscape has a race condition but I'm not sure its using threads anyway... So I tried process affinity and locked inkscape to a single core. but the problem persists and I get the following screenshot showing control never returns to the user :-( http://i46.tinypic.com/v2r8l0.jpg
Haven't tried running it yet, but it looks like the plugin can use filters (blur for example). Is it indeed using filters in your case? If so, could you try disabling this? (So that the output of the plugin does not contain any filters.) The filter code is the one piece of Inkscape that does use threads, and although the chance of a race condition in this code is very small, I must admit that it does sound a bit like a race condition.
Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Thanks Martin, Alas - tried many other extensions - all working just fine :-( I must be doing something wrong in my extension...
On 10/4/2012 5:07 AM, Martin Owens wrote:
On Wed, 2012-10-03 at 23:36 +1300, Mark Schafer wrote:
Stumped !! and confused...
Have you tried running a few other extensions to see if you get the same problems? Rule out the extensions stack as the likely cause.
Martin,
participants (4)
-
Jasper van de Gronde
-
Mark Schafer
-
Martin Owens
-
~suv