<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>388</bug_id>
          
          <creation_ts>2010-03-17 05:37:00 +0100</creation_ts>
          <short_desc>GlueGen doesn&apos;t calculate offsets correctly for complex structs (StructAccessor)</short_desc>
          <delta_ts>2011-12-02 07:57:28 +0100</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Gluegen</product>
          <component>core</component>
          <version>2</version>
          <rep_platform>Other</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Bien">bienator</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          
          
          <cf_type>DEFECT</cf_type>
          <cf_scm_refs>f733203dfbd034a6b1aa3eb2cd616437c982c435
9a889948e7d649286ae0a473b49d14461c8981c5
133de98defb7ec3d1f202805505aa85a5650e3d0
a0fc362dfd5857ed3485b72f93baaa05f2591a1d
2bf03e9814477b412f9533d3ba3f4c597892501e
8fc841257cae6b49399b29dfa53e3e834d27cabb
92d6c9dc5fa72b01703456452c60822f36c14fff
846c64d71d0e07ce1f5b4955eba8b49bfa0b5a22
0a8e1566c766f3b5a5e71b5d80500034f1a614a8
8b3057585930357bb16546f584d998953b084034
dc4b259b6651bdc0cec0895bc74e26e504870c8e
4aa66890176e9c2d8e648d6031c9491c3d625e07
3f2110f045de4bd4bd43f681256626bed1998fc3
dac1bac087ac94c596dcb74185d504712069b0a7</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>412</commentid>
    <comment_count>0</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2010-03-24 08:04:19 +0100</bug_when>
    <thetext>


---- Reported by mbien@fh-landshut.de 2010-03-17 17:37:13 -0400 ----

array support for structs needs more work
http://github.com/mbien/gluegen/commit/0fa706b4eef533ead671310a9a7e063a910198cb
field offsets are not calculated correctly in some situations.

for an example run GlueGen&apos;s StructAccessorTest and check the generated offsets for struct.h.



--- Bug imported by sgothel@jausoft.com 2010-03-24 08:04 EDT  ---

This bug was previously known as _bug_ 2 at http://jogamp.org/bugzilla/show_bug.cgi?id=2
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>606</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2010-11-19 13:03:37 +0100</bug_when>
    <thetext>P4 since our current projects can live with this issue ..</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1005</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2011-07-23 02:08:23 +0200</bug_when>
    <thetext>gluegen/wip_mobile branch, will be merged to master soon.

Summary (details see git commit log):

    Currently GlueGen fails for type long (size) and some alignments (see package.html).
      - The size and alignment values shall be queried at runtime.
      - Compound alignment needs to follow the described natural alignment (also @runtime).

    - StructLayout:
       - Utilizing SizeThunk alignment
       - Alignment
           1) Natural type alignment
           2) Add Size
           3) Trailing padding w/ largest element alignment

    java c-struct code generation:
      - single class using size/offset arrays of all MachineDescription configurations
      - at runtime the array idx is queried in static block
      - type aligment for not fixed-native-size types (SizeThunk, undef long/int) via StructAccessor

OK: linux 32/64/armv7l, android armv7l, windows 32/64</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1006</commentid>
    <comment_count>3</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2011-07-23 02:09:45 +0200</bug_when>
    <thetext>commit list:
http://jogamp.org/git/?p=gluegen.git;a=commit;h=f733203dfbd034a6b1aa3eb2cd616437c982c435
http://jogamp.org/git/?p=gluegen.git;a=commit;h=9a889948e7d649286ae0a473b49d14461c8981c5
http://jogamp.org/git/?p=gluegen.git;a=commit;h=133de98defb7ec3d1f202805505aa85a5650e3d0
http://jogamp.org/git/?p=gluegen.git;a=commit;h=a0fc362dfd5857ed3485b72f93baaa05f2591a1d
http://jogamp.org/git/?p=gluegen.git;a=commit;h=2bf03e9814477b412f9533d3ba3f4c597892501e
http://jogamp.org/git/?p=gluegen.git;a=commit;h=8fc841257cae6b49399b29dfa53e3e834d27cabb
http://jogamp.org/git/?p=gluegen.git;a=commit;h=92d6c9dc5fa72b01703456452c60822f36c14fff
http://jogamp.org/git/?p=gluegen.git;a=commit;h=846c64d71d0e07ce1f5b4955eba8b49bfa0b5a22
http://jogamp.org/git/?p=gluegen.git;a=commit;h=0a8e1566c766f3b5a5e71b5d80500034f1a614a8
http://jogamp.org/git/?p=gluegen.git;a=commit;h=8b3057585930357bb16546f584d998953b084034
http://jogamp.org/git/?p=gluegen.git;a=commit;h=dc4b259b6651bdc0cec0895bc74e26e504870c8e
http://jogamp.org/git/?p=gluegen.git;a=commit;h=4aa66890176e9c2d8e648d6031c9491c3d625e07
http://jogamp.org/git/?p=gluegen.git;a=commit;h=3f2110f045de4bd4bd43f681256626bed1998fc3
http://jogamp.org/git/?p=gluegen.git;a=commit;h=dac1bac087ac94c596dcb74185d504712069b0a7</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>