Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#64 New symbol editor crashes when old symbol is selected

Reproducible
closed
Crashes (16)
6
2012-10-10
2009-02-22
Henryk Birecki
No

I downloaded the source (tarball), and compiled with VS2008 from the trunk\src folder. I am running Debug configuration. Here is the simplest way to crash:
1) start TiniCAD
2) open a library to edit
3) click New Symbol
4) in the left hand control panel select a part to enter and modify to get new symbol (that worked in 2.6.0)
5) click on the image of the symbol that appears after part is selected

This results in an assertion in ...vc\include\vector line 779 (vector subscript out of range)

call stack listed below:

TinyCad.exe!std::_Debug_message(const wchar_t * message=0x0066b478, const wchar_t * file=0x0066b3f8, unsigned int line=779) Line 24 C++
TinyCad.exe!std::vector<CDocUndoSet,std::allocator<CDocUndoSet> >::operator Line 779 + 0x14 bytes C++
TinyCad.exe!CTinyCadDoc::AddUndoAction(CDocUndoSet::action action=Addition, CDrawingObject * index_object=0x06b50a38) Line 816 + 0x18 bytes C++
TinyCad.exe!CTinyCadDoc::MarkAdditionForUndo(CDrawingObject * pObject=0x06b50a38) Line 835 C++
TinyCad.exe!CTinyCadDoc::Add(CDrawingObject * NewObject=0x06b50a38) Line 512 C++
TinyCad.exe!CTinyCadSymbolDoc::SelectSymbol(CLibraryStoreSymbol * theSymbol=0x06b3e340) Line 132 C++
TinyCad.exe!CTinyCadView::OnSelectGet() Line 178 + 0x1e bytes C++
TinyCad.exe!_AfxDispatchCmdMsg(CCmdTarget * pTarget=0x06b4e850, unsigned int nID=1029, int nCode=0, void (void)* pfn=0x004973c0, void * pExtra=0x00000000, unsigned int nSig=57, AFX_CMDHANDLERINFO * pHandlerInfo=0x00000000) Line 82 C++
TinyCad.exe!CCmdTarget::OnCmdMsg(unsigned int nID=1029, int nCode=0, void * pExtra=0x00000000, AFX_CMDHANDLERINFO * pHandlerInfo=0x00000000) Line 381 + 0x27 bytes C++
TinyCad.exe!CView::OnCmdMsg(unsigned int nID=1029, int nCode=0, void * pExtra=0x00000000, AFX_CMDHANDLERINFO * pHandlerInfo=0x00000000) Line 162 + 0x18 bytes C++
TinyCad.exe!CFrameWnd::OnCmdMsg(unsigned int nID=1029, int nCode=0, void * pExtra=0x00000000, AFX_CMDHANDLERINFO * pHandlerInfo=0x00000000) Line 942 + 0x23 bytes C++
TinyCad.exe!CWnd::OnCommand(unsigned int wParam=1029, long lParam=1510214) Line 2364 C++
TinyCad.exe!CFrameWnd::OnCommand(unsigned int wParam=1029, long lParam=1510214) Line 366 C++
TinyCad.exe!CWnd::OnWndMsg(unsigned int message=273, unsigned int wParam=1029, long lParam=1510214, long * pResult=0x0012f474) Line 1769 + 0x1e bytes C++
TinyCad.exe!CWnd::WindowProc(unsigned int message=273, unsigned int wParam=1029, long lParam=1510214) Line 1755 + 0x20 bytes C++
TinyCad.exe!AfxCallWndProc(CWnd * pWnd=0x06b49cd8, HWND * hWnd=0x001b0c52, unsigned int nMsg=273, unsigned int wParam=1029, long lParam=1510214) Line 240 + 0x1c bytes C++
TinyCad.exe!CMDIFrameWnd::OnCommand(unsigned int wParam=1029, long lParam=1510214) Line 48 + 0x23 bytes C++
TinyCad.exe!CWnd::OnWndMsg(unsigned int message=273, unsigned int wParam=1029, long lParam=1510214, long * pResult=0x0012f688) Line 1769 + 0x1e bytes C++
TinyCad.exe!CWnd::WindowProc(unsigned int message=273, unsigned int wParam=1029, long lParam=1510214) Line 1755 + 0x20 bytes C++
TinyCad.exe!AfxCallWndProc(CWnd * pWnd=0x06b41cf8, HWND
* hWnd=0x00180b70, unsigned int nMsg=273, unsigned int wParam=1029, long lParam=1510214) Line 240 + 0x1c bytes C++
TinyCad.exe!AfxWndProc(HWND * hWnd=0x00180b70, unsigned int nMsg=273, unsigned int wParam=1029, long lParam=1510214) Line 403 C++
user32.dll!_InternalCallWinProc@20() + 0x28 bytes
user32.dll!_UserCallWinProcCheckWow@32() + 0xb7 bytes
user32.dll!_SendMessageWorker@20() + 0xc8 bytes
user32.dll!_SendMessageW@16() + 0x49 bytes
TinyCad.exe!CWnd::SendMessageW(unsigned int message=273, unsigned int wParam=1029, long lParam=1510214) Line 42 + 0x44 bytes C++
TinyCad.exe!CControlBar::WindowProc(unsigned int nMsg=273, unsigned int wParam=1029, long lParam=1510214) Line 473 + 0x1b bytes C++
TinyCad.exe!AfxCallWndProc(CWnd * pWnd=0x06b4234c, HWND
* hWnd=0x00240b92, unsigned int nMsg=273, unsigned int wParam=1029, long lParam=1510214) Line 240 + 0x1c bytes C++
TinyCad.exe!AfxWndProc(HWND * hWnd=0x00240b92, unsigned int nMsg=273, unsigned int wParam=1029, long lParam=1510214) Line 403 C++
user32.dll!_InternalCallWinProc@20() + 0x28 bytes
user32.dll!_UserCallWinProcCheckWow@32() + 0xb7 bytes
user32.dll!_SendMessageWorker@20() + 0xc8 bytes
user32.dll!_SendMessageW@16() + 0x49 bytes
comctl32.dll!_Button_NotifyParent@8() + 0x3d bytes
comctl32.dll!_Button_ReleaseCapture@8() + 0xd7 bytes
comctl32.dll!_Button_WndProc@16() + 0x887 bytes
user32.dll!_InternalCallWinProc@20() + 0x28 bytes
user32.dll!_UserCallWinProcCheckWow@32() + 0xb7 bytes
user32.dll!_CallWindowProcAorW@24() + 0x51 bytes
user32.dll!_CallWindowProcW@20() + 0x1b bytes
TinyCad.exe!CWnd::DefWindowProcW(unsigned int nMsg=514, unsigned int wParam=0, long lParam=2621557) Line 1043 + 0x20 bytes C++
TinyCad.exe!CWnd::WindowProc(unsigned int message=514, unsigned int wParam=0, long lParam=2621557) Line 1756 + 0x1c bytes C++
TinyCad.exe!AfxCallWndProc(CWnd * pWnd=0x06b42594, HWND
* hWnd=0x00170b46, unsigned int nMsg=514, unsigned int wParam=0, long lParam=2621557) Line 240 + 0x1c bytes C++
TinyCad.exe!AfxWndProc(HWND * hWnd=0x00170b46, unsigned int nMsg=514, unsigned int wParam=0, long lParam=2621557) Line 403 C++
user32.dll!_InternalCallWinProc@20() + 0x28 bytes
user32.dll!_UserCallWinProcCheckWow@32() + 0xb7 bytes
user32.dll!_DispatchMessageWorker@8() + 0xdc bytes
user32.dll!_DispatchMessageW@4() + 0xf bytes
user32.dll!_IsDialogMessageW@8() + 0xdb bytes
TinyCad.exe!CWnd::IsDialogMessageW(tagMSG * lpMsg=0x001762e8) Line 198 C++
TinyCad.exe!CWnd::PreTranslateInput(tagMSG * lpMsg=0x001762e8) Line 4332 C++
TinyCad.exe!CControlBar::PreTranslateMessage(tagMSG * pMsg=0x001762e8) Line 445 + 0xc bytes C++
TinyCad.exe!CWnd::WalkPreTranslateTree(HWND
* hWndStop=0x00180b70, tagMSG * pMsg=0x001762e8) Line 2946 + 0x14 bytes C++
TinyCad.exe!AfxInternalPreTranslateMessage(tagMSG * pMsg=0x001762e8) Line 233 + 0x12 bytes C++
TinyCad.exe!CWinThread::PreTranslateMessage(tagMSG * pMsg=0x001762e8) Line 777 + 0x9 bytes C++
TinyCad.exe!AfxPreTranslateMessage(tagMSG * pMsg=0x001762e8) Line 252 + 0x11 bytes C++
TinyCad.exe!AfxInternalPumpMessage() Line 178 + 0x18 bytes C++
TinyCad.exe!CWinThread::PumpMessage() Line 900 C++
TinyCad.exe!CWinThread::Run() Line 629 + 0xd bytes C++
TinyCad.exe!CWinApp::Run() Line 865 C++
TinyCad.exe!AfxWinMain(HINSTANCE * hInstance=0x00400000, HINSTANCE * hPrevInstance=0x00000000, wchar_t * lpCmdLine=0x00020d16, int nCmdShow=1) Line 47 + 0xd bytes C++
TinyCad.exe!wWinMain(HINSTANCE * hInstance=0x00400000, HINSTANCE * hPrevInstance=0x00000000, wchar_t * lpCmdLine=0x00020d16, int nCmdShow=1) Line 34 C++
TinyCad.exe!__tmainCRTStartup() Line 263 + 0x2c bytes C
TinyCad.exe!wWinMainCRTStartup() Line 182 C
kernel32.dll!_BaseProcessStart@4() + 0x23 bytes

