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

Windows fixes and Timeshift buffer deletion #116

Merged
merged 3 commits into from
Oct 16, 2018
Merged

Windows fixes and Timeshift buffer deletion #116

merged 3 commits into from
Oct 16, 2018

Conversation

phunkyfish
Copy link
Member

@phunkyfish phunkyfish commented Oct 16, 2018

v3.12.6

First appears to be a race condition on addon startup, I have to start the addon about 50 times to get it to happen. Welcome any feedback how I added the lock objects. I referenced several other addons to see how it was done there so I think have everything covered. On the third the Epg.cpp fixed worked bu now's it's stuck on AutoTimer.cpp

@phunkyfish
Copy link
Member Author

@Rechi let me know if this fixes the windows build problem.

@phunkyfish
Copy link
Member Author

phunkyfish commented Oct 16, 2018

@Rechi I see there is jenkins now. I fixed the error in Epg.cpp. But now there is an error in AutoTimer.cpp. I'm not seeing what's causing it though. I don't see how all the access is member variable (both private and inherited) are illegal. @ksooo any thoughts?

@phunkyfish
Copy link
Member Author

Going to push this again. Missing a file from #114 fix and fix for #115

@phunkyfish
Copy link
Member Author

phunkyfish commented Oct 16, 2018

Ok I've pushed again. Still no clue on why the build is failing on AutoTimer.cpp, it's like it can't see it's own header file. @ksooo any ideas?

@ksooo
Copy link
Member

ksooo commented Oct 16, 2018

Show me the error message, please.

ksooo
ksooo previously requested changes Oct 16, 2018
Copy link
Member

@ksooo ksooo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should really be very careful with all these locks you have introduced with this PR! There is high deadlock potential and we are nearly in Leia RC phase. I have no good feelings with such a dangerous change at that stage. Did you used the golden hammer instead of fixing the actual problem?

src/Enigma2.cpp Outdated Show resolved Hide resolved
src/enigma2/Epg.cpp Outdated Show resolved Hide resolved
src/enigma2/TimeshiftBuffer.cpp Outdated Show resolved Hide resolved
@Rechi
Copy link
Contributor

Rechi commented Oct 16, 2018

@ksooo look into the jenkins pr status check.

@ksooo
Copy link
Member

ksooo commented Oct 16, 2018

D:\jenkins\workspace\binary-addons\kodi-windows-x86_64-master\tools\depends\target\binary-addons\pvr.vuplus\src\enigma2\data\AutoTimer.cpp(82): error C2061: syntax error: identifier 'Channels'

The type seems not to be found. Missing include? namespace problem?

@phunkyfish
Copy link
Member Author

Don't I feel like an idiot. Spent hours blindly looking at the code and it's obvious now. Thanks @ksooo

As the lock code is controversial I will remove it from this PR so we can get the build back working. I'll put it in a separate PR for discussion. What I need with it is some guidance on how to resolve the issue.

@ksooo
Copy link
Member

ksooo commented Oct 16, 2018

As the lock code is controversial I will remove it from this PR so we can get the build back working. I'll put it in a separate PR for discussion. What I need with it is some guidance on how to resolve the issue.

Sounds like a good plan. Thanks.

@ksooo
Copy link
Member

ksooo commented Oct 16, 2018

Don't I feel like an idiot. Spent hours blindly looking at the code and it's obvious now

I know that feeling... :-)

@phunkyfish phunkyfish changed the title Race condition and windows fix Windows fixes and Timeshift buffer deletion Oct 16, 2018
@phunkyfish
Copy link
Member Author

phunkyfish commented Oct 16, 2018

Ok, should be good now.

I'm curious as to why the namespace issues were a problem in Windows but not on any other platform.

They were in fact incorrect just funny that no other platform seemed to care.

@phunkyfish
Copy link
Member Author

@ksooo I don't appear to be able to resolve you previous review. Maybe as I had already pushed the branch.

Copy link
Member

@ksooo ksooo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the deletefile error handling correct?

src/enigma2/TimeshiftBuffer.cpp Outdated Show resolved Hide resolved
@phunkyfish
Copy link
Member Author

@ksooo for the change in Epg.cpp any reason not to use char instead of byte?

@ksooo ksooo dismissed their stale review October 16, 2018 11:29

locks are removed from this PR, so my -1 is no longer valid

@ksooo
Copy link
Member

ksooo commented Oct 16, 2018

for the change in Epg.cpp any reason not to use char instead of byte?

No reason.

@phunkyfish
Copy link
Member Author

Ok, I change the DeleteFile call to a condition instead. Also, I removed ifdef WIN32 from Enigma2.cpp as it's no longer required.

Hopefully, we are good now.

@phunkyfish
Copy link
Member Author

phunkyfish commented Oct 16, 2018 via email

@phunkyfish
Copy link
Member Author

Ok, I'm remove the WIN32 undef.

Should be finally, finally ready to go ;)

Copy link
Member

@ksooo ksooo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your button, @phunkyfish

@phunkyfish phunkyfish merged commit bb7dd7f into kodi-pvr:master Oct 16, 2018
@phunkyfish phunkyfish deleted the race-condition-and-windows-fix branch October 16, 2018 17:05
@phunkyfish
Copy link
Member Author

phunkyfish commented Oct 16, 2018 via email

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

Successfully merging this pull request may close these issues.

4 participants