MUI illegal instruction
  • Order of the Butterfly
    Order of the Butterfly
    amyren
    Posts: 219 from 2010/5/15
    From: Norway
    If I open MUI prefs, and press more, select the TextEditor, and under settings use the slider for undo levels, I get error messages from the log server popping up.
    Sometimes it gives the message MUI Unknown Exception, or I get the Illegal instruction. In both cases the MUI prefs window will stop responding.
    This happens often right away when I start by moving the slider quickly to the right. Other times I am able to move it right and left a few times, and sometimes even change the setting and press use or test and close the MUI window. But if I move the slider many times I always can produce this error.

    Does this happen for anybody else, or is it something with my setup?
    (mac mini G4 1.5Ghz, mos2.5)

    [ Edited by amyren on 2010/6/29 12:16 ]
  • »29.06.10 - 10:15
    Profile
  • MorphOS Developer
    kiero
    Posts: 129 from 2003/2/28
    which version of texteditor class?
  • »29.06.10 - 10:53
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Motosampy
    Posts: 199 from 2004/8/14
    From: Järvenp&a...
    I confirm this bug, TextEditor.mcc v. 15.33 , Peg2 MorphOS 2.5
  • »29.06.10 - 19:41
    Profile
  • Caterpillar
    Caterpillar
    tboeckel
    Posts: 21 from 2009/10/29
    From: Germany
    The undo levels slider is a plain Slider.mui object without any fancy stuff:
    Code:
    data->undosize = SliderObject,
    MUIA_ShortHelp, tr(HelpBubble_UndoLevel),
    MUIA_Numeric_Min, 0,
    MUIA_Numeric_Max, 2000,
    MUIA_CycleChain, TRUE,
    End,


    Neither AmigaOS3 nor AmigaOS4 nor AROS have any problem in this respect, thus I suppose it is an MUI4/MorphOS specific issue.
  • »30.06.10 - 07:51
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2975 from 2003/3/5
    From: Canada
    @tboeckel

    And what would this code snippet prove? A crash when changing the slider object means you have a problem in the MCC rather than in the MCP - since as far as I see the MCP doesn't do much with it other than registering. I can only suggest that you check how this stuff is handled in the MCC when the prefs are changed. Do mind that a prefs change happens whenever the user changes the slider value (in realtime).
  • »30.06.10 - 08:57
    Profile Visit Website
  • MorphOS Developer
    itix
    Posts: 1516 from 2003/2/24
    From: Finland
    Or maybe MorphOS is less tolerant to bugs ;-) I look into it when I am at home again. This bug is obviously in MCC itself.
    1 + 1 = 3 with very large values of 1
  • »30.06.10 - 09:58
    Profile
  • Caterpillar
    Caterpillar
    tboeckel
    Posts: 21 from 2009/10/29
    From: Germany
    @jacadcaps

    From the description "This happens often right away when I start by moving the slider quickly to the right." I get the impression that the illegal instruction happens already while moving the slider. And this has nothing to do with how TextEditor.mcc might react on a change after using/saving the modified setting.
  • »30.06.10 - 13:13
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    amyren
    Posts: 219 from 2010/5/15
    From: Norway
    Quote:


    tboeckel wrote:
    @jacadcaps

    From the description "This happens often right away when I start by moving the slider quickly to the right." I get the impression that the illegal instruction happens already while moving the slider. And this has nothing to do with how TextEditor.mcc might react on a change after using/saving the modified setting.


    I confirm this happens before save/use. If I start moving the slider back and forth it doesnt take long time before (bad) things start to happen.
    Just tested while writing this, opening MUI prefs and grab the slider and moved it 2 or 3 times sideways. This time first MUI prefs stopped (Application is meditating), and I managed to close it. Then re-opened the prefs and started to move the slider, and got a MUI illigal instruction message.
    Then rebooted, opened prefs again and this time I slided it to the left and got a MUI exeption error. I only managed to move it from 500 to 466 before this happened.
  • »30.06.10 - 13:43
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    amyren
    Posts: 219 from 2010/5/15
    From: Norway
    Quote:


    kiero wrote:
    which version of texteditor class?


    Sorry I overlooked this question.
    My version of texteditor.mcc is 15.32
    I have not done any updates to this since upgrading to MOS2.5, so I guess this is the system one. I notice that one other user have 15.33.

    (There is another version, 15.31 in the Yam folder, but this happens before running Yam anyway)
  • »30.06.10 - 13:51
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12079 from 2003/5/22
    From: Germany
    > I guess this is the system one.

    This class is definately no system one. It's in SYS:Classes/MUI, not in MOSSYS:Classes/MUI, right?
  • »30.06.10 - 14:04
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2975 from 2003/3/5
    From: Canada
    @tboeckel

    MUI4 has realtime prefs. The prefs changes are done immediately when the values are changed.
  • »30.06.10 - 14:07
    Profile Visit Website
  • MorphOS Developer
    itix
    Posts: 1516 from 2003/2/24
    From: Finland
    Ok I just tried this at home and it is reproducable. Problem goes away if I remove TextEditor objects from MCP itself but this one is tough one to debug. When it crashes MUI just jumps to random address and crashes with illegal instruction. There is no single trace to MCP or MCC hunks but maybe my stack trace isnt deep enough...
    1 + 1 = 3 with very large values of 1
  • »30.06.10 - 18:54
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    amyren
    Posts: 219 from 2010/5/15
    From: Norway
    Quote:


    Andreas_Wolf wrote:
    > I guess this is the system one.

    This class is definately no system one. It's in SYS:Classes/MUI, not in MOSSYS:Classes/MUI, right?


    You are correct.
    Probably it came with the pack ultimate.
  • »30.06.10 - 19:37
    Profile
  • Caterpillar
    Caterpillar
    tboeckel
    Posts: 21 from 2009/10/29
    From: Germany
    @jacadcaps

    Does MUI4 really do the necessary MUIM_Hide -> MUIM_Cleanup -> MUIM_Setup -> MUIM_Show cycle each time a config value has changed?

    I just ask because each instance of TE.mcc will update its configuration in MUIM_Setup only and MUIM_Setup must be issued only once according to MUI's documentation.

    @all
    Anyway, TE.mcc 15.34 has just been released. The main focus was the possible memory trashing while editing some text. The Undo/Redo handling and the configuration change should be unrelated. However, everybody who encountered this issue please check again with the latest version. If the issue is still valid, then please report it at TextEditor.mcc's bug tracker. This makes it much easier for us instead of having to wade through lots of fora.
  • »01.07.10 - 09:39
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    amyren
    Posts: 219 from 2010/5/15
    From: Norway
    Just tried 15.34. Its still the same.
    I did however discover a way to avoid freezing. I did submit the info to the bug tracker, hope that helps.

    Way to avoid freezing: (only tested with 15.34)
    Open MUI prefs (I always do a reboot before testing, so I can reproduce results easier)
    Then go straight to the About window, press the show button and browse through the classes list.
    Then close the About window.
    Go to TextEditor and start moving that cursed slider again -- No freezes.

    I'd be happy to know if the same applies to the others confirming this bug earlier.
  • »01.07.10 - 21:12
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Motosampy
    Posts: 199 from 2004/8/14
    From: Järvenp&a...
    I was not able to reproduce it either using this trick (have 15.34 installed), but it had effect only right after reboot. If I start e.g. OWB, then open global MUI prefs and do exactly as earlier, the freeze occurs right away

    [ Edited by Motosampy on 2010/7/2 1:22 ]
  • »01.07.10 - 22:10
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    amyren
    Posts: 219 from 2010/5/15
    From: Norway
    It works here with the 'trick', even after starting OWB.
    -Reboot
    -start OWB
    -Open global MUI prefs
    -Checking the About, and scrolling through the classes list
    -Close 'About'
    -Go to TextEditor and use the slider, does not freeze.
  • »02.07.10 - 06:31
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2975 from 2003/3/5
    From: Canada
    @tboeckel

    Afair yes, it does a Hide/Cleanup/Setup/Show cycle. Don't have the time to look at the sources at the moment though to be 100% sure.
  • »02.07.10 - 07:18
    Profile Visit Website
  • Caterpillar
    Caterpillar
    tboeckel
    Posts: 21 from 2009/10/29
    From: Germany
    @jacadcaps

    Would removing the DoMethod(obj, MUIM_Mccprefs_RegisterGadget,...) call work around this problem? Being able to watch the changes in real time doesn't really make much sense for the number of undo steps as this doesn't cause any visual feedback.
  • »02.07.10 - 10:19
    Profile
  • Caterpillar
    Caterpillar
    tboeckel
    Posts: 21 from 2009/10/29
    From: Germany
    @all

    What happens if other instances of TE.mcc are active (i.e. YAM's read/write window) while changing the undo settings? Are the windows constantly closed and reopened? Since I have MUI3 only and MUI3 has no real time settings I cannot reproduce this issue myself.
  • »02.07.10 - 10:22
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2975 from 2003/3/5
    From: Canada
    Quote:


    tboeckel wrote:
    @jacadcaps

    Would removing the DoMethod(obj, MUIM_Mccprefs_RegisterGadget,...) call work around this problem? Being able to watch the changes in real time doesn't really make much sense for the number of undo steps as this doesn't cause any visual feedback.


    Why not fix the bug instead of trying to hide it? :) About the 2nd question: no, windows do not get reopened when changing settings. There is no need for that.
  • »02.07.10 - 11:50
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Motosampy
    Posts: 199 from 2004/8/14
    From: Järvenp&a...
    The result in all my test, expect for one, was the same illegal instruction call right away.
    Once I was able to slide back and forth, the Yam write window flickered a little, but did not close.

    Quote:


    tboeckel wrote:
    @all

    What happens if other instances of TE.mcc are active (i.e. YAM's read/write window) while changing the undo settings? Are the windows constantly closed and reopened? Since I have MUI3 only and MUI3 has no real time settings I cannot reproduce this issue myself.
  • »02.07.10 - 18:55
    Profile
  • MorphOS Developer
    itix
    Posts: 1516 from 2003/2/24
    From: Finland
    @jacadcaps

    Quote:

    Quote:


    Would removing the DoMethod(obj, MUIM_Mccprefs_RegisterGadget,...) call work around this problem? Being able to watch the changes in real time doesn't really make much sense for the number of undo steps as this doesn't cause any visual feedback.


    Why not fix the bug instead of trying to hide it? :) About the 2nd question: no, windows do not get reopened when changing settings. There is no need for that.



    The undo buffer should not be adjusted in real time. If user goes to play with settings and sets undo levels to zero user would lose his undo buffer instantly.

    I tried to disable undo buffer code but it is still crashing. It crashes on some internal MUI DoMethod() call and after series of jumps inside muimaster.library it jumps to 0x00ffxxxx and crashes. 68k stack is always dead.

    Oh, and it crashes only if that TextEditor.mcc object is used in TextEditor.mcp. If I remove TE.mcc from this TE.mcp I can change undo levels in real time. Open applications using TE.mcc continue to work. Just only when it is used in MCP it crashes. Not always, just sometimes, sometimes instantly.

    [ Edited by itix on 2010/7/2 22:23 ]
    1 + 1 = 3 with very large values of 1
  • »02.07.10 - 19:20
    Profile
  • Caterpillar
    Caterpillar
    tboeckel
    Posts: 21 from 2009/10/29
    From: Germany
    @itix:

    I just replaced one of the .mcp's TextEditor objects by a simple float text object, because a full blown text editor object for a simple description how to use the spell checking facility is bit too much overhead. Furthermore the undo steps slider is no longer registered via MUIM_Mccprefs_RegisterGadget. Please check out the recent changes and try again.
  • »05.07.10 - 13:19
    Profile
  • MorphOS Developer
    itix
    Posts: 1516 from 2003/2/24
    From: Finland
    @tboeckel

    It fixes problem but apparently other settings in TextEditor suffer from same problem. So it means this bug has nothing to do with undo but happens with all setting items in TE. There must be something wrong in TE how it handles prefs change... or we are having a bug in MUI.

    I also posted this to bugtracker.
    1 + 1 = 3 with very large values of 1
  • »14.07.10 - 16:19
    Profile