Latest tip build error

I’m trying to build against the latest tip (checked in 17-mar) and am running into problems when I try to instantiate rectangles. I’ve attached a graphic to show you what I get with Xcode.

Yeah, rectangle is templated now - just use “Rectangle” instead of Rectangle.

In versions prior to the current tip, [color=#0000BF]File.findChildFiles[/color] took [color=#0000BF]OwnedArray[/color] as the first argument. Now it requires [color=#0000BF]Array[/color]. I haven’t gone digging deeply to find what the difference is, but I wonder if this is an intentional change.

Yes, of course. I improved the Array class a while ago so that it can hold a wider range of objects, and that let me use it for Files as well. It’s much more efficient and versatile than using an OwnedArray.

Thank you.

[quote=“jules”]
Yes, of course. I improved the Array class a while ago so that it can hold a wider range of objects, and that let me use it for Files as well. It’s much more efficient and versatile than using an OwnedArray.[/quote]

Seems to work. But as I complained earlier in the thread, I now have to go through previously-working code and do stuff like this:

#ifdef FRAMEWORK_DEV // UserPresetGroup is in the OwnedArray/Array. FRAMEWORK_DEV is defined for post 1.5 Juce String TempName = UserPresetGroup[TempIndex].getFileName(); #else String TempName = UserPresetGroup[TempIndex]->getFileName(); #endif

It would be much appreciated if you created new names for new things and left the old ones working for a while.

[quote=“jules”]
ah, slave-like obedience, that’s what I like![/quote]

:smiley:

Well I’m still using printf-style formatting, it’s pretty compact and useful (and well, I’m used to it…) So I applaud that you put String::formatted back in. :slight_smile:

Another thing - Jucer in current git tip seems to be a little unstable. The “old” one, not the shiny new one, which looks really interesting btw. This is a stacktrace from a crash shortly after using the magnifying function:

[code]$ gdb “/home/johannes/code/juce-git/extras/the jucer/build/linux/build/jucer”
GNU gdb (GDB) 7.0-ubuntu
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type “show copying”
and “show warranty” for details.
This GDB was configured as “i486-linux-gnu”.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/
Reading symbols from /home/johannes/code/juce-git/extras/the jucer/build/linux/build/jucer…done.
(gdb) run
Starting program: /home/johannes/code/juce-git/extras/the jucer/build/linux/build/jucer
[Thread debugging using libthread_db enabled]
JUCE v1.51.11
[New Thread 0xfb1b70 (LWP 15354)]
JUCE Assertion failure in …/…/src/…/…/…/juce_amalgamated.cpp, line 91019

Program received signal SIGTRAP, Trace/breakpoint trap.
0x0012d422 in __kernel_vsyscall ()
(gdb) bt
#0 0x0012d422 in __kernel_vsyscall ()
#1 0x006217a6 in kill () from /lib/tls/i686/cmov/libc.so.6
#2 0x08170076 in BitmapData (this=0xbfffe894, image=…, x=92, y=-29, w=322,
h=230) at …/…/src/…/…/…/juce_amalgamated.cpp:91019
#3 0x081704c7 in juce::Image::clear (this=0xbfffe900, dx=92, dy=-29, dw=322,
dh=230, colourToClearTo=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:91059
#4 0x08138296 in juce::MagnifierComponent::paint (this=0x845b170, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:73939
#5 0x080bf0aa in juce::Component::renderComponent (this=0x845b170, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40009
#6 0x080bf4a1 in juce::Component::paintEntireComponent (this=0x845b170, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40072
#7 0x080bf252 in juce::Component::renderComponent (this=0x845a678, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40037
#8 0x080bf4a1 in juce::Component::paintEntireComponent (this=0x845a678, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40072
#9 0x080bf252 in juce::Component::renderComponent (this=0x845a5c8, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40037
#10 0x080bf4a1 in juce::Component::paintEntireComponent (this=0x845a5c8, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40072
#11 0x080bf252 in juce::Component::renderComponent (this=0x8459400, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40037
—Type to continue, or q to quit—
#12 0x080bf4a1 in juce::Component::paintEntireComponent (this=0x8459400, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40072
#13 0x080bf252 in juce::Component::renderComponent (this=0x8438b08, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40037
#14 0x080bf4a1 in juce::Component::paintEntireComponent (this=0x8438b08, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40072
#15 0x080bf252 in juce::Component::renderComponent (this=0x842e3b0, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40037
#16 0x080bf4a1 in juce::Component::paintEntireComponent (this=0x842e3b0, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40072
#17 0x080bf252 in juce::Component::renderComponent (this=0x845d5a0, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40037
#18 0x080bf4a1 in juce::Component::paintEntireComponent (this=0x845d5a0, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40072
#19 0x080bf252 in juce::Component::renderComponent (this=0x840ea78, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40037
#20 0x080bf4a1 in juce::Component::paintEntireComponent (this=0x840ea78, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40072
#21 0x080bf252 in juce::Component::renderComponent (this=0x8434f08, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40037
#22 0x080bf4a1 in juce::Component::paintEntireComponent (this=0x8434f08, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40072
#23 0x08140f85 in juce::ComponentPeer::handlePaint (this=0x842e638,
—Type to continue, or q to quit—
contextToPaintTo=…) at …/…/src/…/…/…/juce_amalgamated.cpp:76083
#24 0x0820ea01 in juce::LinuxComponentPeer::LinuxRepaintManager::performAnyPendingRepaintsNow (this=0x841f300)
at …/…/src/…/…/…/juce_amalgamated.cpp:233091
#25 0x0820e5e3 in juce::LinuxComponentPeer::LinuxRepaintManager::timerCallback
(this=0x841f300) at …/…/src/…/…/…/juce_amalgamated.cpp:233021
#26 0x081db9d8 in juce::InternalTimerThread::callTimers (this=0x840b198)
at …/…/src/…/…/…/juce_amalgamated.cpp:38168
#27 0x081dbafd in juce::InternalTimerThread::handleMessage (this=0x840b198)
at …/…/src/…/…/…/juce_amalgamated.cpp:38178
#28 0x080b8c14 in juce::MessageManager::deliverMessage (this=0x83f4ec8,
message=0x84f73a8) at …/…/src/…/…/…/juce_amalgamated.cpp:37736
#29 0x081c3deb in juce_dispatchNextInternalMessage ()
at …/…/src/…/…/…/juce_amalgamated.cpp:230603
#30 0x081c3eb1 in juce::juce_dispatchNextMessageOnSystemQueue (
returnIfNoPendingMessages=false)
at …/…/src/…/…/…/juce_amalgamated.cpp:230640
#31 0x080b8f11 in juce::MessageManager::runDispatchLoopUntil (this=0x83f4ec8,
millisecondsToRunFor=-1) at …/…/src/…/…/…/juce_amalgamated.cpp:37784
#32 0x080b8de8 in juce::MessageManager::runDispatchLoop (this=0x83f4ec8)
at …/…/src/…/…/…/juce_amalgamated.cpp:37761
#33 0x08082be6 in juce::JUCEApplication::main (commandLine=…, app=0x83f4b30)
at …/…/src/…/…/…/juce_amalgamated.cpp:17005
—Type to continue, or q to quit—
#34 0x0808341b in juce::JUCEApplication::main (argc=1, argv=0xbffff294,
newApp=0x83f4b30) at …/…/src/…/…/…/juce_amalgamated.cpp:17135
#35 0x0825e5ec in main (argc=1, argv=0xbffff294)
at …/…/src/jucer_Main.cpp:112
(gdb) [/code]

