Internal Error:34623

1,094 views
Skip to first unread message

Nathan Woodrow

unread,
Jun 21, 2010, 6:49:09 PM6/21/10
to MapInfo-L
Hi All,

I am working on my latest build of my MapInfo Window manager but there
is one bug that is really annoying me and hurting some of the end user
experience. I am getting a "Internal Error: 34623" at random when
people call close all menu item in MapInfo or sometimes closing a Map
window with my tool open.

The error isn't consistent and only happens sometimes but when it does
it crashes MapInfo.

I'm wondering if anyone has found a fix for this, or has a way to trap
it so that it doesn't crash MapInfo.

I have read a few forum posts from years ago that said it was a
internal bug in MapInfo 6 but surly it is fixed now and this is
something different.

- Nathan
http://woostuff.wordpress.com/

Bill Thoen

unread,
Jun 21, 2010, 10:33:26 PM6/21/10
to mapi...@googlegroups.com
No, not "fixed" yet, and it's been lurking in the code for at least ten
years. It used to be that typing

print windowinfo(1001,11)

Into the MapBasic window would trigger it, but as of ver 7.5 and
definitely by 7.8 this trick no longer works.

What seems to cause it is a write to a non-existent window. It also
seems to be associated with the Close All command and integrated
mapping. Got any WinChangedHandlers running or callbacks? I think you
can avoid it by putting a routine in the program exit routine that
enumerates all open windows and closes them one by one. It seems that
the Close all command does its job faster than some processes can get
clear before the house comes down, and it doesn't wait for the slow ones.

--
- Bill Thoen
GISnet - www.gisnet.com
303-786-9961

Nathan Woodrow

unread,
Jul 19, 2010, 2:29:51 AM7/19/10
to mapi...@googlegroups.com
So I have managed to trace what is causing this pain-in-the-ass bug, it seems to be related to having a ClosedWindowHandler and closing a window that has had a legend made from it and calling the get clone window string for the legend.  To replicate, put this code in a mbx and run it:

==CODE===

Include "mapbasic.def"
Include "ICONS.DEF"
Include "MENU.DEF"

Declare Sub Main
Declare Sub WinClosedHandler 
Declare Sub WinFocusChangedHandler 

Sub Main
End Sub

Sub WinClosedHandler 
    Dim ID as Integer
    ID = CommandInfo(CMD_INFO_WIN)
    Dim clone as String
    //Get the clone string
    Clone = WindowInfo(ID,15)
    Print Clone
End Sub 

Sub WinFocusChangedHandler 
Dim ID as Integer
ID = CommandInfo( CMD_INFO_WIN )
End Sub 

==END CODE===

Now open two map windows and go Map->Create Legend on one of the Map windows and create a legend, now close the map window that you didn't create a legend for. It will print out the clone string for that window.  
Now close the window that you used to create legend, MapInfo should throw a Internal Error:34623, but it will first print the clone window command for the Map Window then die when it tries to do the same for the Legend. 

It seems to be doing it because the map window that is associated with the legend is no longer open and something inside the WindowInfo({legendwindowid},15) command needs the reference to the map and crashes.  You can get around this by checking if the legends map window is still open by calling WindowInfo(WindowInfo({legendid},10),11), which will check to see if the map that was used to create the legend is still open.

So PBBI add this bug to your MapInfo bug list, a error message would be better then a uncatchable crash.

- Nathan


--
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.To post a message to this group, send email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en

Reply all
Reply to author
Forward
0 new messages