Maxima on android hangs with plot2d



Hi Eddy F san,

Thanks for your experiments. The results are very interesting. Before going
to the next step of debugging, I would like to share with you how I handle
the drawing in maxima.

Inside of MoA install, I included ARM binary of gnuplot command. Gnuplot is
used to convert Gnuplot format description of graphs to HTML5. So, it acts
as a filter or translator.

On invocation of plot2d(), the command generates maxout.gnuplot file in
/data/data/jp.yhonda/files directory. Then Java program detects the
existence of this file and invoke gnuplot to generate maxout.html. As soon
as gnuplot command execution finishes, Java program throws an intent to
launch graph viewer activity. Inside it is a web kit displaying the HTML5
in the maxout.html file.

Corresponding to your findings, the process 2832 is the java program,
process 2856 is the maxima process, and the process 3020 is the gnuplot
program. Gnuplot process should disappear quickly since it is a filter
program, as you see as the first run of plot2d command.

If you can, could you try the followings with your SSH?
# ls /data/data/jp.yhonda/files
just after MoA is launched, just after the first run of plot2d() command,
and just after the second run of plot2d() command.
I would like to know file existence of maxout.html or maxout.gnuplot in
this directory.

BTW, as for ADB, you don't need rooted device. Also, you don't have to
install anything on your device. All you need is to install Android SDK on
your PC, and connect your device with PC via USB.

Thanks and best regards,
Yasuaki Honda, Chiba, Japan


2013/9/12 Eddy F. <eddy_surlenet at yahoo.fr>

> Hi Richard Fateman and Yasuaki Honda,
>
> I answer Richard's comments in his text.
> I have then tried a little experimentation using ssh to get some
> information on running processes in android. Maybe it will be helpful, I
> don't know.
>
> Le 10/09/13 16:33, Richard Fateman a ?crit :
>
>  Hi Eddy F ( and Yasuaki Honda):
>>
>> I find (on Windows...) that the default settings for plotting allows
>> only one plot at a time.
>> To resume Maxima, you must kill the (gnuplot) window by clicking on the
>> [X].
>>
>
> Unfortunately, I've got no way to kill the gnuplot window on android. No
> cross to click on, no gnuplot item in the activ app list. When the plot
> window is displayed, the android menu icon is visible (it normally is not
> if there is no menu) but this icon doesn't do anything. That, in itself, I
> find rather strange.
>
>
>  Maybe the
>> same kind of thing is happening on Android -- you have a plot process
>> that is taking
>> precedence over the Maxima main window and taking all input.
>>
>
> Yes, that explanation is quite plausible indeed.
>
> Just a little precision: maxima doesn't hang after the first plot but
> after trying to plot again. If after the first plot I enter a simple
> command like 7*8; maxima responds. It is only another plot command that
> makes it hang.
>
>
>
>> I think there are other settings that allow multiple plots(on windows),
>> so maybe your default setting is
>> not right.
>>
>>
>> RJF
>>
>
> No. Unfortunately, Maxima for Android provides almost no setting option
> (except one to chose the language of the manual).
>
> A little experiment:
>
> I completely shutdown my device.
> I start it.
> I start a ssh connection from my laptop to this tablet. I will use the ps
> command in this ssh session.
> First ssh command, before maxima is started gives no entry related to
> maxima (of course).
>
> I start maxima.
> The ps command gives those two lines
> app_111   2832  99    514492 58344 ffffffff 00000000 S jp.yhonda
> app_111   2856  2832  37496  22140 ffffffff 00000000 R
> /data/data/jp.yhonda/files/**maxima
>
> I enter a simple command in maxima, says 7*8;
> The ps command now gives
> app_111   2832  99    514832 59252 ffffffff 00000000 S jp.yhonda
> app_111   2856  2832  45752  31852 ffffffff 00000000 S
> /data/data/jp.yhonda/files/**maxima
>
> I enter a simple plot2d command, while the plot is still being displayed,
> the ps command gives
> app_111   2832  99    518564 62072 ffffffff 00000000 S jp.yhonda
> app_111   2856  2832  45752  32124 ffffffff 00000000 S
> /data/data/jp.yhonda/files/**maxima
>
> While the plot is displayed, the android menu icon is displayed but is
> inactive. The only way for me to make this plot disappear is to use the
> back icon. The ps command then gives
> app_111   2832  99    519524 62300 ffffffff 00000000 S jp.yhonda
> app_111   2856  2832  45752  32124 ffffffff 00000000 S
> /data/data/jp.yhonda/files/**maxima
>
> I enter another simple command. Maxima responds and the ps command says
> app_111   2832  99    519600 62524 ffffffff 00000000 S jp.yhonda
> app_111   2856  2832  45752  32124 ffffffff 00000000 S
> /data/data/jp.yhonda/files/**maxima
>
>
> I try another plot2d command. Maxima hangs. The ps command now gives 3
> lines :
> app_111   2832  99    519672 62800 ffffffff 00000000 S jp.yhonda
> app_111   2856  2832  45752  32124 ffffffff 00000000 S
> /data/data/jp.yhonda/files/**maxima
> app_111   3020  2832  511068 44516 ffffffff 00000000 S jp.yhonda
>
>
> Could this 3rd line give any indication about what is going on ?
>
> I "kill" maxima in the android "task manager" but after that the ps
> command still gives those two lines
> app_111   2856  1     45752  27364 ffffffff 00000000 S
> /data/data/jp.yhonda/files/**maxima
> app_111   3020  1     511068 41380 ffffffff 00000000 S jp.yhonda
>
> Could this process with pid 3020 that appeared after first plot be
> responsible for maxima hanging ?
> If I could find a way to kill this process and see if maxima still
> hangs... Alas, to my knowledge, android doesn't provide a way to do that. I
> am going to look in the android market (or whatever google choses to call
> it today) if I can find a way to kill a specific process. In that case,
> maybe I would find a way to provide further information. Alas this device
> is not rooted and I am not allowed to do it (I do not own the device).
>
> Thanks for reading.
>
>
> --
> Eddy F.
> ______________________________**_________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/**mailman/listinfo/maxima<http://www.math.utexas.edu/mailman/listinfo/maxima>;
>