We have moved to a new Sailfish OS Forum. Please start new discussions there.

sfos App called 2 time [not relevant]

asked 2016-09-29 19:14:07 +0300

cemoi71 gravatar image

updated 2016-10-04 17:32:15 +0300


has someone already seen that, that an Native Sfos App could be called 2 times?
Here on my screenshot we see the Sfos "torch" app 2 times.

I don't really know how it could happened. Thus, i can't give any reproducibility for it (if it's a bug...)

Edit 30.09.2016: I've still the weird situation on my phone.
I'll be curious to know how could it happened, Check how many instance of it there are
Would it be possible to have 2 different one, an old version vs new?

Edit 04.10.2016: This weekend I loose this stand in a strange way again.
On the Monday morning after releasing the lock-screen, i discover a camera cover instead of the one torch-cover which was below.
I don't know if the torch app goes away, and the camera app take place in the same cover instead.
Or if the torch cover is gone, and a new one with with camera-app came.
The only thing that i know is, before going to bed i had still the same home stand like in screenshot.
BUT i closed the Media app, and had three apps on working with their cover....
What happened there?....
(maybe we approach Halloween and some spirits let them appear.... :-$)

Question: Seems that it happens during the night from 28 Sept to 29 Sept. Do someone know if the os make some log of event, and how we could access on it?

(@Smortex i think you're the app Owner, i make you in cc, in case that you could be interested)

image description

edit retag flag offensive reopen delete

The question has been closed for the following reason "question is not relevant or outdated" by cemoi71
close date 2017-05-08 18:42:31.389580



There is one way to replicate this, but I doubt it was how you managed to open 2 instances of the one application.

Connect device to PC for SSH access..

Once connected, in terminal type; xdg-open /usr/share/applications/harbour-torch.desktop, hit enter and the app opens, leaving that app open, then type a slightly different command in terminal; /usr/bin/harbour-torch hit enter - you should now have 2 instances of the same application open. Now hit CTRL Z and type in again '/usr/bin/harbour-torch' and another instance of the app will open. If you hit CTRL C the app will close, but by tapping CTRL Z, you can keep on opening instances of the app.

Edz ( 2016-09-30 15:08:28 +0300 )edit

@Markkyboy many thx for answering. that interesting.
Do you have an idea on how it could be happened by mine devices?
How may i check that is indeed 2 instances calls?

cemoi71 ( 2016-09-30 15:28:59 +0300 )edit

Does it means that i cpuld call even more instance of an app than just 2?

cemoi71 ( 2016-09-30 15:46:52 +0300 )edit

@cemoi71, the only limit of how many you can get running is the memory of your device :)

As for how to check number of instances, give command "ps aux | grep torch" on the console...

juiceme ( 2016-09-30 18:01:41 +0300 )edit

are you sure? i would find dangerous if nothing from software OS part would limit this art of use.

cemoi71 ( 2016-09-30 18:50:26 +0300 )edit

1 Answer

Sort by » oldest newest most voted

answered 2016-10-03 23:20:02 +0300

Hello / Bonjour @cemoi71,

The Torch applications is not supposed to do anything weird, and should act as any application, that is display a single instance at a given time. Maybe you have discovered some kind of bug (e.g. a race condition in Sailfish OS when an application is started while another instance is loading and the system does not detect this?).

If you do not use the shell, maybe your best option is to close both instances and hopefully you will not have the problem anymore, and can forget about it.

However, if you can reproduce the problem or want to investigate this, you should start by to getting both applications PID using ps(1) and then using ps(1) again on both process to see for example if they where started simultaneously or not. Here is an example on how I find the PID of the torch application (29819) and they see how long ago it was started:

[nemo@Sailfish ~]$ ps alxww | grep torch
1 100000 29819 3671  20   0 115432 25344 poll_s Ssl  ?          0:04 /usr/bin/harbour-torch                                 
0 100000 30090  672  20   0   2012   312 poll_s S    ?          0:00 invoker --type=silica-qt5 --single-instance harbour-torch
0 100000 30472 29888 20   0   1916   524 pipe_w S+   pts/0      0:00 grep torch
[nemo@Sailfish ~]$ ps -o args,etime -p 29819
COMMAND                         ELAPSED
/usr/bin/harbour-torch            11:25
[nemo@Sailfish ~]$

Digging around in /proc/TORCH-PID/ may also reveal interesting details.

Good luck!

edit flag offensive delete publish link more


@Smortex cool that you answered. :-)
Yes i know that torch don't make something weird itself.
I'm convinced too that is an OS Problem.
I just want to make a thing clear again. It doesn't trouble me so much.
But is something strange and wanted to bring my experience here on tjc.
It could happen with an other app, but it was with yours.
And I thought that would be fine that, if i explain a strange behaviour, and it's happened with an app involved or not involved, that i inform the software holder, just for civilities.
I you feel that in my thread, something is unfair for your app or bring to misinterpretation, then please let me know, i'll change it as soon as i can.

After telling it, Thank you very much for your tipps.
I would like to reproduce the case, but i don' know how i can do this, because it happened until now just one time through the night (great :-( )
I'll do more investigations, with the points that you gave me. Thanks again for your reaction :-)

cemoi71 ( 2016-10-04 17:53:22 +0300 )edit

@Smortex i loose myself in investigation...i'm a little bit newbi on linux cli
You have written that the torch pid is 29819... Is it just in your description above? means on your device?And each time that you start it
If i ask for torch pid with your command, then it is by me not the same.
Is the pid of an app always the same? or it takes an other one by each new instance call?

cemoi71 ( 2016-10-04 18:53:33 +0300 )edit

hmmm i found how it works with pid and where the proc\app-pid\ place. but in between one instance has disappeared and device was accidentally restarted.:-(
Now i tell me how may i access on this \proc\torch-pid\ stuffs afterwards...
I guess... no more... right?

cemoi71 ( 2016-10-04 19:00:47 +0300 )edit

No worries , I am not worried nor annoyed, I just wanted to be honest and say that this was not supposed to happen:-)

As you discovered, the Proccess IDentifier (PID) will be different from the one I find on my device in the third column of the first ps(1) invocation. Each time you start an application, a new PID is used, so if an application is running twice, you should have one process per instance, therefore 2 PIDs.

The files in the /proc/29819 directory are present only while the process with PID 29819 is running. As soon as the process is terminated, these files vanish (/proc is a virtual filesystem, that present a view of the current state of the running applications as a tree of files).

Smortex ( 2016-10-04 20:34:18 +0300 )edit

oh, right... thank you very much for these explanations.
As you can see in my thread update i loosed the state that i described before.
I have no more possibility to analyse it, i think...
Then i have material to analyse for a next time.
many thx

cemoi71 ( 2016-10-05 12:19:19 +0300 )edit

Question tools

1 follower


Asked: 2016-09-29 19:14:07 +0300

Seen: 411 times

Last updated: Oct 04 '16