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  |
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 
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" 
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 
Frank
[Updated on: Sun, 24 November 2019 23:24] Report message to a moderator
|
|
|
|
|
|
|
Re: ERROR: Not in table (destructor clobbered?) [message #52788 is a reply to message #52781] |
Mon, 25 November 2019 00:06   |
Oblivion
Messages: 1206 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.
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Mon, 25 November 2019 00:16] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Tue May 13 10:46:16 CEST 2025
Total time taken to generate the page: 0.00720 seconds
|