Crashes relatively often after using the magnifier, but also sometimes when using “Save As”.

It’s just an assertion failure because the Image::clear method is getting out-of-bounds coords. Thanks, that’s easy enough to sort out.

This one is an assertion failure, but it segfaults later on. Here’s a complete log.

[code]~> gdb "/home/johannes/code/juce-git/extras/the jucer/build/linux/build/jucer"
GNU gdb (GDB) 7.0-ubuntu
Copyright © 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and “show warranty” for details.
This GDB was configured as “i486-linux-gnu”.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/
Reading symbols from /home/johannes/code/juce-git/extras/the jucer/build/linux/build/jucer…done.
(gdb) run
Starting program: /home/johannes/code/juce-git/extras/the jucer/build/linux/build/jucer
[Thread debugging using libthread_db enabled]
JUCE v1.51.11
[New Thread 0xfb1b70 (LWP 8016)]
JUCE Assertion failure in …/…/src/…/…/…/juce_amalgamated.cpp, line 91019

Program received signal SIGTRAP, Trace/breakpoint trap.
0x0012d422 in __kernel_vsyscall ()
(gdb) cont
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x0823a154 in juce::PixelARGB::setjuce::PixelARGB (this=0xb736fa40, src=…)
at …/…/src/…/…/…/juce_amalgamated.h:11054
11054 argb = src.getARGB();
(gdb) bt
#0 0x0823a154 in juce::PixelARGB::setjuce::PixelARGB (this=0xb736fa40,
src=…) at …/…/src/…/…/…/juce_amalgamated.h:11054
#1 0x08170507 in juce::Image::clear (this=0xbfffe920, dx=-18, dy=-176,
dw=1300, dh=1341, colourToClearTo=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:91071
#2 0x08138296 in juce::MagnifierComponent::paint (this=0x84a2e70, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:73939
#3 0x080bf0aa in juce::Component::renderComponent (this=0x84a2e70, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40009
#4 0x080bf4a1 in juce::Component::paintEntireComponent (this=0x84a2e70, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40072
#5 0x080bf252 in juce::Component::renderComponent (this=0x84a2378, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40037
#6 0x080bf4a1 in juce::Component::paintEntireComponent (this=0x84a2378, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40072
#7 0x080bf252 in juce::Component::renderComponent (this=0x84a22c8, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40037
#8 0x080bf4a1 in juce::Component::paintEntireComponent (this=0x84a22c8, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40072
#9 0x080bf252 in juce::Component::renderComponent (this=0x84a10b0, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40037
#10 0x080bf4a1 in juce::Component::paintEntireComponent (this=0x84a10b0, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40072
#11 0x080bf252 in juce::Component::renderComponent (this=0x8443b70, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40037
#12 0x080bf4a1 in juce::Component::paintEntireComponent (this=0x8443b70, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40072
#13 0x080bf252 in juce::Component::renderComponent (this=0x842e3b0, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40037
#14 0x080bf4a1 in juce::Component::paintEntireComponent (this=0x842e3b0, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40072
#15 0x080bf252 in juce::Component::renderComponent (this=0x84a52a0, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40037
#16 0x080bf4a1 in juce::Component::paintEntireComponent (this=0x84a52a0, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40072
#17 0x080bf252 in juce::Component::renderComponent (this=0x840ea78, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40037
#18 0x080bf4a1 in juce::Component::paintEntireComponent (this=0x840ea78, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40072
#19 0x080bf252 in juce::Component::renderComponent (this=0x8434f08, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40037
#20 0x080bf4a1 in juce::Component::paintEntireComponent (this=0x8434f08, g=…)
at …/…/src/…/…/…/juce_amalgamated.cpp:40072
—Type to continue, or q to quit—
#21 0x08140f85 in juce::ComponentPeer::handlePaint (this=0x842e638,
contextToPaintTo=…) at …/…/src/…/…/…/juce_amalgamated.cpp:76083
#22 0x0820ea01 in juce::LinuxComponentPeer::LinuxRepaintManager::performAnyPendingRepaintsNow (this=0x841f300)
at …/…/src/…/…/…/juce_amalgamated.cpp:233091
#23 0x0820e5e3 in juce::LinuxComponentPeer::LinuxRepaintManager::timerCallback
(this=0x841f300) at …/…/src/…/…/…/juce_amalgamated.cpp:233021
#24 0x081db9d8 in juce::InternalTimerThread::callTimers (this=0x840b198)
at …/…/src/…/…/…/juce_amalgamated.cpp:38168
#25 0x081dbafd in juce::InternalTimerThread::handleMessage (this=0x840b198)
at …/…/src/…/…/…/juce_amalgamated.cpp:38178
#26 0x080b8c14 in juce::MessageManager::deliverMessage (this=0x83f4ec8,
message=0xb7a004b0) at …/…/src/…/…/…/juce_amalgamated.cpp:37736
#27 0x081c3deb in juce_dispatchNextInternalMessage ()
at …/…/src/…/…/…/juce_amalgamated.cpp:230603
#28 0x081c3e91 in juce::juce_dispatchNextMessageOnSystemQueue (
returnIfNoPendingMessages=false)
at …/…/src/…/…/…/juce_amalgamated.cpp:230635
#29 0x080b8f11 in juce::MessageManager::runDispatchLoopUntil (this=0x83f4ec8,
millisecondsToRunFor=-1) at …/…/src/…/…/…/juce_amalgamated.cpp:37784
#30 0x080b8de8 in juce::MessageManager::runDispatchLoop (this=0x83f4ec8)
at …/…/src/…/…/…/juce_amalgamated.cpp:37761
#31 0x08082be6 in juce::JUCEApplication::main (commandLine=…, app=0x83f4b30)
at …/…/src/…/…/…/juce_amalgamated.cpp:17005
#32 0x0808341b in juce::JUCEApplication::main (argc=1, argv=0xbffff2b4,
newApp=0x83f4b30) at …/…/src/…/…/…/juce_amalgamated.cpp:17135
#33 0x0825e5ec in main (argc=1, argv=0xbffff2b4)
at …/…/src/jucer_Main.cpp:112
(gdb) [/code]

