Author Topic: Better dealing with FATAL ERRORS issues.  (Read 6214 times)

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4079
    • View Profile
    • Space Fractal
When there is a FATAL ERROR issues, which is so insanly hard to debug, near impossible to debug.

Here me thinks when that happens, when clicking on the line on the output, its should show the line where its happens in the gbas file and NOT in the c++ file. Im can see there is marked which lines and which gbas in the top of it. Why can IDE not checking those, so FATAL ERRORS easier could been debugged.

Those is too often happens when using functions and variables in types and a variable there cant been found. Those is newer catched in the IDE.

PS. This is NOT a glbasic bug, but more a request feature.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline Slydog

  • Prof. Inline
  • *****
  • Posts: 932
  • KodeSource
    • View Profile
    • KodeSource
Re: Better dealing with FATAL ERRORS issues.
« Reply #1 on: 2014-Jun-20 »
I know what you mean.  You have to decipher the C++ code to try and get an idea where it coincides in your GLBasic code.
I think maybe the problem is that it's the C++ compiler giving the error, and it would be difficult to reverse determine the same GLBasic location?

Gernot could store markers in the C++ source that kinda points to a specific location in the GLBasic source code.
Either in a comment (to be parsed later), or a new C++ variable.  You would need to store which file, and which line number.

Sorry, I reread your post.  A marker is already included in the C++ file?  Then he's half way there!
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4079
    • View Profile
    • Space Fractal
Re: Better dealing with FATAL ERRORS issues.
« Reply #2 on: 2014-Jun-27 »
Yes there is allready marker in the c++ code. But of course its should only been happens if its could fine a marker, or klik on the marker code. But if the issue is in IMPORT code, there is nothing that can been done of course.

Property this can first been happens after the FATAL OUTPUT have been finished, but then its could been in a list after that.

But again this is a request, not a bug.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10859
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Better dealing with FATAL ERRORS issues.
« Reply #3 on: 2014-Jun-28 »
Post these errors. I need to fix the precompiler.

Gesendet von meinem GT-N7100 mit Tapatalk


Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4079
    • View Profile
    • Space Fractal
Re: Better dealing with FATAL ERRORS issues.
« Reply #4 on: 2014-Jun-28 »
all bugs was ok and fixed, but was not catch with glbasic precompiler.

All Precompiler should do, when FATAL ERRORS happens, then its should point to the line glbasic code was, if its was marked near a line in the c++ code.

Most Fatal Errors happens when using a variable on a type that dosent exists. Those is not catch by precompiler. This is normally when creating objects.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1793
    • View Profile
    • Homepage
Re: Better dealing with FATAL ERRORS issues.
« Reply #5 on: 2014-Jun-29 »
When these errors occur, there is usually a line with the text

"Please post this error on the forum".

Please do this :-)

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4079
    • View Profile
    • Space Fractal
Re: Better dealing with FATAL ERRORS issues.
« Reply #6 on: 2014-Jul-03 »
Most Fatal Errors happens in the object and struct when a member cant been found. Those are newer catch:

Code: (glbasic) [Select]
E:\TEMP\glbasic\gpc_temp8.cpp: In function `DGInt __GLBASIC__::UpdateGame()':
E:\TEMP\glbasic\gpc_temp8.cpp:1161: error: 'class __GLBASIC__::tSpot' has no member named 'Clicked'
*** FATAL ERROR - Please post this output in the forum

in the c++ code its look like this
Code: (glbasic) [Select]
#undef __GLBNO__
#define __GLBNO__ 361
ON_DEBUG(8,361);
if (Spot(i,r).OverMouse==1 AND Spot(i,r).Clicked==1 )

Here its would nice to look for the #define. Of course this can first been checked after the compiler have been done eventuelly.


Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.