Results 1 to 16 of 16

Thread: Problems with threads and windows

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Catalonia
    Posts
    266
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    44
    Thanked 2 Times in 2 Posts

    Default Re: Problems with threads and windows

    Sorry for my ignorance but could you please tell me how to run the debugger in the commad line to obtain the backtrace? Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: Problems with threads and windows

    Quote Originally Posted by SkripT
    how to run the debugger in the commad line to obtain the backtrace?
    If you use MinGW, it should be:
    shell Code:
    1. C:\...> gdb prog.exe
    2. (gdb) run
    3. <program crashes>
    4. (gdb) bt
    5. <backtrace>
    6. (gdb) quit
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Jan 2006
    Location
    Catalonia
    Posts
    266
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    44
    Thanked 2 Times in 2 Posts

    Default Re: Problems with threads and windows

    thanks a lot i'm going to try it.

  4. #4
    Join Date
    Jan 2006
    Location
    Catalonia
    Posts
    266
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    44
    Thanked 2 Times in 2 Posts

    Default Re: Problems with threads and windows

    Hi, here's the backtrace as a result of a program crash:
    Program received signal SIGSEGV, Segmentation fault.
    [Switching to thread -277..........]
    0x1012c44b in _size_of_stack_reserve__ ()
    and the message from the program drwatson of windows is that the program has made an illegal acess to memory.
    As I think, crashes as a result of an overload of the stack. I guess that's because I am working with some QImages at the same time and I think that could be better to define the images in dynamic memory. I will try it.
    Last edited by SkripT; 14th January 2006 at 00:55.

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: Problems with threads and windows

    Quote Originally Posted by SkripT
    Hi, here's the backtrace as a result of a program crash
    It's rather short. Wasn't there more output?

    As I think, crashes as a result of an overload of the stack. I guess that's because I am working with some QImages at the same time and I think that could be better to define the images in dynamic memory.
    AFAIK QImage stores data on the heap.

  6. #6
    Join Date
    Jan 2006
    Location
    Catalonia
    Posts
    266
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    44
    Thanked 2 Times in 2 Posts

    Default Re: Problems with threads and windows

    Hi again, gdb alerts me with two warnings that I tried to re-register class QString because I was trying to do a qregistertyper of QString. I have deleted the instruction and seems that the program not crashes, in the short time that I have tested it. Could I think that this was the problem?

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: Problems with threads and windows

    Quote Originally Posted by SkripT
    Hi again, gdb alerts me with two warnings that I tried to re-register class QString because I was trying to do a qregistertyper of QString.
    That warning comes from Qt itself. If you add "CONFIG += console" to your .pro file, you should be able to see such warnings on the console, without the need of debugger.

    Quote Originally Posted by SkripT
    I have deleted the instruction and seems that the program not crashes, in the short time that I have tested it. Could I think that this was the problem?
    Might be, but it shouldn't crash just because you tried to register something twice.

  8. #8
    Join Date
    Jan 2006
    Location
    Catalonia
    Posts
    266
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    44
    Thanked 2 Times in 2 Posts

    Default Re: Problems with threads and windows

    Ok jacek, thanks for tell me how to view the warnings from the console and for all the other suggestions. I will test the program a little more running it with the debugger, hoping that doesn't crash

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.