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

Render function bug? #661

Closed
nickollasaranha opened this Issue Nov 20, 2017 · 3 comments

Comments

Projects
None yet
4 participants
@nickollasaranha

nickollasaranha commented Nov 20, 2017

Hello,

I think you've introduced a bug at render function definition, where you do:

raise Error.new(self, "Partial name '#{template_name}' must begin with an underscore.") if template_name[0] != '_'

The first thing is that the error message showed is:

2017/11/20 11:11:55.336 FATAL: Fatal Exception! Exiting...
2017/11/20 11:11:55.336 FATAL: NoMethodError : undefined method +' for nil:NilClass C:/COSMOS/Vendor/Ruby/lib/ruby/gems/2.4.0/gems/cosmos-4.1.0/lib/cosmos/gui/dialogs/exception_dialog.rb:55:ininitialize'
C:/COSMOS/Vendor/Ruby/lib/ruby/gems/2.4.0/gems/cosmos-4.1.0/lib/cosmos/gui/dialogs/splash.rb:119:in new' C:/COSMOS/Vendor/Ruby/lib/ruby/gems/2.4.0/gems/cosmos-4.1.0/lib/cosmos/gui/dialogs/splash.rb:119:inblock (2 levels) in execute'
C:/COSMOS/Vendor/Ruby/lib/ruby/gems/2.4.0/gems/qtbindings-4.8.6.4-x64-mingw32/lib/Qt4.rb:104:in block in execute_in_main_thread' C:/COSMOS/Vendor/Ruby/lib/ruby/gems/2.4.0/gems/qtbindings-4.8.6.4-x64-mingw32/lib/Qt4.rb:57:incallback_timeout'
C:/COSMOS/Vendor/Ruby/lib/ruby/gems/2.4.0/gems/qtbindings-4.8.6.4-x64-mingw32/lib/Qt/qtruby4.rb:479:in qt_metacall' C:/COSMOS/Vendor/Ruby/lib/ruby/gems/2.4.0/gems/qtbindings-4.8.6.4-x64-mingw32/lib/Qt/qtruby4.rb:479:inmethod_missing'
C:/COSMOS/Vendor/Ruby/lib/ruby/gems/2.4.0/gems/qtbindings-4.8.6.4-x64-mingw32/lib/Qt/qtruby4.rb:479:in exec' C:/COSMOS/Vendor/Ruby/lib/ruby/gems/2.4.0/gems/cosmos-4.1.0/lib/cosmos/gui/qt_tool.rb:297:inblock in run'
C:/COSMOS/Vendor/Ruby/lib/ruby/gems/2.4.0/gems/cosmos-4.1.0/lib/cosmos/top_level.rb:716:in set_working_dir' C:/COSMOS/Vendor/Ruby/lib/ruby/gems/2.4.0/gems/cosmos-4.1.0/lib/cosmos/gui/qt_tool.rb:278:inrun'
C:/COSMOS/Vendor/Ruby/lib/ruby/gems/2.4.0/gems/cosmos-4.1.0/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb:641:in block in run' C:/COSMOS/Vendor/Ruby/lib/ruby/gems/2.4.0/gems/cosmos-4.1.0/lib/cosmos/top_level.rb:531:incatch_fatal_exception'
C:/COSMOS/Vendor/Ruby/lib/ruby/gems/2.4.0/gems/cosmos-4.1.0/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb:607:in `run'

Leading to no clues that "Partial name '#{template_name}' must begin with an underscore". Nevertheless, I'm using render function to define global cmd/tlm (as I've read in a past post), which is not possible if I start the dir name with '_'.

Glad if you could help with that issue.

Thanks,

@jasonatball

This comment has been minimized.

Show comment
Hide comment
@jasonatball

jasonatball Nov 20, 2017

Collaborator

I can confirm the error you saw. It appears our exception dialog needs certain preconditions to be met before it can successfully built the dialog. I have a fix I'll be commiting soon.

Can you describe how you're using a directory with an underscore? Our standard target configuration consists of a target directory with a cmd_tlm directory that contains all the configuration files. Do you have a subdirectory in cmd_tlm that contains partials?

Collaborator

jasonatball commented Nov 20, 2017

I can confirm the error you saw. It appears our exception dialog needs certain preconditions to be met before it can successfully built the dialog. I have a fix I'll be commiting soon.

Can you describe how you're using a directory with an underscore? Our standard target configuration consists of a target directory with a cmd_tlm directory that contains all the configuration files. Do you have a subdirectory in cmd_tlm that contains partials?

@nickollasaranha

This comment has been minimized.

Show comment
Hide comment
@nickollasaranha

nickollasaranha Nov 20, 2017

I'm using something like"../../SYSTEM/cmd_tlm/_ccsds_cmd.txt" to define a global _ccsds_cmd.txt file that I'd include in all targets' commands definition. Is there a better way to do so? Including a _ccsds_cmd.txt in each target doesn't seem the right way to do.

nickollasaranha commented Nov 20, 2017

I'm using something like"../../SYSTEM/cmd_tlm/_ccsds_cmd.txt" to define a global _ccsds_cmd.txt file that I'd include in all targets' commands definition. Is there a better way to do so? Including a _ccsds_cmd.txt in each target doesn't seem the right way to do.

@jasonatball

This comment has been minimized.

Show comment
Hide comment
@jasonatball

jasonatball Nov 20, 2017

Collaborator

That makes sense. I'll get this patched today.

Collaborator

jasonatball commented Nov 20, 2017

That makes sense. I'll get this patched today.

@jasonatball jasonatball self-assigned this Nov 20, 2017

@jasonatball jasonatball added the bug label Nov 20, 2017

@ryanmelt ryanmelt modified the milestone: v4.1.0 Nov 20, 2017

@ryanatball ryanatball added this to the v4.1.1 milestone Dec 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment