Re: Image processing error
Run your program in your debugger and determine where your program crashes. Then work the conditions that cause it to crash there.
Having an instance of the MainWindow in your dialog as a member variable is unusual.
What happens when the existing red, green, or blue value is 255?
Re: Image processing error
I have run my program in debugger, have identified where my program crashes but i don't understand error parameters means what. So can't fix to error
it here
i also have edited member variables
Code:
r = qBound<int>(0, c.red() + value, 255);
g = qBound<int>(0, c.green() + value, 255);
b = qBound<int>(0, c.blue() + value, 255);
Re: Image processing error
Quote:
Originally Posted by
bachkimfly
I have run my program in debugger, have identified where my program crashes but i don't understand error parameters means what. So can't fix to error
it here
And since you don't tell us the error we can't help you either.
Is imageLabel a valid pointer?
Cheers,
_
Re: Image processing error
Quote:
Originally Posted by
anda_skoa
And since you don't tell us the error we can't help you either.
Is imageLabel a valid pointer?
Cheers,
_
Actually, I can't determine correct error, if that be can then I used quick search in net. I have run debugger and output above, hope it is useful.
Yes, imageLabel is a valid pointer!
Re: Image processing error
Re: Image processing error
backtrace for 4 breakpoints here:
Code:
#2 0x0000000000406a40 in MainWindow::brightnessProcessing (this=0x7fffffffc838, value=1) at ../../qt workspace/Auroras/mainwindow.cpp:161
image = <incomplete type>
w = 32767
c = {cspec = 4294952960, ct = {argb = {alpha = 32767, red = 0, green = 49696, blue = 196, pad = 0}, ahsv = {alpha = 32767, hue = 0, saturation = 49696, value = 196, pad = 0}, acmyk = {alpha = 32767, cyan = 0, magenta = 49696, yellow = 196, black = 0}, ahsl = {alpha = 32767, hue = 0, saturation = 49696, lightness = 196, pad = 0}, array = {32767, 0, 49696, 196, 0}}}
g = 4232186
h = -20672
r = 32767
b = 0
#3 0x000000000040973c in BrightnessContrast::on_horizontalSliderBrightness_valueChanged (this=0x7fffffffc800, value=1) at ../../qt workspace/Auroras/brightnesscontrast.cpp:19
No locals.
#4 0x000000000040a5c5 in BrightnessContrast::qt_static_metacall (_o=0x7fffffffc800, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffffffb1c0) at moc_brightnesscontrast.cpp:73
_t = 0x7fffffffc800
#5 0x000000000040a6da in BrightnessContrast::qt_metacall (this=0x7fffffffc800, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffffffb1c0) at moc_brightnesscontrast.cpp:106
No locals.
Re: Image processing error
Seems like BrightnessContrast instance is an invalid pointer.
Re: Image processing error
I import mainwindow into BrightnessContrast and declare:
Code:
MainWindow respond;
respond.brightnessProcessing(value);
This right?
Re: Image processing error
I posted backtrace wrong, I editted in #7
Re: Image processing error
Could you explain why you did the thing Chris pointed out a couple of posts ago -- made MainWindow a member variable of a QDialog subclass?
Re: Image processing error
Can you give me a few link? I not yet reat it.
------------------------------------
I'm trying "made MainWindow a member variable of a QDialog subclass"
Re: Image processing error
Quote:
Originally Posted by
bachkimfly
I'm trying "made MainWindow a member variable of a QDialog subclass"
Yes, we can see that. But why are you trying to do this?
Re: Image processing error
If don't made MainWindow a member variable of a QDialog, how to can executable event in QDialog. So what is your idea?
Re: Image processing error
Quote:
Originally Posted by
bachkimfly
If don't made MainWindow a member variable of a QDialog, how to can executable event in QDialog.
I don't understand what you mean.
Re: Image processing error
I want to catch event slider value changed, but brightness processing function which at MainWindow, if don't made MainWindow as a member variable of a BrightnessContrast dialog, i dont know to executable event slider value changed. your idea!
P/s: now, it's 5:22 AM, a tonight don't sleep, i want to go to sleep
Re: Image processing error
Quote:
Originally Posted by
bachkimfly
I want to catch event slider value changed, but brightness processing function which at MainWindow, if don't made MainWindow as a member variable of a BrightnessContrast dialog, i dont know to executable event slider value changed. your idea!
Don't you already have an instance of the main window which launched the dialog? Do you understand the difference between a class and an instance of a class?
Re: Image processing error
Alright! I need have to initialize object of MainWindow class, right?. I asked in #9.
So what is I can understand for "made MainWindow a member variable of a QDialog subclass". Patently, I misconstrued.
Re: Image processing error
Quote:
Originally Posted by
bachkimfly
Alright! I need have to initialize object of MainWindow class, right?
No, I'm assuming you already have such an object somewhere.
Let's make a deal - if you keep ignoring my questions, I will start ignoring yours.
Re: Image processing error
Quote:
Originally Posted by
wysota
No, I'm assuming you already have such an object somewhere.
Let's make a deal - if you keep ignoring my questions, I will start ignoring yours.
I don't ignore, I answered by the question "I need have to initialize object of MainWindow class, right?". That means I don't have an instance of the main window which launched the dialog and I understand the difference between a class and an instance of a class. I think so.
But I feel we are going around.