Author Topic: FunctionTableType bug?  (Read 334 times)

0 Members and 1 Guest are viewing this topic.

helloworld

  • Newbie
  • *
  • Posts: 16
FunctionTableType bug?
« on: May 06, 2017, 07:53:02 AM »
In OxygenBasic\tests\ConstructsFunctionTableType.o2bas:

When I change "print funs.f1 4" to "print funs.f2 4" the compiler goes nirvana..




Arnold

  • Sr. Member
  • ****
  • Posts: 488
Re: FunctionTableType bug?
« Reply #1 on: May 06, 2017, 01:33:54 PM »
Hi helloworld,

in the folder tests Charles collects test cases which might not fully work and which will possibly need a revision. And I also think it is helpful to specify which cases might not work.

@Charles: maybe it is be possible to point out such problems, e.g. in this case:

' print funs.f2 4 '4.0 ' will crash

And as co2.exe crashes, would such a system message of the computer be helpful for you apart from #recordof:

Problemsignatur:
  Problemereignisname:   APPCRASH
  Anwendungsname:   co2.exe
  Anwendungsversion:   0.0.0.0
  Anwendungszeitstempel:   587a5f89
  Fehlermodulname:   StackHash_f0c3
  Fehlermodulversion:   0.0.0.0
  Fehlermodulzeitstempel:   00000000
  Ausnahmecode:   c0000005
  Ausnahmeoffset:   4af84c70
  Betriebsystemversion:   6.0.6002.2.2.0.768.2
  Gebietsschema-ID:   1031
  Zusatzinformation 1:   f0c3
  Zusatzinformation 2:   28e16b0abe0310662a92edeb11b0cb84
  Zusatzinformation 3:   8ff2
  Zusatzinformation 4:   416a1af3ec50c5b845a3673ea2ba7da4

This message was created by a 32-bit system, I assume 64-bit will give a similar result. The additional informations 1-4 were always the same, unfortunately I cannot interpret them.

Roland

Charles Pegge

  • Author
  • *****
  • Posts: 3334
    • Oxygen Basic
Re: FunctionTableType bug?
« Reply #2 on: May 07, 2017, 02:12:35 AM »

Hi helloworld and Roland,

Yes, that was an interestiing bug. Thanks for reporting it. The function pointer was perceived as a float, got confused with the return type, with GPF consequences.

These are antique  C style function tables. Normally one would use Classes and avoid such complexity.