Первый баг
Вот программа, которая, будучи откомпилированной на MidletPascal 2.2, отлично работала:
program NewProject5;
var cmdQuit : command;
begin
cmdQuit := CreateCommand('Выйти', CM_EXIT, 1);
AddCommand(cmdQuit);
Repaint;
repeat until GetClickedCommand = cmdQuit;
end.
Если её откомпилировать на Midlet Pascal 3.0 beta1 , то компиляция произойдёт успешно. Но при запуске выйдет сообщение об ошибке:
Running with storage root C:\Documents and Settings\1\j2mewtk\2.5.2\appdb\DefaultColorPhone
Running with locale: Russian_Russia.1251
Running in the identified_third_party security domain
Method............: 10233084 'com/sun/midp/midlet/MIDletState.createMIDlet (static)'
Stack Chunk.......: 22700ac
Frame Pointer.....: 2270104
Current IP........: 1033a48b = 1033a46e + offset 29
Previous Frame....: 22700cc
Previous IP.......: 103ce331 (offset 22)
Frame size........: 7 (1 arguments, 6 local variables)
Argument[0].......: 2270910
Local[1]..........: 0
Local[2]..........: 23ee188
Local[3]..........: 22800e4
Local[4]..........: 23ee19c
Local[5]..........: 10274b20
Local[6]..........: 23ee168
Operand[1]........: 246f814
Method............: 10295954 'com/sun/midp/midlet/Selector.run (virtual)'
Stack Chunk.......: 22700ac
Frame Pointer.....: 22700cc
Current IP........: 103ce331 = 103ce31b + offset 22
Previous Frame....: 0
Previous IP.......: 1
Frame size........: 6 (1 arguments, 5 local variables)
Argument[0].......: 2270ab8
Local[1]..........: 22801c0
Local[2]..........: 2270910
Local[3]..........: 0
Local[4]..........: 0
Local[5]..........: 0
Operand[1]........: 22801c0
VM status:
Instruction pointer.: 1033a48b (offset within invoking method: 29)
Next instruction....: 0x4c
Frame pointer.......: 2270104
Local pointer.......: 22700e8
Stack size..........: 128; sp: 227011c; ranges: 22700b4-22702b4;
Contents of the current stack frame:
22700e8: 2270910 (lp)
22700ec: 0
22700f0: 23ee188
22700f4: 22800e4
22700f8: 23ee19c
22700fc: 10274b20
2270100: 23ee168
2270104: 22700cc (fp)
2270108: 103ce331
227010c: 22700e4
2270110: 10233084
2270114: 22700ac
2270118: 0 (end of frame)
227011c: 246f814 (sp)
Execution stack contains 108 items:
2270ab8
22801c0
2270910
0
0
0
0
1
23ee16c
10295954
22700ac
0
22801c0
2270910
0
23ee188
22800e4
23ee19c
10274b20
23ee168
22700cc
103ce331
22700e4
10233084
22700ac
0
246f814
Execution completed.
3409755 bytecodes executed
83 thread switches
1669 classes in the system (including system classes)
17838 dynamic objects allocated (542292 bytes)
2 garbage collections (462092 bytes collected)
Execution completed.
3409755 bytecodes executed
83 thread switches
1669 classes in the system (including system classes)
ALERT: java/lang/ClassFormatError: Bad Utf8 string.
17838 dynamic objects allocated (542292 bytes)
2 garbage collections (462092 bytes collected)
Интересно, что если заменить слово "Выйти" на какое-нибудь английское слово, то ошибка исчезнет.
|