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: Failure on parfor statements in class methods #116

Closed
Funky185540 opened this issue Feb 22, 2021 · 1 comment
Closed

Bug: Failure on parfor statements in class methods #116

Funky185540 opened this issue Feb 22, 2021 · 1 comment
Labels

Comments

@Funky185540
Copy link

Compilation in Sphinx fails (Goes to an infinite loop) when parfor statements are contained in methods in classes somewhere in the code.

The "complexity" of the statement seemingly doesn't play a role. Also note that the "faulty" method doesn't even need to be referenced in the sphinx docs, it's enough if it exists.

Steps to reproduce it

Grab a copy of this very github repo, go to docs/src/ and place this code in a file called 'test.m' in it:

classdef test
    %TEST Summary of this class goes here
    %
    %   Detailed explanation goes here
    
    properties
        Property1
    end
    
    methods
        function obj = test(inputArg1,inputArg2)
            %TEST Construct an instance of this class
            %
            %   Detailed explanation goes here
            obj.Property1 = inputArg1 + inputArg2;
            parfor i = 1:10
            end
        end
        
        function outputArg = method1(obj,inputArg)
            %METHOD1 Summary of this method goes here
            %
            %   Detailed explanation goes here
            outputArg = obj.Property1 + inputArg;
        end
    end
end

The code is what Matlab generates by default as a class template. Do not touch any of the example code in the other files, leave it as is and try to compile the docs: make html

Expected output

The docs compile and are generated in the build output folder.

Actual output

The compilation doesn't finish, the compilation thread spins into an infinite loop.

Observations

If you remove the code for "method1" entirely, the bug disappears and the docs compile properly.

@joeced joeced closed this as completed in 8606b4f Feb 22, 2021
@joeced
Copy link
Collaborator

joeced commented Feb 22, 2021

Thanks for the report - very detailed! The new version will be out tomorrow.

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

No branches or pull requests

2 participants