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

Bug #7

Open
naterrr opened this issue Dec 3, 2020 · 23 comments
Open

Bug #7

naterrr opened this issue Dec 3, 2020 · 23 comments
Labels
bug Something isn't working

Comments

@naterrr
Copy link

naterrr commented Dec 3, 2020

Used the latest version on iOS. It saw my hue bridge and when it told me to hit the button on the bridge, I hit it and then the app just force closed. I opened it again and this time it force closed just by me clicking on the IP of my bridge before it even asked to hit the button. This makes the app non functional for me right now.

@thatcherclough
Copy link
Owner

Interesting. Do you have a v1 or v2 bridge. This link can help you determine it: https://www.reviewgeek.com/36907/how-to-tell-which-generation-of-philips-hue-bridge-you-have/

@naterrr
Copy link
Author

naterrr commented Dec 4, 2020 via email

@thatcherclough
Copy link
Owner

Hmm someone else has mentioned this issue. I will take a look!

@nzoschke
Copy link

nzoschke commented Dec 4, 2020

Same problem with the v2 bridge here. Crashing when I push the button during discovery.

Let me know if there's a way I can help debug!

@thatcherclough
Copy link
Owner

When you click on the bridge, does the app immediately crash, or does it go back to the main page (the one with the start button and all the settings) and then crash? Do you ever see the "Connecting to bridge..." dialog?

@thatcherclough thatcherclough added the bug Something isn't working label Dec 4, 2020
@thatcherclough
Copy link
Owner

I believe I may have fixed the issue. Try installing the beta from this testflight link: https://testflight.apple.com/join/ffhtyNQo

@thatcherclough
Copy link
Owner

Please let me know if this works or not.😄

@nzoschke
Copy link

nzoschke commented Dec 5, 2020

Still the same crashing behavior. I sent some crash reports. Hope that helps!

@thatcherclough
Copy link
Owner

Alright! Thank you for submitting those logs. From the logs, I have figured out that it seems to be a "Memory Access Issue". I will get right to fixing it. Your logs helped a lot thanks!

@thatcherclough
Copy link
Owner

As of now, I have not been able to reproduce the bug, and this makes it extremely hard for me to fix it. I can pin the error down to the HueSDK, and I will continue to do research and see if others have experienced this. Of course, I will let you know if I come across a possible cause and solution to this bug.

@nzoschke
Copy link

nzoschke commented Dec 9, 2020

@thatcherclough thank you for the project and trying to resolve this issue!

If you want to brain dump anything you've done to debug in here (crash logs, ask references you found etc), I might be able to help more directly...

I'm no swift expert but I do know enough to be dangerous and have my own spotify related app in the App Store...

@thatcherclough
Copy link
Owner

Oh thats great. I would love the help.

So the issue is most definitely caused by the Hue SDK, which is written on Obj C. I have done some research and it turns out that Obj C is more prone to memory management errors. Based on the crash logs you send me and this article, I was able to conclude that the crash was caused by a "Memory Access Issue", meaning that the SDK attempted to access something that was not available. Many resources noted the use of "Zombies", which keep pointers alive in development, however this did not help me as I could not recreate the error. That is about all the information I have.

As I was writing this I just remembered that the HueSDK came with a demo project. I am going to take a look at that and compare it to my project.

@thatcherclough
Copy link
Owner

Alright! So after comparing my code to that of the demo project, I have concluded that the error could be caused by my use of static variables. I will try to fix this and release a test flight build!

@thatcherclough
Copy link
Owner

I have removed the use of most static variables in version 1.4. It is on the app store now. Give it a try!

@naterrr
Copy link
Author

naterrr commented Dec 31, 2020 via email

@IIAIronWolf
Copy link

I am also having this issue. Could not join the TestFlight

@thatcherclough
Copy link
Owner

Does this issue still occur with the latest version on the app store?

@IIAIronWolf
Copy link

IIAIronWolf commented Jan 9, 2021 via email

@thatcherclough
Copy link
Owner

Interesting. I will see what I can do to fix this. I am also working on implementing HomeKit support, which will also support Hue lights if I cannot find a fix to this bug.

@IIAIronWolf
Copy link

Any update to the app crashing? Have not been able to use it one time yet. Sounds like a great app idea though..

@thatcherclough
Copy link
Owner

Unfortunately no. I have not been able to recreate the bug, and I cannot pin point the cause of it. I have tried running the app with low memory, however that did not cause the crash on my end. I will update this thread if I make any significant progress.

@IIAIronWolf
Copy link

Unfortunately no. I have not been able to recreate the bug, and I cannot pin point the cause of it. I have tried running the app with low memory, however that did not cause the crash on my end. I will update this thread if I make any significant progress.

I decided to see if it had anything to do with the fact that I was starting out by linking Spotify instead of Apple Music. I deleted and reinstalled the app, linked Spotify, and the exact same issue happened. Very interesting.

@thatcherclough
Copy link
Owner

Unfortunately no. I have not been able to recreate the bug, and I cannot pin point the cause of it. I have tried running the app with low memory, however that did not cause the crash on my end. I will update this thread if I make any significant progress.

I decided to see if it had anything to do with the fact that I was starting out by linking Spotify instead of Apple Music. I deleted and reinstalled the app, linked Spotify, and the exact same issue happened. Very interesting.

From the research I have done before, it has something to do with my usage of the HueSDK. I had someone run the demo that comes with the HueSDK, and they did not experience any crashing. This leads me to believe that I did something wrong when implementing it, but it's hard to figure out what because I don't experience the bug. I'm going to go through the demo project again and see if there is anything that sticks out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants