Menu

#189 revision 10381 - New project dialog is empty

Undefined
fixed
None
Bug_Report
2015-08-12
2015-08-07
Wes Bliven
No

Compiling revision 10381 from source on XUbuntu 14.04 the new project dialog is empty (no templates at all).
Compiling revision 10380 works as expected.
Both tested in virtual box windows host.

Related

Tickets: #189

Discussion

  • Teodor Petrov

    Teodor Petrov - 2015-08-07

    Do you see any errors in the log window?
    What happens if you start cb with --debug-log cmd line option?

    What compiler are you using?
    What commands are you using to build cb?

     
  • Teodor Petrov

    Teodor Petrov - 2015-08-07
    • assigned_to: Teodor Petrov
     
    • Wes Bliven

      Wes Bliven - 2015-08-07

      No errors in log window.

      gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04)

      I followed the build instructions on wiki. I observed same behavior if I
      use default directory or if I used --prefix to install in another
      directory. In either case r10380 had visible new project templates and
      r10381 did not.
      I also tried --with-contrib-plugins=all, which had no effect on the problem.

      I'll run the --debug-log tomorrow morning.

      regards,
      Wes

      On Thu, Aug 6, 2015 at 11:04 PM, Teodor Petrov fuscated@users.sf.net
      wrote:

      • assigned_to: Teodor Petrov
      • Comment:

      Do you see any errors in the log window?
      What happens if you start cb with --debug-log cmd line option?

      What compiler are you using?
      What commands are you using to build cb?


      Status: open
      Milestone: Undefined
      Created: Fri Aug 07, 2015 05:41 AM UTC by Wes Bliven
      Last Updated: Fri Aug 07, 2015 05:41 AM UTC
      Owner: Teodor Petrov

      Compiling revision 10381 from source on XUbuntu 14.04 the new project
      dialog is empty (no templates at all).
      Compiling revision 10380 works as expected.
      Both tested in virtual box windows host.


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/codeblocks/tickets/189/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      --
      Wes Bliven
      Department of Physics and Astronomy
      Humboldt State University
      1 Harpst Street, Arcata CA 95521
      (707) 826 - 5329

       

      Related

      Tickets: #189

      • Wes Bliven

        Wes Bliven - 2015-08-07

        I have attached the debug log to this email. I opened the new project wizard before exiting.

        Wes

        On Thu, Aug 6, 2015 at 11:58 PM, Wes Bliven wes-one@users.sf.net wrote:

        No errors in log window.

        gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04)

        I followed the build instructions on wiki. I observed same behavior if I
        use default directory or if I used --prefix to install in another
        directory. In either case r10380 had visible new project templates and
        r10381 did not.
        I also tried --with-contrib-plugins=all, which had no effect on the
        problem.

        I'll run the --debug-log tomorrow morning.

        regards,
        Wes

        On Thu, Aug 6, 2015 at 11:04 PM, Teodor Petrov fuscated@users.sf.net
        wrote:

        • assigned_to: Teodor Petrov
        • Comment:

        Do you see any errors in the log window?
        What happens if you start cb with --debug-log cmd line option?

        What compiler are you using?
        What commands are you using to build cb?


        Status: open
        Milestone: Undefined
        Created: Fri Aug 07, 2015 05:41 AM UTC by Wes Bliven
        Last Updated: Fri Aug 07, 2015 05:41 AM UTC
        Owner: Teodor Petrov

        Compiling revision 10381 from source on XUbuntu 14.04 the new project
        dialog is empty (no templates at all).
        Compiling revision 10380 works as expected.
        Both tested in virtual box windows host.


        Sent from sourceforge.net because you indicated interest in
        https://sourceforge.net/p/codeblocks/tickets/189/

        To unsubscribe from further messages, please visit
        https://sourceforge.net/auth/subscriptions/

        --
        Wes Bliven
        Department of Physics and Astronomy
        Humboldt State University
        1 Harpst Street, Arcata CA 95521
        (707) 826 - 5329


        Status: open
        Milestone: Undefined
        Created: Fri Aug 07, 2015 05:41 AM UTC by Wes Bliven
        Last Updated: Fri Aug 07, 2015 06:04 AM UTC
        Owner: Teodor Petrov

        Compiling revision 10381 from source on XUbuntu 14.04 the new project
        dialog is empty (no templates at all).
        Compiling revision 10380 works as expected.
        Both tested in virtual box windows host.


        Sent from sourceforge.net because you indicated interest in
        https://sourceforge.net/p/codeblocks/tickets/189/

         

        Related

        Tickets: #189


        Last edit: Wes Bliven 2015-08-07
  • Teodor Petrov

    Teodor Petrov - 2015-08-07

    As far as I can see there are wizards registered.
    Can you show us a screen shot?
    Do you have wizard templates in ~/.config/codeblocks/ or ~/.local/codeblocks/?

     
  • Wes Bliven

    Wes Bliven - 2015-08-08

    I am attaching screenshots for revision 10381 which show the problem. revision 10380 shows templates in dialog.

    I don't have scripts in either of those directories. I have scripts in
    /opt/cbBare_r10381/share/codeblocks/templates/wizard/
    /opt/cbBare_r10380/share/codeblocks/templates/wizard

    I have an empty directory
    ~/.local/share/codeblocks/templates/wizard

     

    Last edit: Wes Bliven 2015-08-08
  • ollydbg

    ollydbg - 2015-08-08

    I just tested the r10381 on Windows, I get the same empty wizard dialog.
    I haven't tested the r10380 yet.

     
  • ollydbg

    ollydbg - 2015-08-08

    I can confirm that r10380 don't have this issue on Windows.

     
  • Teodor Petrov

    Teodor Petrov - 2015-08-08

    OK, I see it too.

     
  • Teodor Petrov

    Teodor Petrov - 2015-08-08

    Reverted... no time to implement the proper solution for this problem...

     
  • ollydbg

    ollydbg - 2015-08-09

    I'm not quite familar with C::B's squirrel and the sqplus system, but I did debugged a while to see what is the problem of the r10381 and r10382.

    Let's look at the function:

    template<typename T>
    void BindConstant(SquirrelObject & so,T constant,const SQChar * scriptVarName) {
      validateConstantType(constant);
      VarRefPtr pvr = createVarRef(so,scriptVarName);
      struct CV {
        T var;
      } cv; // Cast Variable helper.
      cv.var = constant;
      *pvr = VarRef(*(void **)&cv,TypeInfo<T>(),0,0,sizeof(constant),VAR_ACCESS_CONSTANT,TypeInfo<T>().typeName);
      createTableSetGetHandlers(so);
    } // BindConstant
    

    (EDIT: Change the below statement to code style)

    Look, the &cv is the start address of the cv variable, it is also the start address of the cv.var variable.
    Now, *(void **)&cv first convert the address to (void **) type, then, make a dereference, this is actually the value of cv.var. Which stores the constant value passed in.
    When you change the *(void **)&cv to &cv, you are passing the address of cv.var to the VarRef constructor, not the value of the cv.var, so it is wrong.
    
    When the T is a bool type, the struct CV only has sizeof(CV) = sizeof(bool) = 1, but when you deference the address of &cv, you get a value of 4 bytes (in my windows XP system). We store the constant's value in only 1 bytes(for the bool = true, it is 0x01), but the next 3 bytes were also fetched as the value of *(void **)&cv which is passed to the VarRef constructor. What's why address sanitizer report the issue.
    

    Maybe, the introduction of this method is try to solve some byte alignment issue? Why not just pass the value of constant to the VarRef constructor?

     

    Last edit: ollydbg 2015-08-09
  • ollydbg

    ollydbg - 2015-08-09

    I see that one place the struct use some paddings, see:

    template<typename T>
    void RegisterInstanceConstant(SquirrelObject & so,SQUserPointer classType,T constant,const SQChar * scriptVarName) {
      validateConstantType(constant);
      VarRef * pvr = createVarRef(so,scriptVarName);
      struct CV {
        T var;
        size_t pad;
      } cv; // Cast Variable helper.
      cv.var = constant;
      *pvr = VarRef(*(void **)&cv,TypeInfo<T>(),classType,0,sizeof(constant),VAR_ACCESS_CONSTANT,TypeInfo<T>().typeName);
      createInstanceSetGetHandlers(so);
    } // RegisterInstanceConstant
    
     
  • Teodor Petrov

    Teodor Petrov - 2015-08-12

    Fixed in trunk.

     
  • Teodor Petrov

    Teodor Petrov - 2015-08-12
    • status: open --> fixed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.