Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application is started multiple times #4

Open
srwalter opened this issue Jul 23, 2019 · 12 comments
Open

Application is started multiple times #4

srwalter opened this issue Jul 23, 2019 · 12 comments

Comments

@srwalter
Copy link

If I put a println in the application's initialize(), onStart(), and onStop() functions, when I run in the simulator I see:

app init
app start
app init
app start

Is this intended behavior? It seems bizarre, and at the very least makes it difficult to follow the execution of the program. Actions like onSelect in the delegate also occur multiple times

@danielsiwiec
Copy link
Owner

Thanks for submitting this issue. I will take a look at it

@danielsiwiec
Copy link
Owner

@srwalter I have a difficulty confirming this issue. After running make run I get this output, without the duplication you see:
image

@danielsiwiec
Copy link
Owner

What is the command you run?

@srwalter
Copy link
Author

srwalter commented Aug 5, 2019

I'm using connectiq-sdk-lin-3.0.12-2019-06-12-77ed6f47e.zip as my SDK on Linux. I'm also targeting the d2bravo for my device. I run:

$ ~/src/connectiq/bin/connectiq & # start simulator
$ make # build
$ ~/src/connectiq/bin/monkeydo bin/NumberPickerApp.prg d2bravo
initialize
start
initialize
start
Complete

@srwalter
Copy link
Author

srwalter commented Aug 5, 2019

I see the same behavior targeting the fenix5s

@danielsiwiec
Copy link
Owner

You shouldn't need to start the simulator. Can you try again without the simulator being open?

If you do want to run your application in the simulator, do make run and this will start the simulator for you.

@srwalter
Copy link
Author

srwalter commented Aug 5, 2019

For me that hangs indefinitely. It looks like bin/connectiq runs in the foreground and doesn't exit for me, therefore I never get to the next command (sleep 3) in "make run"

If I modify Makefile to run connectiq in the background, then "make run" works, and it behaves the same as I described above

@danielsiwiec
Copy link
Owner

I just updated my version of the SDK to match yours, but still can't replicate the problem. What Java version are you using?

Also - can you verify that the hanging you described above is in fact not the application running in the simulator? When I do make run, the application starts in the simulator and the command does 'hang' in the terminal until the application is shut down.

@srwalter
Copy link
Author

srwalter commented Aug 9, 2019

Java 1.8.0 here

Confirmed. If I run the simulator command from the Makefile, it does not return until I close the simulator window.

@danielsiwiec
Copy link
Owner

@srwalter this is actually expected - the terminal process will block until you close the simulator. To recap - you don't need to start the simulator manually. When you run make run in the terminal, it will open the simulator with your application and will block the terminal until you close the simulator. Is this what you are seeing?

@andrezunido
Copy link

Hi Daniel, for me it was working fine with minor adjustments until 3.2.x. It seems now things are a bit different. Can you perhaps have a look? I added additional sleep time, but somehow it still fails sometimes. Connect IQ CLI didn't seem to have changed, so I find this strange. They did add more debugging capability to the simulator so maybe that's related.

Ps: Are you still actively supporting the project? I find the Eclipse SDK very poor, and use this "make" commands together with VSCode for quality of life in ConnectIQ development.

@danielsiwiec
Copy link
Owner

@andrezunido thanks for bringing this up. I'll take a look at this when I get a chance. I do my (poor) best to actively maintain this project and am always open to PRs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants