16 bits display makes jucedemo abort


#1

Hi again,

It looks like I’m good to find bugs in jucedemo … I’ve switched my display to 16bits, and this raises an assert in the demo. This assert seems justified, but for a demo I think it would be more sexy to display a clean error message at the beginning :slight_smile: Here is gdb output (svn version), the assert is !isARGB() for a bitmap when is16bit is true:

(gdb) r
Starting program: /home/nes/tmp/trunk/extras/juce demo/build/linux/build/jucedemo
[Thread debugging using libthread_db enabled]
[New Thread -1214436896 (LWP 1028)]
JUCE v1.44
Time and date: 3 Aug 2007 1:49:29 pm
Operating system: Linux
CPU vendor: GenuineIntel
CPU speed: 2793MHz

Number of CPUs: 2
CPU has MMX: yes
CPU has SSE: yes
CPU has SSE2: yes
CPU has 3DNOW: no
Memory size: 1003MB
Current executable file: /home/nes/tmp/trunk/extras/juce demo/build/linux/build/jucedemo
Current application file: /home/nes/tmp/trunk/extras/juce demo/build/linux/build/jucedemo
User home directory: /home/nes
User documents directory: /home/nes
User application data directory: /home/nes
Common application data directory: /var
Temp directory: /var/tmp


[New Thread -1214579824 (LWP 1031)]
JUCE Assertion failure in platform_specific_code/juce_linux_Windowing.cpp, line 613

Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread -1214436896 (LWP 1028)]
juce::XBitmapImage::blitToWindow (this=0x83f5d70, window=41943044, dx=0, dy=0, dw=700, dh=600, sx=0,
    sy=0) at platform_specific_code/juce_linux_Windowing.cpp:615
615                 for (int y = sy; y < sy + dh; ++y)
(gdb) bt
#0  juce::XBitmapImage::blitToWindow (this=0x83f5d70, window=41943044, dx=0, dy=0, dw=700, dh=600,
    sx=0, sy=0) at platform_specific_code/juce_linux_Windowing.cpp:615
#1  0x081c8132 in juce::LinuxComponentPeer::LinuxRepaintManager::performAnyPendingRepaintsNow (
    this=0x83e51c0) at platform_specific_code/juce_linux_Windowing.cpp:1760
#2  0x081c909d in juce::LinuxComponentPeer::LinuxRepaintManager::timerCallback (this=0x83e51c0)
    at platform_specific_code/juce_linux_Windowing.cpp:1700
#3  0x080dc256 in juce::InternalTimerThread::handleMessage (this=0x83c46a0)
    at ../../src/juce_appframework/events/juce_Timer.cpp:260
#4  0x080da615 in juce::MessageManager::deliverMessage (this=0x83bfbd0, message=0x85412c8)
    at ../../src/juce_appframework/events/juce_MessageManager.cpp:111
#5  0x081bd131 in juce::juce_dispatchNextMessageOnSystemQueue (returnIfNoPendingMessages=false)
    at platform_specific_code/juce_linux_Messaging.cpp:362
#6  0x080da445 in juce::MessageManager::dispatchNextMessage (this=0x83bfbd0,
    returnImmediatelyIfNoMessages=false, wasAMessageDispatched=0x0)
    at ../../src/juce_appframework/events/juce_MessageManager.cpp:150
#7  0x080da5ad in juce::MessageManager::runDispatchLoop (this=0x83bfbd0)
    at ../../src/juce_appframework/events/juce_MessageManager.cpp:194
#8  0x08088c25 in juce::JUCEApplication::main (commandLine=@0xbf9c6db8, app=0x83bfa58)
    at ../../src/juce_appframework/application/juce_Application.cpp:206
#9  0x08088e57 in juce::JUCEApplication::main (argc=1, argv=0xbf9c6e94, newApp=0x83bfa58)
    at ../../src/juce_appframework/application/juce_Application.cpp:289
#10 0x080519ed in main (argc=1, argv=0xbf9c6e94) at ../../src/ApplicationStartup.cpp:176
(gdb)

#2

Hmm - ok, I’ll take a look at that, thanks.


#3