Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » [SOLVED] ERROR: Not in table (destructor clobbered?) (Facing this exception, and the dtor doesn't get called)
[SOLVED] ERROR: Not in table (destructor clobbered?) [message #52778] Sat, 23 November 2019 22:47 Go to next message
xrysf03 is currently offline  xrysf03
Messages: 43
Registered: November 2018
Location: CZ
Member
Dear everyone,

while tweaking my toy app in U++, I've come across an interesting error message.
At runtime, my app doesn't crash outright, but throws an exception saying
iqbal
ERROR: Not in table: ~iqbal() called

...and the program keeps working! Screenshot included.
"iqbal" is the name of a particular class in my project (an I+Q imbalance correction thing).
So far I have created a handful of non-visual classes, and never had a problem with the "system".

The error message is pretty informative: it says what class has thrown the error and what function was supposed to get called (the destructor). It happens when I say "delete iq", where iq is an iqbal* (pointer). And the destructor does *not* get called - if I insert a PromptOK() or some such in the dtor, I don't get the message.

Do I understand correctly, that U++ knows the method name (symbol) but somehow cannot find the function in the late-binding virtual function table? BTW the method is not even virtual and there's no inheritance in the game, the "class iqbal" is pretty basic / self-sufficient.

I'm wondering if this is a result of me writing some unallocated memory or iterating past the end of a static array. It would not be the first time on this project Wink
I've tried moving the "delete" (destructor call) just after the object is instantiated with a "new", literally on the next line of code. And it throws the exception.
There's no pointer-based memory access inbetween the "new" and the "delete" - yet the exception occurs, always. Means to me that I've messed up someplace earlier, and have caused a "rift in the matrix" Wink
I merely feel like it's time I asked if this is perhaps some other problem, if the message maybe points to some specific goofup. Anything that could help me narrow down the problem. Otherwise my next step would be, to try the instantiation+destruction right at the start of my program, before all the dynamic buffer allocations and accesses start to happen...

BTW this is still U++ 12610 nigthly (=oldish) with Mingw64 in "Release" mode.

Any ideas are welcome Smile

Frank

[Updated on: Sun, 24 November 2019 23:24]

Report message to a moderator

Re: ERROR: Not in table (destructor clobbered?) [message #52779 is a reply to message #52778] Sun, 24 November 2019 12:23 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
A question Xrysf03: Are you throwing an exception out of a destructor?

Best regards
Iñaki
Re: ERROR: Not in table (destructor clobbered?) [message #52781 is a reply to message #52779] Sun, 24 November 2019 13:04 Go to previous messageGo to next message
xrysf03 is currently offline  xrysf03
Messages: 43
Registered: November 2018
Location: CZ
Member
@koldo: not that I'm aware of Smile
Sorry to say that, but you won't find any occurrence of try/catch/finally in my whole project. Let alone a "throw".

But I guess you've helped me solve the problem. Earlier, while debugging some other mischief, I had added a PromptOK() into the reported dtor. If I comment that out, the "ERROR: Not in table" goes away. Funny that I haven't correlated those two earlier. I'll keep an eye on this for a bit, but it seems like I've got my culprit. => thank you Smile
Re: ERROR: Not in table (destructor clobbered?) [message #52782 is a reply to message #52781] Sun, 24 November 2019 20:12 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Sorry Xrysf03, you said Quote:
At runtime, my app doesn't crash outright, but throws an exception saying ...
Rolling Eyes


Best regards
Iñaki
Re: ERROR: Not in table (destructor clobbered?) [message #52785 is a reply to message #52782] Sun, 24 November 2019 23:00 Go to previous messageGo to next message
xrysf03 is currently offline  xrysf03
Messages: 43
Registered: November 2018
Location: CZ
Member
Smile Yes I know. On my techsupport job, I grin when people come to me and use inappropriate vocabulary to describe... things going on that they do not understand. And hypothesize about the cause. So to you, I am the rookie now Smile It's always nice to have someone who has the patience to answer my silly questions.
Re: ERROR: Not in table (destructor clobbered?) [message #52788 is a reply to message #52781] Mon, 25 November 2019 00:06 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1091
Registered: August 2007
Senior Contributor
Hello Frank,

I can't really comment much on the cause of the actual error as I don't have a sample code to inspect, but what you describe here might be caused by the text your code passes to Prompt. (PromptOK).

AFAIk, the "Not in table" error is thrown when a qtf text doesn't contain a required element, or by a malformed qtf text.

When you pass a C string (a string with typical whitespaces or ANSI control codes (a chr < 0x20), or a string that can have characters used in QTF commands, such as "[", etc.) to a QTF-native widgets, e.g prompts, etc., you need to use DeQtf() function to escape the aforementioned control codes:

E.g.
String text = "Hello world\nThis is U++";
PromptOK(DeQtf(text));


Best regards,
Oblivion.


[Updated on: Mon, 25 November 2019 00:16]

Report message to a moderator

Re: ERROR: Not in table (destructor clobbered?) [message #52789 is a reply to message #52788] Mon, 25 November 2019 08:30 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
BTW, alternative to DeQtf is '\1' - works as bracket to the text that should not be interpreted as containing Qtf commands.

E.g. PromptOK("[* Example: \1[] {}\1]");

Mirek
Previous Topic: [SOLVED] Do Value can store anonymous function ?
Next Topic: [solved] Register a callback on "when window resized" ?
Goto Forum:
  


Current Time: Fri Mar 29 15:38:30 CET 2024

Total time taken to generate the page: 0.01107 seconds