From: Matt K. <ra...@ch...> - 2004-03-29 03:48:16
|
All, I've been looking into why JAZZ dumps core when you exit. I think I may be onto something. It appears to be dumping core during the destruction of a global wxString located within the wxGTK library itself. Not sure if it's a wxGTK bug, a wxWindows bug, or if it's something we're causing, but it smells like it might be a wxGTK bug. My question to the group: how many of you see this behavior? I'm asking because I see the same behavior with Audacity. My copy of Audacity came bundled with my SuSE installation. This seems to reinforce my beliefs. Also, interestingly, I grabbed the latest wxGTK source, and compiled it in debug mode, and installed it. I made Jazz use it for its compiling. Guess what, same thing on exit!!! I just want to see if other distros see this same behavior. Thanks, Matt |
From: Patrick E. <pa...@pa...> - 2004-03-29 06:24:18
|
On Sunday 28 March 2004 23:45, Matt Kelly wrote: > My question to the group: how many of you see this behavior? > I'm asking because I see the same behavior with Audacity. > My copy of Audacity came bundled with my SuSE installation. > This seems to reinforce my beliefs. I see the same crash on exit. It's been around for as long as I remember. I'm using Debian with the 2.4.2 GTK libraries. Patrick |
From: joakim v. <jo...@ve...> - 2004-03-29 07:31:09
|
As Patrick wrote, It's been there as long as I can remember. It has always annoyed me so it would be great if you could eliminate it. Cheers, /Joakim Matt Kelly wrote: > All, > > I've been looking into why JAZZ dumps core when you exit. > I think I may be onto something. It appears to be dumping > core during the destruction of a global wxString located > within the wxGTK library itself. Not sure if it's a wxGTK > bug, a wxWindows bug, or if it's something we're causing, > but it smells like it might be a wxGTK bug. > > My question to the group: how many of you see this behavior? > I'm asking because I see the same behavior with Audacity. > My copy of Audacity came bundled with my SuSE installation. > This seems to reinforce my beliefs. > > Also, interestingly, I grabbed the latest wxGTK source, and > compiled it in debug mode, and installed it. I made Jazz > use it for its compiling. Guess what, same thing on exit!!! > > I just want to see if other distros see this same behavior. > > Thanks, > > Matt > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > jazzplusplus-devel mailing list > jaz...@li... > https://lists.sourceforge.net/lists/listinfo/jazzplusplus-devel |
From: Matt K. <ra...@ch...> - 2004-03-29 19:31:18
|
OK, I've found the problem. It's a wxGTK bug, in the wxString class. The default constructor initializes a pointer data member (the member that holds the actual storage) to NULL. The destructor blindly dereferences this pointer. If the string never gets set to anything, it dereferences a NULL pointer minus an index, making for a truly horrible pointer value. Unfortunately, the wxGTK library has a few global wxString variables which normally don't get used. Thus, they contain these NULL pointers and seg fault on exit when their destructors get called globally. There is a very simple fix, but sadly, the bug is within wxGTK. If anyone is interested, I'll post the fix. I'll also contact the wxWindows team and notify them. Matt > > As Patrick wrote, It's been there as long as I can remember. > > It has always annoyed me so it would be great if you could eliminate it. > > Cheers, > /Joakim > > Matt Kelly wrote: > > > All, > > > > I've been looking into why JAZZ dumps core when you exit. > > I think I may be onto something. It appears to be dumping > > core during the destruction of a global wxString located > > within the wxGTK library itself. Not sure if it's a wxGTK > > bug, a wxWindows bug, or if it's something we're causing, > > but it smells like it might be a wxGTK bug. > > > > My question to the group: how many of you see this behavior? > > I'm asking because I see the same behavior with Audacity. > > My copy of Audacity came bundled with my SuSE installation. > > This seems to reinforce my beliefs. > > > > Also, interestingly, I grabbed the latest wxGTK source, and > > compiled it in debug mode, and installed it. I made Jazz > > use it for its compiling. Guess what, same thing on exit!!! > > > > I just want to see if other distros see this same behavior. > > > > Thanks, > > > > Matt |
From: joakim v. <jo...@ve...> - 2004-03-29 19:57:35
|
Hope your fix makes it into the core wxGTK distribution. Have you checked if the bug is still in the wxGTK 2.5 beta? Cheers, /Joakim Matt Kelly wrote: >OK, I've found the problem. It's a wxGTK bug, in the wxString >class. > >The default constructor initializes a pointer data member (the member that >holds the actual storage) to NULL. The destructor blindly >dereferences this pointer. If the string never gets set to anything, >it dereferences a NULL pointer minus an index, making for a truly >horrible pointer value. > >Unfortunately, the wxGTK library has a few global wxString variables >which normally don't get used. Thus, they contain these NULL pointers >and seg fault on exit when their destructors get called globally. > >There is a very simple fix, but sadly, the bug is within wxGTK. >If anyone is interested, I'll post the fix. I'll also contact >the wxWindows team and notify them. > >Matt > > > >>As Patrick wrote, It's been there as long as I can remember. >> >>It has always annoyed me so it would be great if you could eliminate it. >> >>Cheers, >>/Joakim >> >>Matt Kelly wrote: >> >> >> >>>All, >>> >>>I've been looking into why JAZZ dumps core when you exit. >>>I think I may be onto something. It appears to be dumping >>>core during the destruction of a global wxString located >>>within the wxGTK library itself. Not sure if it's a wxGTK >>>bug, a wxWindows bug, or if it's something we're causing, >>>but it smells like it might be a wxGTK bug. >>> >>>My question to the group: how many of you see this behavior? >>>I'm asking because I see the same behavior with Audacity. >>>My copy of Audacity came bundled with my SuSE installation. >>>This seems to reinforce my beliefs. >>> >>>Also, interestingly, I grabbed the latest wxGTK source, and >>>compiled it in debug mode, and installed it. I made Jazz >>>use it for its compiling. Guess what, same thing on exit!!! >>> >>>I just want to see if other distros see this same behavior. >>> >>>Thanks, >>> >>>Matt >>> >>> > > >------------------------------------------------------- >This SF.Net email is sponsored by: IBM Linux Tutorials >Free Linux tutorial presented by Daniel Robbins, President and CEO of >GenToo technologies. Learn everything from fundamentals to system >administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click >_______________________________________________ >jazzplusplus-devel mailing list >jaz...@li... >https://lists.sourceforge.net/lists/listinfo/jazzplusplus-devel > > |
From: Matt K. <ra...@ch...> - 2004-03-29 20:44:19
|
> > Hope your fix makes it into the core wxGTK distribution. > > Have you checked if the bug is still in the wxGTK 2.5 beta? Nope, but I will check. I checked wxWindows' bug list for wxString bugs, but did not see this one, so I'm not too hopeful. Matt > > Cheers, > /Joakim > > Matt Kelly wrote: > > >OK, I've found the problem. It's a wxGTK bug, in the wxString > >class. > > > >The default constructor initializes a pointer data member (the member that > >holds the actual storage) to NULL. The destructor blindly > >dereferences this pointer. If the string never gets set to anything, > >it dereferences a NULL pointer minus an index, making for a truly > >horrible pointer value. > > > >Unfortunately, the wxGTK library has a few global wxString variables > >which normally don't get used. Thus, they contain these NULL pointers > >and seg fault on exit when their destructors get called globally. > > > >There is a very simple fix, but sadly, the bug is within wxGTK. > >If anyone is interested, I'll post the fix. I'll also contact > >the wxWindows team and notify them. > > > >Matt > > > > > > > >>As Patrick wrote, It's been there as long as I can remember. > >> > >>It has always annoyed me so it would be great if you could eliminate it. > >> > >>Cheers, > >>/Joakim > >> > >>Matt Kelly wrote: > >> > >> > >> > >>>All, > >>> > >>>I've been looking into why JAZZ dumps core when you exit. > >>>I think I may be onto something. It appears to be dumping > >>>core during the destruction of a global wxString located > >>>within the wxGTK library itself. Not sure if it's a wxGTK > >>>bug, a wxWindows bug, or if it's something we're causing, > >>>but it smells like it might be a wxGTK bug. > >>> > >>>My question to the group: how many of you see this behavior? > >>>I'm asking because I see the same behavior with Audacity. > >>>My copy of Audacity came bundled with my SuSE installation. > >>>This seems to reinforce my beliefs. > >>> > >>>Also, interestingly, I grabbed the latest wxGTK source, and > >>>compiled it in debug mode, and installed it. I made Jazz > >>>use it for its compiling. Guess what, same thing on exit!!! > >>> > >>>I just want to see if other distros see this same behavior. > >>> > >>>Thanks, > >>> > >>>Matt > >>> > >>> > > > > > >------------------------------------------------------- > >This SF.Net email is sponsored by: IBM Linux Tutorials > >Free Linux tutorial presented by Daniel Robbins, President and CEO of > >GenToo technologies. Learn everything from fundamentals to system > >administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > >_______________________________________________ > >jazzplusplus-devel mailing list > >jaz...@li... > >https://lists.sourceforge.net/lists/listinfo/jazzplusplus-devel > > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > jazzplusplus-devel mailing list > jaz...@li... > https://lists.sourceforge.net/lists/listinfo/jazzplusplus-devel > |
From: Matt K. <ra...@ch...> - 2004-03-29 21:15:03
|
> > > > > Hope your fix makes it into the core wxGTK distribution. > > > > Have you checked if the bug is still in the wxGTK 2.5 beta? > > Nope, but I will check. I checked wxWindows' bug list for wxString > bugs, but did not see this one, so I'm not too hopeful. Well, I checked. The bug is still there in 2.5 beta. I did submit a bug and patch, so hopefully it will be fixed soon. Matt |
From: Patrick E. <pa...@pa...> - 2004-03-29 21:24:58
|
Can we work around it by setting the global variables to something? A well commented line could be left in jazz.cpp for when the problem goes away. Patrick On Monday 29 March 2004 14:00, Matt Kelly wrote: > > Hope your fix makes it into the core wxGTK distribution. > > > > Have you checked if the bug is still in the wxGTK 2.5 beta? > > Nope, but I will check. I checked wxWindows' bug list for wxString > bugs, but did not see this one, so I'm not too hopeful. > > Matt > > > Cheers, > > /Joakim > > > > Matt Kelly wrote: > > >OK, I've found the problem. It's a wxGTK bug, in the wxString > > >class. > > > > > >The default constructor initializes a pointer data member (the > > > member that holds the actual storage) to NULL. The destructor > > > blindly dereferences this pointer. If the string never gets > > > set to anything, it dereferences a NULL pointer minus an index, > > > making for a truly horrible pointer value. > > > > > >Unfortunately, the wxGTK library has a few global wxString > > > variables which normally don't get used. Thus, they contain > > > these NULL pointers and seg fault on exit when their > > > destructors get called globally. > > > > > >There is a very simple fix, but sadly, the bug is within wxGTK. > > >If anyone is interested, I'll post the fix. I'll also contact > > >the wxWindows team and notify them. > > > > > >Matt > > > > > >>As Patrick wrote, It's been there as long as I can remember. > > >> > > >>It has always annoyed me so it would be great if you could > > >> eliminate it. > > >> > > >>Cheers, > > >>/Joakim > > >> > > >>Matt Kelly wrote: > > >>>All, > > >>> > > >>>I've been looking into why JAZZ dumps core when you exit. > > >>>I think I may be onto something. It appears to be dumping > > >>>core during the destruction of a global wxString located > > >>>within the wxGTK library itself. Not sure if it's a wxGTK > > >>>bug, a wxWindows bug, or if it's something we're causing, > > >>>but it smells like it might be a wxGTK bug. > > >>> > > >>>My question to the group: how many of you see this behavior? > > >>>I'm asking because I see the same behavior with Audacity. > > >>>My copy of Audacity came bundled with my SuSE installation. > > >>>This seems to reinforce my beliefs. > > >>> > > >>>Also, interestingly, I grabbed the latest wxGTK source, and > > >>>compiled it in debug mode, and installed it. I made Jazz > > >>>use it for its compiling. Guess what, same thing on exit!!! > > >>> > > >>>I just want to see if other distros see this same behavior. > > >>> > > >>>Thanks, > > >>> > > >>>Matt > > > > > >------------------------------------------------------- > > >This SF.Net email is sponsored by: IBM Linux Tutorials > > >Free Linux tutorial presented by Daniel Robbins, President and > > > CEO of GenToo technologies. Learn everything from fundamentals > > > to system > > > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op > > >=click _______________________________________________ > > >jazzplusplus-devel mailing list > > >jaz...@li... > > >https://lists.sourceforge.net/lists/listinfo/jazzplusplus-devel > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials > > Free Linux tutorial presented by Daniel Robbins, President and > > CEO of GenToo technologies. Learn everything from fundamentals to > > system > > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=c > >lick _______________________________________________ > > jazzplusplus-devel mailing list > > jaz...@li... > > https://lists.sourceforge.net/lists/listinfo/jazzplusplus-devel > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO > of GenToo technologies. Learn everything from fundamentals to > system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=cli >ck _______________________________________________ > jazzplusplus-devel mailing list > jaz...@li... > https://lists.sourceforge.net/lists/listinfo/jazzplusplus-devel |
From: Matt K. <ra...@ch...> - 2004-03-29 22:21:27
|
> > Can we work around it by setting the global variables to something? A > well commented line could be left in jazz.cpp for when the problem > goes away. > > Patrick > I thought about that, but I'd worry about what version of wxGTK any given user is using. There is no guarantee that their version will have the same set of global wxString variables. If the user were compiling JAZZ, that's one thing (although if it didn't work, they would have a hard time figuring out the mismatch), but if the user installs JAZZ from RPM's, there's no way to fix a mismatch. A possibly safer approach would be to instantiate an instance of each wxGTK class that uses global wxStrings. This might be a little safer, but still no guarantees against mismatches. Not sure how to crack this nut. We may either have to do something like this, or just tell the users that it's gonna segfault on exit and explain that it's not our fault. Matt |
From: Dave F. <dav...@co...> - 2004-03-30 10:54:57
|
Matt, I forwarded this email to Audacity-devel because it's affecting them, too. Would you be able to point to a file, line, or possible a viewcvs link to the broken code? Or just tell me where to look and I'll dig it up. :) I don't think cross-posting will work here, unless you guys are all members of the audacity-devel list (which would make cross-pointing almost pointless anyway), because I think it's a subscriber-only list now. Thanks, Dave On Monday 29 March 2004 07:47 pm, Matt Kelly wrote: > OK, I've found the problem. It's a wxGTK bug, in the wxString > class. > > The default constructor initializes a pointer data member (the member that > holds the actual storage) to NULL. The destructor blindly > dereferences this pointer. If the string never gets set to anything, > it dereferences a NULL pointer minus an index, making for a truly > horrible pointer value. > > Unfortunately, the wxGTK library has a few global wxString variables > which normally don't get used. Thus, they contain these NULL pointers > and seg fault on exit when their destructors get called globally. > > There is a very simple fix, but sadly, the bug is within wxGTK. > If anyone is interested, I'll post the fix. I'll also contact > the wxWindows team and notify them. > > Matt > > > As Patrick wrote, It's been there as long as I can remember. > > > > It has always annoyed me so it would be great if you could eliminate it. > > > > Cheers, > > /Joakim > > > > Matt Kelly wrote: > > > All, > > > > > > I've been looking into why JAZZ dumps core when you exit. > > > I think I may be onto something. It appears to be dumping > > > core during the destruction of a global wxString located > > > within the wxGTK library itself. Not sure if it's a wxGTK > > > bug, a wxWindows bug, or if it's something we're causing, > > > but it smells like it might be a wxGTK bug. > > > > > > My question to the group: how many of you see this behavior? > > > I'm asking because I see the same behavior with Audacity. > > > My copy of Audacity came bundled with my SuSE installation. > > > This seems to reinforce my beliefs. > > > > > > Also, interestingly, I grabbed the latest wxGTK source, and > > > compiled it in debug mode, and installed it. I made Jazz > > > use it for its compiling. Guess what, same thing on exit!!! > > > > > > I just want to see if other distros see this same behavior. > > > > > > Thanks, > > > > > > Matt > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > jazzplusplus-devel mailing list > jaz...@li... > https://lists.sourceforge.net/lists/listinfo/jazzplusplus-devel -- Visit my website! http://www.davefancella.com/?event=em Blow it out your ear. |
From: Matt K. <ra...@ch...> - 2004-03-30 20:33:12
|
Dave, The actual bug, as it turns out, is with the compiler!!! I'm using gcc/g++ 3.3, which apparently has a problem with global class object constructors. What is happening is that wxGTK has some global native data type variables that get initialized to a specific value; it also has global class objects, the most problematic being wxString class objects. The problem is that the compiler generates code that causes the global class objects to get constructed before at least some of the native data type global variables get initialized. The wxString class uses an initialized global variable in its constructor. But sadly, the global var is not yet initialized, and is NULL at the time the global wxString objects' constructors are called. Since the global wxString objects never get set to anything during JAZZ/Audacity operation, this NULL value within the global wxString objects causes the crash on exit/destruction. The fixable code is in the wxString destructor, which is in <top source dir>/include/wx/string.h for versions 2.4.x and below, and in the wxStringBase destructor, same file, in 2.5.x. This destructor is a one liner. Here's the quick fix, shown for version 2.4.2. The 2.5.x fix is the same, but is in the ever-so-slightly-different wxStringBase destructor: IS: ... ~wxString() { GetStringData()->Unlock(); } ... CHANGE TO: ~wxString() { if (m_pchData) GetStringData()->Unlock(); } Of course, the "more correct" fix is to change compilers. Ack. Dave -- if you wouldn't mind, could you post this to Audacity-devel? I'm not a member of that group. The responder on the wxWidget team didn't seem too thrilled about making this fix -- he said to change compilers. Maybe having more "pressure" to apply this "fix" will change their minds. Matt > > Matt, > > I forwarded this email to Audacity-devel because it's affecting them, too. > Would you be able to point to a file, line, or possible a viewcvs link to the > broken code? Or just tell me where to look and I'll dig it up. :) > > I don't think cross-posting will work here, unless you guys are all members of > the audacity-devel list (which would make cross-pointing almost pointless > anyway), because I think it's a subscriber-only list now. > > Thanks, > > Dave > > On Monday 29 March 2004 07:47 pm, Matt Kelly wrote: > > OK, I've found the problem. It's a wxGTK bug, in the wxString > > class. > > > > The default constructor initializes a pointer data member (the member that > > holds the actual storage) to NULL. The destructor blindly > > dereferences this pointer. If the string never gets set to anything, > > it dereferences a NULL pointer minus an index, making for a truly > > horrible pointer value. > > |
From: Dave F. <dav...@co...> - 2004-03-31 00:56:03
|
On Tuesday 30 March 2004 08:49 pm, Matt Kelly wrote: > Dave -- if you wouldn't mind, could you post this to Audacity-devel? I'm > not a member of that group. The responder on the wxWidget team didn't > seem too thrilled about making this fix -- he said to change compilers. > Maybe having more "pressure" to apply this "fix" will change their minds. Done. :) Odd that they'd go to all this effort to support so many compilers and then tell you to switch compilers... Just out of curiosity, Matt, what distribution are you using? I noticed sometime ago that I wasn't the only Mandrake drone around here, and previously I had attributed this bug in Audacity to be more or less caused by something Mandrake did, and figured it would go away if I ignored it. (And since it didn't result in the loss of any data, it was only a minor inconvenience) Dave > Matt > > > Matt, > > > > I forwarded this email to Audacity-devel because it's affecting them, > > too. Would you be able to point to a file, line, or possible a viewcvs > > link to the broken code? Or just tell me where to look and I'll dig it > > up. :) > > > > I don't think cross-posting will work here, unless you guys are all > > members of the audacity-devel list (which would make cross-pointing > > almost pointless anyway), because I think it's a subscriber-only list > > now. > > > > Thanks, > > > > Dave > > > > On Monday 29 March 2004 07:47 pm, Matt Kelly wrote: > > > OK, I've found the problem. It's a wxGTK bug, in the wxString > > > class. > > > > > > The default constructor initializes a pointer data member (the member > > > that holds the actual storage) to NULL. The destructor blindly > > > dereferences this pointer. If the string never gets set to anything, > > > it dereferences a NULL pointer minus an index, making for a truly > > > horrible pointer value. > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > jazzplusplus-devel mailing list > jaz...@li... > https://lists.sourceforge.net/lists/listinfo/jazzplusplus-devel -- Visit my website! http://www.davefancella.com/?event=em The Czechs announced after Sputnik that they, too, would launch a satellite. Of course, it would orbit Sputnik, not Earth! |
From: Matt K. <ra...@ch...> - 2004-03-31 01:32:02
|
Dave Fancella wrote: > On Tuesday 30 March 2004 08:49 pm, Matt Kelly wrote: > >>Dave -- if you wouldn't mind, could you post this to Audacity-devel? I'm >>not a member of that group. The responder on the wxWidget team didn't >>seem too thrilled about making this fix -- he said to change compilers. >>Maybe having more "pressure" to apply this "fix" will change their minds. > > > Done. :) Odd that they'd go to all this effort to support so many compilers > and then tell you to switch compilers... Odd indeed. :) > > Just out of curiosity, Matt, what distribution are you using? I noticed > sometime ago that I wasn't the only Mandrake drone around here, and > previously I had attributed this bug in Audacity to be more or less caused by > something Mandrake did, and figured it would go away if I ignored it. (And > since it didn't result in the loss of any data, it was only a minor > inconvenience) I'm using SuSE 8.2 Pro. My compiler: warp>> gcc --version gcc (GCC) 3.3 20030226 (prerelease) (SuSE Linux) I think this is a very early 3.3.0, according to the changelog. I'm thinking of upgrading to 3.3.3 or maybe to 3.4 and see what happens. With SuSE, it's pretty easy to uninstall, reinstall, etc. Matt |