Bug 86237 - Crash when changing code generator to C++
Summary: Crash when changing code generator to C++
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: HI crash
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-29 15:20 UTC by Sebastian Stein
Modified: 2004-08-26 22:58 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Stein 2004-07-29 15:20:32 UTC
Version:           1.3.0 (using KDE 3.2.3, compiled sources)
Compiler:          gcc version 3.3.3
OS:                Linux (i686) release 2.4.26

1. Load Umbrello, C++ must be already selected
2. Select an old style code generator like PHP 
3. Click in the toolbar on new document
4. Change active language to C++
-> Crash

Maybe this is also the reason for bug 77645. But if I delete all datatypes
after step 1, it doesn't crash.


backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x40eab96b in QString::QString () from /usr/lib/qt/lib/libqt-mt.so.3
(gdb) bt
#0  0x40eab96b in QString::QString () from /usr/lib/qt/lib/libqt-mt.so.3
#1  0x08180a17 in UMLObject::getName (this=0x84c2240) at umlobject.cpp:82
#2  0x0825a46c in CPPSourceCodeDocument::syncNamesToParent (this=0x84ca738)
    at cppsourcecodedocument.cpp:73
#3  0x0810388b in ClassifierCodeDocument::synchronize (this=0x84ca738)
    at classifiercodedocument.cpp:393
#4  0x0825791c in CPPCodeGenerator::syncCodeToDocument (this=0x84c8d28)
    at cppcodegenerator.cpp:219
#5  0x0825846c in CPPCodeGenerator::qt_invoke (this=0x84c8d28, _id=7,
    _o=0xbfffe6b0) at cppcodegenerator.moc:94
#6  0x40be3eac in QObject::activate_signal ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#7  0x40be3ce4 in QObject::activate_signal ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#8  0x08114c1b in CodeGenerationPolicy::modifiedCodeContent (this=0x84c8858)
    at qmetaobject.h:261
#9  0x0826f629 in CPPCodeGenerationPolicy::setDefaults (this=0x84c8858,
    clone=0x0, emitUpdateSignal=true) at cppcodegenerationpolicy.cpp:376
#10 0x0815addd in UMLApp::setGenerator (this=0x83e17c0, gen=0x84c8d28,
    giveWarning=102) at uml.cpp:1120
#11 0x0815b380 in UMLApp::setActiveLanguage (this=0x83e17c0, id=-80)
    at uml.cpp:1213
Comment 1 Sebastian Stein 2004-07-29 15:21:21 UTC
I mark all bugs as high, which we should try to fix prior KDE 3.3.
Comment 2 Oliver Kellogg 2004-07-29 22:24:13 UTC
On Thu, 2004-07-29 at 15:21, Sebastian Stein wrote:
> [...]
>            Priority|NOR                         |HI
>
> ------- Additional Comments From seb_stein gmx de  2004-07-29 15:21 -------
> I mark all bugs as high, which we should try to fix prior KDE 3.3.
> 

Lieber Sebastian,

Ich werde froh sein wenn ich 71969 noch rechtzeitig eintuete
und sehe kaum eine Chance dass ich diese weiteren HI-prio bugs
bis 1.3 fixe...

Das nur am Rande.
Sieht man sich in Ludwigsburg?

Viele Gruesse,

Oliver


Comment 3 Tobias Koenig 2004-08-11 15:44:22 UTC
I got a different backtrace for the same steps... here it seems the codegenerator is a null pointer again
in CPPSourceCodeDocument::updateContent(), so
  gen->findObjectsRelated()
causes the crash.

Again, a simple fix would be to test for 'null' here, but I think you have a general problem with not available code generators...

Ciao,
Tobias
Comment 4 Jonathan Riddell 2004-08-24 13:37:51 UTC
This seems to be fixed in HEAD but not in KDE 3.3 branch.  Anyone know what fixed it and therefor what should be backported?
Comment 5 Sebastian Stein 2004-08-26 16:31:28 UTC
Jonathan Riddell <jr@jriddell.org> [040825 19:39]:
> This seems to be fixed in HEAD but not in KDE 3.3 branch.  Anyone know
> what fixed it and therefor what should be backported?

I can't reproduce it either, but I don't know how it was fixed. I think we
shouldn't close the report till it is fixed in 3.3 as well.

Sebastian
Comment 6 Oliver Kellogg 2004-08-26 20:55:20 UTC
I believe this to be fixed now on KDE_3_3_BRANCH,
could you check? Thanks.
Comment 7 Sebastian Stein 2004-08-26 22:58:16 UTC
Oliver Kellogg <okellogg@users.sourceforge.net> [040826 22:27]:
> I believe this to be fixed now on KDE_3_3_BRANCH,
> could you check? Thanks.

Yes, it works. Nevertheless, I think it creates memory leaks. For 3.3 this
is ok, for 3.4 I hope we could start fixing this leaks.

Sebastian