Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

unknown exception

<< < (8/17) > >>

killerbot:
Sam,

I think it is most easiest to revert your copies back, and have the multiple monitor bug (some don't consider this a bug, I do consider it, since it is very annoying if your head is going from left to right like watching a live tennis game) fix at a later stage. Don't get me wrong, I would like to see your patch for the multiple monitors in rather today then tomorrow, but as Yiannis said this is not up to us to decide.
I know it is a little bit frustrating that fixes which are ready are not inserted into head immediately (I have for example also made some fixes some weeks ago, and those are also not yet in head), but I know someday they will get in there well I hope). Off course I know keep track on the files that I have changed and that are being changed in head, so I can re-apply the fix on newer revisions, that's an anoying thing to do, I admit. But for us this is just a little pile of work, but for the CB developers it is a huge pile of work, since they get patches, new features from everywhere and most importantly they are in the middle of a big change of the sdk, which they want to get out of the door asap. And that is also another thing I want to happen asap, that changed sdk (could probably cause us to rsynch our fixes on changed files).

What I can tell from your posts is that you found several bugs and fixed them, which I think is very good, and as a user, plug-in developer, bug fixer for CB I am very thankfull for that, and I hope you will be able to fix much more bugs, aswell as I hop to fix much more bugs. I want to see the number of bugs at sf go down down down.

I hope that all of use will be able to fix much more bugs, add much more functionality, and hopefully the core devs will be abl to quickly catch up on them.
Let's hope the team also grows, then maybe there can be some patch reviewer person or something like that.

Nevertheless, I think all will sort out fo the best.

So let's kick ass and create a wonderfull project, but as for us little helpers always listen to the boss ...  8)

Cheers,
Lieven

rickg22:
Sam: I got an idea. Keep your positioning-version (including sources) in a directory, let's call it "codeblocks-custom". And use that copy to debug others.

Then bear with the existing bugs as you try to update / compile etc. Now, I think I speak for all of us devs when I say that the positioning bug will NOT be fixed until later. We'll work first on the CRC showstopper bug.

So after you've kept a backup and made a diff on all your files, update with the latest SVN. Thank you.

grv575:
Tracing through this a bit more:

Now I can get it to trace through the crc stuff fine, but it returns and was called from:
src/main:800

--- Code: ---buf = Manager::Get()->GetConfigManager(_T("app"))->ReadBinary(_T("/main_frame/layout"));

--- End code ---

Now why that triggers a crc calculation, I'm really at a loss:

default.conf:

--- Code: ---        <main_frame>
            <layout>
                <TOOLBAR_SHOW bool="1" />
                <LEFT_BLOCK_SELECTION int="0" />
                <BOTTOM_BLOCK_SELECTION int="0" />
                <MAXIMIZED bool="1" />
            </layout>
            <LAYOUT>
                <bin crc="-1075901594">FQAAAHd4RG9ja2luZy1TdHJlYW0tdjEuMAgAAAA8bGF5b3V0PgIAAAAFAAAAZnJhbWVAAAAAQAAAAMgAAAA2AgAAAAEAAAAACAAAAExlZnRIb3N0AgAAAGQxYAAAAGAAAAAYAwAAlgAAAAABAAAAAAoAAABCb3R0b21Ib3N0BAAAAAcAAABUb3BIb3N0lgAAAAAAAAAAAAAACgAAAEJvdHRvbUhvc3SWAAAAAAAAAAEAAAACAAAAZDEIAAAATGVmdEhvc3TIAAAAAAAAAAEAAAAFAAAAZnJhbWUJAAAAUmlnaHRIb3N0yAAAAAAAAAAAAAAAFgAAAHd4U2xpZGVCYXItU3RyZWFtLXYxLjABAAAAAAgAAAA8bGF5b3V0PgMAAAAEAAAATWFpbgEIAAAAQ29tcGlsZXIBCAAAAERlYnVnZ2VyAQ==</bin>
            </LAYOUT>
        </main_frame>

--- End code ---

As you can see, there is <layout> and <LAYOUT>.  Now XML should be case-sensitive, so is the xml parser being used broken wrt case?

It now crashed 3 lines lower:
main.cpp:803

--- Code: ---    pSlideBar->LoadFromStream( ms );

--- End code ---

I would check the memory management stuff.  Definately looks like heap corruption.

rickg22:
http://wxextended.sourceforge.net/docs/slidebar_8cpp-source.html <- here's the sourcecode for wxExtended's slidebar.cpp. Is that it?

grv575:
No, w/ memory corruption it can crash anywhere (esp places unrelated).

But the problem seems to be coming from computing a 0 crc and storing that.
sdk/configmanager.cpp:896:

--- Code: ---    s->SetAttribute("crc", wxCrc32::FromString(source));

--- End code ---

This is called when CB shuts down to save the crc info.  Tracing this, source = " ".  i.e. an empty space, followed by 0x0.
This is the line which calls it:

main.cpp:837 in MainFrame::SaveWindowState

--- Code: ---    wxMemoryOutputStream os;
    pLayoutManager->SaveToStream( os );
    pSlideBar->SaveToStream( os );
    wxString buf(static_cast<const wxChar*>(os.GetOutputStreamBuffer()->GetBufferStart()), os.GetSize());
    Manager::Get()->GetConfigManager(_T("app"))->WriteBinary(_T("/main_frame/layout"), buf);    <-------

--- End code ---

That casting scares me.  Not sure how:


--- Code: ---                <TOOLBAR_SHOW bool="1" />
                <LEFT_BLOCK_SELECTION int="0" />
                <BOTTOM_BLOCK_SELECTION int="0" />
                <MAXIMIZED bool="1" />

--- End code ---

gets converted to a " " buffer?

The other thing was that the crc returns a long int, but the xml output routine takes in an int.  So we get a negative # in the default.conf file, maybe that's also an issue...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version