Discussion

  • Henryk Birecki
    Henryk Birecki
    2009-02-22

    I forgot to add: This applies to 2.70 alpha release

     
  • Don Lucas
    Don Lucas
    2009-02-22

    Thanks for submitting this bug. I will attempt to reproduce it in the next few weeks and keep you posted with regard to developing a fix for it.

    Thanks,

    Don Lucas

     
  • Don Lucas
    Don Lucas
    2009-02-22

    Hi Henryk -

    I am a little confused about your comment that you "downloaded the source (tarball)". The 2.70.00 alpha release TinyCAD source is only provided from the SVN repository which does not provide any sources in tarball format. Perhaps you downloaded from the CVS repository? If so, this is the 2.60.01 source or even older. The CVS repository is obsolete and should not be used.

    Please clarify which version of TinyCAD that you are running this test on, and whether you compiled and ran from the debug directory, or if you actually created an installer and installed the version that you compiled to run this test.

    Thanks,

    Don Lucas

     
  • Henryk Birecki
    Henryk Birecki
    2009-02-23

    Don,

    It is 2.70.0 build 174 If you go to SVN link http://tinycad.svn.sourceforge.net/viewvc/tinycad/ you can download GNU tar ball from that page. I have Tortoise SVN on my PC, but I could never get it working with Sourceforge (not that I really know what I'm doing with that program).

    I am running Debug version under Visual Studio 2008 (F5). No installers involved. I do have version 2.60 installed on the same PC and I did not want to remove it as it is stable. I did not think that there would be any adverse interactions, and there do not seem to be.

    Regards,
    Henryk

     
  • Don Lucas
    Don Lucas
    2009-02-23

    Hi Henryk -

    I have reproduced this bug with the same results. I am assigning this bug to Mark Langezaal who is the most familiar with this section of the code. I think that this problem is occurring because the method that are using to cause it, while apparently a valid method, was unknown to me and probably to Mark as well. It is actually a very nice feature that I wasn't aware that we were supporting. Mark has worked on several areas of the code fixing similar bugs in the undo/redo logic and I'm sure that once he understands how this feature can be used, it will be easy to fix. I was actually thinking about the best way to "start from" an existing symbol in a different (or the same) symbol library as a new feature addition, so it is great that you have brought the fact that this feature already exists to our attention.

    Thanks for going the extra mile in helping to document and pinpoint this problem. I am very glad that our hard work on making this program supportable from 3 different versions of the Microsoft C++ compiler system is making it much easier for so inclined users to help us. Did you have any problems setting up and compiling the source? Did you read the How to Compile TinyCAD document, or was that unnecessary? Anything that we should add to the document to make this process easier?

    Again, thanks for your help.

    Don Lucas

     
  • Don Lucas
    Don Lucas
    2009-02-23

    Thanks for submitting this bug report. I have been able to reproduce this bug following the instructions that you provided. I will attempt to fix this bug for the next release.

    Best regards,

    Don Lucas

     
  • Henryk Birecki
    Henryk Birecki
    2009-02-26

    Hi Don,

    I'm glad to help. I use TinyCAD occasionally to document my schematics. Not for much more. Maybe in the future....

    I had no problems. I did not actually run the setup program to install the 2.70 version. I felt that as long as I have the 2.60 running OK, I'll wait for stable release. All I did was to unzip the tarball, "flip" through folders and decide that it is the trunk branch I am interested in. Found a VS2008 project and opened it. The only "problem" I had running the debug version was that a couple of dll libraries were not installed. I just found them and put in C:\Windows\System32. I'm afraid I did not read any documents. That is reserved for "up a creek without a paddle" situations :).

    One of the reasons that I am interested in 2.70 is that occasionally 2.60 has problems with the "Tools" window. I'd select a resistor, or chip..., but Tool window shows stuff for connectiong wires. Actually I think the problem is in updating window as if one knows where to click, the needed edit windows do show up eventually, but it is still better to close TinyCAD and re-start it. This does not happen regularly and I do not see any reproducible pattern that I could report.

    Cheers,
    Henryk

     
  • Don Lucas
    Don Lucas
    2009-02-27

    Henryk -

    When compiling and running Tinycad from within Visual Studio, copy the dll's to the Release or Debug sub-directory (whichever is appropriate). It is best not to copy them into the c:\Windows\System32 directory because there is no installer or uninstaller set up to clear them out later, especially if newer ones are released. Once you have copied the dll's into the Release or Debug sub-directory, they will stay there until you perform a Build Clean step. The Clean target will delete the contents of both directories and you will have to copy them in again.

    Also, you noticed correctly that you only need to download the trunk. The branches are where we work on changes prior to integrating them into the trunk and the tags are similar to branches except that they are used only to mark specific revision levels of the source used to create various released (or possibly unreleased on occasion) builds.

    If you want to check out the trunk from TortoiseSVN, the repository path is located at https://tinycad.svn.sourceforge.net/svnroot/tinycad/TinyCAD/trunk. It is easiest to simply use the Repo Browser (part of Tortoise and similar to Windows Explorer) to locate the trunk. Right click on the trunk and select the choice to "Check Out". This will create a working copy (WC) on your local hard disk at the place in the file system that you navigate to. I was not aware that the source forge web SVN client supported a "Get Tarball" feature, but this is essentially the same as exporting a copy of the source, rather than checking it out. If all you want is a snapshot, your method is perfectly acceptable (and very easy to use).

    Best regards,

    Don Lucas

     
  • Henryk Birecki
    Henryk Birecki
    2009-02-27

    Thanks Don,

    Yes, copying dlls to executable folder is usually preferred. However, putting them in system folder is my preferred way to dealing with dlls for debugging purposes. I delete the Debug and Release folders far too often to have the dlls there.

    Thanks for the pointer on the url for the SVN. Now I know why it did not work. In cases that I was succesful with TortoiseSVN I used svn: rather than https:. Sourceforge does not seem to like this. That is too bad, as using svn: lets me do that straight from Internet Explorer Favorites link, rather than fumbling around in File Explorer context menu to open Repo Browser.

    Cheers,
    Henryk

     
  • Don Lucas
    Don Lucas
    2009-03-02

    Thanks for reporting this bug. It has successfully been fixed in the latest source code present in the SVN repository. It will be released as a downloadable file in the next release, currently expected to be made Q1 2009.

    Best regards,

    Don Lucas