Author Topic: lots of dbg() errors when DEBUG enabled. [fixed]  (Read 3331 times)

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4020
    • View Profile
    • Space Fractal
When enabling DEBUG does not work at all when using TYPE and objects. Try to compile Android Extras as a example, which its also dont like. When debug is disabled, then its work pretty fine.

Im have to write, DEBUG command will newer work on iOS and on property newer compilers, due the name is allready used. Im recommends to uses STDOUT instead.

Code: (glbasic) [Select]

_______________________________________
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.10.037 SN:73686179 - 3D, NET
Wordcount:1408 commands
compiling:
In file included from D:\glbasic\glbasic\gpc_tempg.cpp:2:
D:\glbasic\glbasic\gpc_temp.h: In member function `virtual void __GLBASIC__::GameInputs::dbg() const':
D:\glbasic\glbasic\gpc_temp.h:309: error: ambiguous overload for 'operator+' in 'DGStr(((const char*)"NAMES_Str:")) + ((const __GLBASIC__::GameInputs*)this)->__GLBASIC__::GameInputs::NAMES_Str'
D:/Programmer/GLBasic_v14/Compiler/platform/Include/glb.h:278: note: candidates are: __GLBASIC__::DGStr __GLBASIC__::operator+(int, const __GLBASIC__::DGStr&) <near match>
D:/Programmer/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(int64, const __GLBASIC__::DGStr&) <near match>
D:/Programmer/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(float, const __GLBASIC__::DGStr&) <near match>
D:/Programmer/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(double, const __GLBASIC__::DGStr&) <near match>
D:/Programmer/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, const __GLBASIC__::DGStr&) <near match>
D:/Programmer/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, int) <near match>
D:/Programmer/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, int64) <near match>
D:/Programmer/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, float) <near match>
D:/Programmer/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, double) <near match>
D:\glbasic\glbasic\gpc_temp.h:310: error: ambiguous overload for 'operator+' in 'DGStr(((const char*)"code_Str:")) + ((const __GLBASIC__::GameInputs*)this)->__GLBASIC__::GameInputs::code_Str'
D:/Programmer/GLBasic_v14/Compiler/platform/Include/glb.h:278: note: candidates are: __GLBASIC__::DGStr __GLBASIC__::operator+(int, const __GLBASIC__::DGStr&) <near match>
D:/Programmer/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(int64, const __GLBASIC__::DGStr&) <near match>
D:/Programmer/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(float, const __GLBASIC__::DGStr&) <near match>
D:/Programmer/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(double, const __GLBASIC__::DGStr&) <near match>
D:/Programmer/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, const __GLBASIC__::DGStr&) <near match>
D:/Programmer/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, int) <near match>
D:/Programmer/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, int64) <near match>
D:/Programmer/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, float) <near match>
D:/Programmer/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, double) <near match>
....... (shorted)
« Last Edit: 2015-Aug-20 by spacefractal »
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10839
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: lots of dbg() errors when DEBUG enabled.
« Reply #1 on: 2015-Aug-16 »
Can you post the type GameInputs?

Offline kanonet

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1137
    • View Profile
    • My GLBasic code archiv
Re: lots of dbg() errors when DEBUG enabled.
« Reply #2 on: 2015-Aug-16 »
I got the same problem in several projects, I think it is because you did not keep array members of types in mind, simplest failing test:
Code: (glbasic) [Select]
TYPE t
array[]
ENDTYPE
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4020
    • View Profile
    • Space Fractal
Re: lots of dbg() errors when DEBUG enabled.
« Reply #3 on: 2015-Aug-16 »
Its happens in all Types used.

So Checkout the Android Extras example (Compiler\platform\android\Android Extras\AndroidSample.app)
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline kanonet

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1137
    • View Profile
    • My GLBasic code archiv
Re: lots of dbg() errors when DEBUG enabled.
« Reply #4 on: 2015-Aug-18 »
Obviously dbg() was only implemented for simple arithmetic type member data types, but not for members that are arrays or other types:
Code: (glbasic) [Select]
//works:
TYPE A
a%
ENDTYPE


//fails:
TYPE B
b[]
ENDTYPE


//fails:
TYPE C
c
ENDTYPE

TYPE D
d AS C
ENDTYPE


EDIT: I can confirm, that it is fixed in 14.006. Well done Gernot! :good:
« Last Edit: 2015-Aug-18 by kanonet »
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64