BTW, this is what I did to get the Jucer to compile. (Replacing 0 with String::empty, someone mentioned it)

[code]diff --git a/extras/the jucer/src/model/jucer_GeneratedCode.cpp b/extras/the juc
index 3398fdf…e0af2a7 100644
— a/extras/the jucer/src/model/jucer_GeneratedCode.cpp
+++ b/extras/the jucer/src/model/jucer_GeneratedCode.cpp
@@ -176,7 +176,7 @@ const String GeneratedCode::getCallbackDefinitions() const
const String GeneratedCode::getClassDeclaration() const
{
StringArray parentClassLines;

  • parentClassLines.addTokens (parentClasses, T(","), 0);
  • parentClassLines.addTokens (parentClasses, T(","), String::empty);
    parentClassLines.addArray (getExtraParentClasses());

    parentClassLines.trim();
    diff --git a/extras/the jucer/src/model/jucer_JucerDocument.cpp b/extras/the juc
    index 8cb453b…c144f62 100644
    — a/extras/the jucer/src/model/jucer_JucerDocument.cpp
    +++ b/extras/the jucer/src/model/jucer_JucerDocument.cpp
    @@ -129,7 +129,7 @@ void JucerDocument::setParentClasses (const String& classes)
    if (classes != parentClasses)
    {
    StringArray parentClassLines;

  •    parentClassLines.addTokens (classes, T(","), 0);
    
  •    parentClassLines.addTokens (classes, T(","), String::empty);
       parentClassLines.trim();
       parentClassLines.removeEmptyStrings();
       parentClassLines.removeDuplicates (false);
    

diff --git a/extras/the jucer/src/model/paintelements/jucer_FillType.cpp b/extra
index 2845489…8b2b6d4 100644
— a/extras/the jucer/src/model/paintelements/jucer_FillType.cpp
+++ b/extras/the jucer/src/model/paintelements/jucer_FillType.cpp
@@ -237,7 +237,7 @@ void JucerFillType::restoreFromString (const String& s)
if (s.isNotEmpty())
{
StringArray toks;

  •    toks.addTokens (s, T(",:"), 0);
    
  •    toks.addTokens (s, T(",:"), String::empty);
       toks.trim();
    
       if (toks[0] == T("solid"))
    

[/code]

Those fixes are already checked in now.

Hey, in current git tip (ccd8566e96e01475f5dfadd6695ab025decbd347/Fix for iOS launching…) the demo audio plugin fails compiling.

The problem is at “extras/audio plugins/wrapper/juce_PluginHostType.h”:103.
Changing getFullPath to getFullPathName seems to solve it.

Same results on both Snow Leopard and Leopard.

cheers,
Yair

Doh! Sorry, stupid typo there. I’ve checked in a correction now.

Came across this posting while looking for help with a different error “No match for operator <” after I tried to create a priority_queue of MidiMessage type.

For what it’s worth, the string handling mechanism in Qt is quite wonderful and addresses all the issues described in this thread. Might be worth looking into.

(This thread’s getting a bit old and off-topic now, so I’m locking it…)